From 51c66a5976923195e3975e48b909cbafcf95c72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Wed, 19 Jul 2017 17:40:47 +0800 Subject: [PATCH 0001/2268] =?UTF-8?q?Init=20types=20for=20wx=EF=BC=88?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=EF=BC=89js=20sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/wx-js-sdk/index.d.ts | 473 +++++++++++++++++++++++++++++ types/wx-js-sdk/tsconfig.json | 22 ++ types/wx-js-sdk/tslint.json | 1 + types/wx-js-sdk/wx-js-sdk-tests.ts | 0 4 files changed, 496 insertions(+) create mode 100644 types/wx-js-sdk/index.d.ts create mode 100644 types/wx-js-sdk/tsconfig.json create mode 100644 types/wx-js-sdk/tslint.json create mode 100644 types/wx-js-sdk/wx-js-sdk-tests.ts diff --git a/types/wx-js-sdk/index.d.ts b/types/wx-js-sdk/index.d.ts new file mode 100644 index 0000000000..e11f835bd4 --- /dev/null +++ b/types/wx-js-sdk/index.d.ts @@ -0,0 +1,473 @@ + +export namespace wx { + + export interface wxconfig { + debug: boolean; // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + appId: string; //公众号的唯一标识 + timestamp: number; //签名的时间戳 + nonceStr: string; //签名的随机串 + signature: string; //签名 + jsApiList: string[] //需要使用的JS接口列表 + } + + /** + * 通过config接口注入权限验证配置 + * @param setting 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + * jsApiList[] 需要使用的JS接口列表 + */ + export const config: (setting: wxconfig) => void + + /** + * config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。 + * @param x + */ + export const ready: (x: () => void ) => void; + + /** + * config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 + */ + export const error: (err: (res: any) => void) => void + + + /** + * 判断当前客户端版本是否支持指定JS接口,checkJsApi接口是客户端6.0.2新引入的一个预留接口,第一期开放的接口均可不使用checkJsApi来检测 + */ + export interface checkApiConfig { + jsApiList: string[]; //需要检测的JS接口列表 + + // 以键值对的形式返回,可用的api值true,不可用为false + // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"} + success: (res: {checkResult: {[methodName: string]: boolean}, errMsg: {msg: string}}) => void + } + + /** + * 判断当前客户端版本是否支持指定JS接口 + * @param setting + */ + export const checkJsApi: (setting: checkApiConfig) => void + + export interface shareTimelineConfig { + title: string; // 分享标题 + link: string; // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: string; // 分享图标 + success: () => void; + cancel: () => void + } + + /** + * 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 + * + * @param setting itle分享标题 ,link分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl分享图标, success用户确认分享后执行的回调函数 + */ + export const onMenuShareTimeline: (setting: shareTimelineConfig) => void + + + export interface shareAppMessage extends shareTimelineConfig { + desc: string; // 分享描述 + type?: string; // 分享类型,music、video或link,不填默认为link + dataUrl?: string; // 如果type是music或video,则要提供数据链接,默认为空 + } + + /** + * 获取“分享给朋友”按钮点击状态及自定义分享内容接口 + * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl 分享图标,type 分享类型,music、video或link,不填默认为link + * dataUrl如果type是music或video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 + */ + export const onMenuShareAppMessage: (setting: shareAppMessage) => void + + export interface menuShareQQ extends shareTimelineConfig { + desc: string; // 分享描述 + } + + /** + * “分享到QQ”按钮点击状态及自定义分享内容接口 + */ + export const onMenuShareQQ: (config: menuShareQQ) => void + + + export interface menuShareWeibo extends shareTimelineConfig { + desc: string; // 分享描述 + } + + /** + * 获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口 + */ + export const onMenuShareWeibo: (config: menuShareWeibo) => void + + + export interface menuShareQZone extends menuShareWeibo { + } + + /** + * 获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 + */ + export const onMenuShareQzone: (config: menuShareQZone) => void + + /** + * count默认9, sizeType指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 + * var localIds = res.localIds; 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + */ + export interface chooseImageConfig { + count: number; // 默认9 + sizeType: string[]; // 可以指定是原图还是压缩图,默认二者都有 + sourceType: string[]; // 可以指定来源是相册还是相机,默认二者都有 + success: (res: any) => void // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + } + + /** + * 拍照或从手机相册中选图接口 + */ + export const chooseImage: (config: chooseImageConfig) => void + + /** + * current:当前显示图片的http链接, urls:需要预览的图片http链接列表 + */ + export interface previewImageConfig { + current: string; // 当前显示图片的http链接 + urls: string[]; // 需要预览的图片http链接列表 + } + + /** + *  预览图片接口 + * @param config + */ + export const previewImage: (config: previewImageConfig) => void + + /** + * localId:要上传的图片的本地ID,由chooseImage接口获得 + * isShowProgressTips:默认为1,显示进度提示 + * res: var serverId = res.serverId; 返回图片的服务器端ID + */ + export interface uploadImageConfig { + localId: string; + isShowProgressTips?: number; + success: (res: any) => void + } + + export const uploadImage: (config: uploadImageConfig) => void + + /** + * serverId:需要下载的图片的服务器端ID,由uploadImage接口获得 + * res: var localId = res.localId; 返回图片下载后的本地ID + */ + export interface downLoadImageConfig { + serverId: string; + isShowProgressTips?: number; + success: (res: any) => void + } + + export const downLoadImage: (config: downLoadImageConfig) => void + + /** + * locallId: 图片的localID + */ + export interface getLocalImgDataConfig { + localId: string; + success: (res: any) => void + } + + /** + * 获取本地图片接口,此接口仅在 iOS WKWebview 下提供,用于兼容 iOS WKWebview 不支持 localId 直接显示图片的问题 + */ + export const getLocalImgData: (config: getLocalImgDataConfig) => void + + /** + * 开始录音 + */ + export const startRecord: () => void + + /** + * 停止录音 + * res: var localId = res.localId; + */ + export const stopRecord: (success: (res: any) => void) => void + + /** + * 录音时间超过一分钟没有停止的时候会执行 complete 回调 + * @param complete :var localId = res.localId; + */ + export const onVoiceRecordEnd: (complete: (res: any) => void) => void + + /** + * 需要播放的音频的本地ID,由stopRecord接口获得 + * @param localId + */ + export const playVoice: (localId: string) => void + + /** + * 需要暂停的音频的本地ID,由stopRecord接口获得 + */ + export const pauseVoice: (localId: string) => void + + /** + * 需要停止的音频的本地ID,由stopRecord接口获得 + */ + export const stopVoice: (localId: string) => void + + /** + * res: var localId = res.localId; 返回音频的本地ID + */ + export const onVoicePlayEnd: (success: (res: any) => void) => void + + interface uploadVoiceConfig { + localId: string; + isShowProgressTips?: number; + success: (res: any) => void + } + + /** + * 上传语音接口,上传语音有效期3天,可用微信多媒体接口下载语音到自己的服务器, + * 此处获得的 serverId 即 media_id,参考文档 .目前多媒体文件下载接口的频率限制为10000次/天,如需要调高频率,请登录微信公众平台,在开发 - 接口权限的列表中,申请提高临时上限。 + * @param config res: var serverId = res.serverId; 返回音频的服务器端ID + */ + export const uploadVoice: (config: uploadVoiceConfig) => void + + /** + * serverId:需要下载的音频的服务器端ID,由uploadVoice接口获得 + * isShowProgressTips: 默认为1,显示进度提示 + */ + export interface downloadVoiceConfig { + serverId: string; + isShowProgressTips?: number; + success: (res: any) => void + } + + export const downloadVoice: (config: downloadVoiceConfig) => void + + /** + * success: res.translateResult,语音识别的结果 + */ + export interface translateVoiceConfig extends uploadVoiceConfig { + } + + /** + * 识别音频并返回识别结果接口 + * @param config + */ + export const translateVoice: (config: translateVoiceConfig) => void + + /** + * 获取网络状态, var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi + */ + export const getNetworkType: (success: (res: any) => void) => void + + interface openLocationConfig { + latitude: number; + longitude: number; + name: string; // 位置名 + address: string; // 地址详情说明 + scale: number; // 地图缩放级别,整形值,范围从1~28。默认为最大 + infoUrl: string; // 在查看位置界面底部显示的超链接,可点击跳转 + } + + /** + * 微信内置地图查看位置接口 + * @param config name:位置名,scale:地图缩放级别,整形值,范围从1~28。默认为最大 + * infoUrl: 在查看位置界面底部显示的超链接,可点击跳转 + */ + export const openLocation: (config: openLocationConfig) => void + + export interface Location { + latitude: number; + longitude: number; + speed: number; // 速度,以米/每秒计 + accuracy: number; // 位置精度 + } + + export interface getLocationConfig { + type: string //默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + success: (res: Location) => void + } + + /** + * 获取地理位置接口 + * @param config + */ + export const getLocation: (config: getLocationConfig) => void + + + /** + * ticket:摇周边的业务ticket, 系统自动添加在摇出来的页面链接后面 + * + */ + export interface startSearchBeaconsConfig { + ticket: string; + complete: (argv: any) => void + } + + /** + * 开启查找周边ibeacon设备接口 + * @param config + */ + export const startSearchBeacons: (config: startSearchBeaconsConfig) => void + + + export interface stopSearchBeaconsConfig { + complete: (res: any) => void + } + /** + * 关闭查找完成后的回调函数 + */ + export const stopSearchBeacons: (config: stopSearchBeaconsConfig) => void + + + export interface onSearchBeaconsConfig { + complete: (argv: any) => void + } + /** + * 监听周边ibeacon设备接口, + * 摇一摇周边接口使用注意事项及更多返回结果说明,请参考:摇一摇周边获取设备信息 + */ + export const onSearchBeacons: (config: onSearchBeaconsConfig) => void + + /** + * 关闭当前网页窗口接口 + */ + export const closeWindow: () => void + + + export interface menuItemsConfig { + menuList: string[] // 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 + } + + /** + * 批量隐藏功能按钮接口 + */ + export const hideMenuItems: (config: menuItemsConfig) => void + + /** + * 批量显示功能按钮接口 + */ + export const showMenuItems: (config: menuItemsConfig) => void + + /** + * 隐藏所有非基础按钮接口 + */ + export const hideAllNonBaseMenuItem: () => void + + /** + * 显示所有功能按钮接口 + */ + export const showAllNonBaseMenuItem: () => void + + /** + * needResult: 默认为0,扫描结果由微信处理,1则直接返回扫描结果, + * scanType:["qrCode","barCode"],可以指定扫二维码还是一维码,默认二者都有 + * success: var result = res.resultStr; 当needResult 为 1 时,扫码返回的结果 + */ + export interface scanQRCodeConfig { + needResult?: number; + scanType?: string[]; + success: (res: any) => void + } + + /** + * 调起微信扫一扫接口 + */ + export const scanQRCode: (config: scanQRCodeConfig) => void + + /** + * productId:商品id + * viewType: 0.默认值,普通商品详情页1.扫一扫商品详情页2.小店商品详情页 + */ + export interface openProductSpecificViewConfig { + productId: string; + viewType?: string; + } + + /** + * 跳转微信商品页接口 + * @param config + */ + export const openProductSpecificView: (config: openProductSpecificViewConfig) => void + + + /** + * shopId: 门店Id + * cardType:卡券类型 + * cardId:卡券Id + * timestamp:卡券签名时间戳 + * nonceStr:卡券签名随机串 + * signtype:签名方式,默认'SHA1' + * cardsign:卡券签名 + * success: var cardList= res.cardList; 用户选中的卡券列表信息 + */ + export interface chooseCardConfig { + shopId?: string; + cardType?: string; + cardId?: string; + timestamp: number; + nonceStr: string; + signType: string; + cardSign: string; + success: (res: any) => void + } + + /** + * 拉取适用卡券列表并获取用户选择信息 + * @param config + */ + export const chooseCard: (config: chooseCardConfig) => void + + export class AddCardObj { + cardId: string; + cardExt: string; + } + + /** + * res: var cardList = res.cardList; 添加的卡券列表信息 + */ + export interface addCardConfig { + cardList: AddCardObj[]; + success: (res: any) => void; + } + + /** + * 批量添加卡券接口 + */ + export const addCard: (config: addCardConfig) => void + + export class OpenCardObj { + cardId: string; + code: string; + } + + /** + * 需要打开的卡券列表 + */ + export interface openCardConfig { + cardList: OpenCardObj[]; + } + + /** + * 查看微信卡包中的卡券接口 + */ + export const openCard: (config: openCardConfig) => void + + /** + * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + * nonceStr: 支付签名随机串,不长于 32 位 + * package: 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=*** + * signType: 签名方式,默认为'SHA1',使用新版支付需传入'MD5' + * paySign: 支付签名 + * success: 支付成功后的回调函数 + */ + export interface chooseWXPayConfig { + timestamp: number; + nonceStr: string; + package: string; + signType: string; + paySign: string; + success: (res: any) => void; + } + + /** + * 发起一个微信支付请求 + * @param config + */ + export const chooseWXPay: (config: chooseWXPayConfig) => void + +} + + + diff --git a/types/wx-js-sdk/tsconfig.json b/types/wx-js-sdk/tsconfig.json new file mode 100644 index 0000000000..ee30dc2a86 --- /dev/null +++ b/types/wx-js-sdk/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "wx-js-sdk-tests.ts" + ] +} diff --git a/types/wx-js-sdk/tslint.json b/types/wx-js-sdk/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/wx-js-sdk/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/wx-js-sdk/wx-js-sdk-tests.ts b/types/wx-js-sdk/wx-js-sdk-tests.ts new file mode 100644 index 0000000000..e69de29bb2 From 21e54ba7e5747dcb2e42ba7b7c3a7c3e69a8f22c Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 19 Jul 2017 23:34:41 +0800 Subject: [PATCH 0002/2268] rename to wx-js-sdk-dt --- types/{wx-js-sdk => wx-js-sdk-dt}/index.d.ts | 0 types/{wx-js-sdk => wx-js-sdk-dt}/tsconfig.json | 2 +- types/{wx-js-sdk => wx-js-sdk-dt}/tslint.json | 0 .../wx-js-sdk-tests.ts => wx-js-sdk-dt/wx-js-sdk-dt-tests.ts} | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename types/{wx-js-sdk => wx-js-sdk-dt}/index.d.ts (100%) rename types/{wx-js-sdk => wx-js-sdk-dt}/tsconfig.json (92%) rename types/{wx-js-sdk => wx-js-sdk-dt}/tslint.json (100%) rename types/{wx-js-sdk/wx-js-sdk-tests.ts => wx-js-sdk-dt/wx-js-sdk-dt-tests.ts} (100%) diff --git a/types/wx-js-sdk/index.d.ts b/types/wx-js-sdk-dt/index.d.ts similarity index 100% rename from types/wx-js-sdk/index.d.ts rename to types/wx-js-sdk-dt/index.d.ts diff --git a/types/wx-js-sdk/tsconfig.json b/types/wx-js-sdk-dt/tsconfig.json similarity index 92% rename from types/wx-js-sdk/tsconfig.json rename to types/wx-js-sdk-dt/tsconfig.json index ee30dc2a86..780e3ab13c 100644 --- a/types/wx-js-sdk/tsconfig.json +++ b/types/wx-js-sdk-dt/tsconfig.json @@ -17,6 +17,6 @@ }, "files": [ "index.d.ts", - "wx-js-sdk-tests.ts" + "wx-js-sdk-dt-tests.ts" ] } diff --git a/types/wx-js-sdk/tslint.json b/types/wx-js-sdk-dt/tslint.json similarity index 100% rename from types/wx-js-sdk/tslint.json rename to types/wx-js-sdk-dt/tslint.json diff --git a/types/wx-js-sdk/wx-js-sdk-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts similarity index 100% rename from types/wx-js-sdk/wx-js-sdk-tests.ts rename to types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts From a085a30eacaff618f61dc81b030e43502a6b8544 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 20 Jul 2017 00:59:01 +0800 Subject: [PATCH 0003/2268] fix lint errors --- types/wx-js-sdk-dt/index.d.ts | 229 +++++++++++------------ types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts | 7 + 2 files changed, 119 insertions(+), 117 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index e11f835bd4..321e6a2f09 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -1,13 +1,27 @@ +// Type definitions for wx-js-sdk 1.2 +// Project: https://res.wx.qq.com/open/js/jweixin-1.2.0.js +// Definitions by: Bian Zhongjie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export namespace wx { + interface wxconfig { + // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + debug: boolean; - export interface wxconfig { - debug: boolean; // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - appId: string; //公众号的唯一标识 - timestamp: number; //签名的时间戳 - nonceStr: string; //签名的随机串 - signature: string; //签名 - jsApiList: string[] //需要使用的JS接口列表 + // 公众号的唯一标识 + appId: string; + + // 签名的时间戳 + timestamp: number; + + // 签名的随机串 + nonceStr: string; + + // 签名 + signature: string; + + // 需要使用的JS接口列表 + jsApiList: string[]; } /** @@ -15,43 +29,43 @@ export namespace wx { * @param setting 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 * jsApiList[] 需要使用的JS接口列表 */ - export const config: (setting: wxconfig) => void + function config(setting: wxconfig): void; /** * config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。 * @param x */ - export const ready: (x: () => void ) => void; + function ready(x: () => void ): void; /** * config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 */ - export const error: (err: (res: any) => void) => void - + function error(err: (res: any) => void): void; /** * 判断当前客户端版本是否支持指定JS接口,checkJsApi接口是客户端6.0.2新引入的一个预留接口,第一期开放的接口均可不使用checkJsApi来检测 */ - export interface checkApiConfig { - jsApiList: string[]; //需要检测的JS接口列表 + interface checkApiConfig { + // 需要检测的JS接口列表 + jsApiList: string[]; // 以键值对的形式返回,可用的api值true,不可用为false // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"} - success: (res: {checkResult: {[methodName: string]: boolean}, errMsg: {msg: string}}) => void + success(res: {checkResult: {[methodName: string]: boolean}, errMsg: {msg: string}}): void; } /** * 判断当前客户端版本是否支持指定JS接口 * @param setting */ - export const checkJsApi: (setting: checkApiConfig) => void + function checkJsApi(setting: checkApiConfig): void; - export interface shareTimelineConfig { + interface ShareTimelineConfig { title: string; // 分享标题 link: string; // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: string; // 分享图标 - success: () => void; - cancel: () => void + success(): void; + cancel(): void; } /** @@ -59,10 +73,9 @@ export namespace wx { * * @param setting itle分享标题 ,link分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl分享图标, success用户确认分享后执行的回调函数 */ - export const onMenuShareTimeline: (setting: shareTimelineConfig) => void + function onMenuShareTimeline(setting: ShareTimelineConfig): void; - - export interface shareAppMessage extends shareTimelineConfig { + interface shareAppMessage extends ShareTimelineConfig { desc: string; // 分享描述 type?: string; // 分享类型,music、video或link,不填默认为link dataUrl?: string; // 如果type是music或video,则要提供数据链接,默认为空 @@ -73,56 +86,51 @@ export namespace wx { * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl 分享图标,type 分享类型,music、video或link,不填默认为link * dataUrl如果type是music或video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 */ - export const onMenuShareAppMessage: (setting: shareAppMessage) => void + function onMenuShareAppMessage(setting: shareAppMessage): void; - export interface menuShareQQ extends shareTimelineConfig { + interface menuShareQQ extends ShareTimelineConfig { desc: string; // 分享描述 } /** * “分享到QQ”按钮点击状态及自定义分享内容接口 */ - export const onMenuShareQQ: (config: menuShareQQ) => void + function onMenuShareQQ(config: menuShareQQ): void; - - export interface menuShareWeibo extends shareTimelineConfig { + interface MenuShareWeibo extends ShareTimelineConfig { desc: string; // 分享描述 } /** * 获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口 */ - export const onMenuShareWeibo: (config: menuShareWeibo) => void - - - export interface menuShareQZone extends menuShareWeibo { - } + function onMenuShareWeibo(config: MenuShareWeibo): void; /** * 获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 */ - export const onMenuShareQzone: (config: menuShareQZone) => void + function onMenuShareQzone(config: MenuShareWeibo): void; /** * count默认9, sizeType指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 * var localIds = res.localIds; 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 */ - export interface chooseImageConfig { + interface chooseImageConfig { count: number; // 默认9 sizeType: string[]; // 可以指定是原图还是压缩图,默认二者都有 sourceType: string[]; // 可以指定来源是相册还是相机,默认二者都有 - success: (res: any) => void // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + success(res: any): void; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 } /** * 拍照或从手机相册中选图接口 */ - export const chooseImage: (config: chooseImageConfig) => void + function chooseImage(config: chooseImageConfig): void; /** * current:当前显示图片的http链接, urls:需要预览的图片http链接列表 */ - export interface previewImageConfig { + interface previewImageConfig { current: string; // 当前显示图片的http链接 urls: string[]; // 需要预览的图片http链接列表 } @@ -131,125 +139,119 @@ export namespace wx { *  预览图片接口 * @param config */ - export const previewImage: (config: previewImageConfig) => void + function previewImage(config: previewImageConfig): void; /** * localId:要上传的图片的本地ID,由chooseImage接口获得 * isShowProgressTips:默认为1,显示进度提示 * res: var serverId = res.serverId; 返回图片的服务器端ID */ - export interface uploadImageConfig { + interface uploadImageConfig { localId: string; isShowProgressTips?: number; - success: (res: any) => void + success(res: any): void; } - export const uploadImage: (config: uploadImageConfig) => void + function uploadImage(config: uploadImageConfig): void; /** * serverId:需要下载的图片的服务器端ID,由uploadImage接口获得 * res: var localId = res.localId; 返回图片下载后的本地ID */ - export interface downLoadImageConfig { + interface downLoadImageConfig { serverId: string; isShowProgressTips?: number; - success: (res: any) => void + success(res: any): void; } - export const downLoadImage: (config: downLoadImageConfig) => void + function downLoadImage(config: downLoadImageConfig): void; /** * locallId: 图片的localID */ - export interface getLocalImgDataConfig { + interface getLocalImgDataConfig { localId: string; - success: (res: any) => void + success(res: any): void; } /** * 获取本地图片接口,此接口仅在 iOS WKWebview 下提供,用于兼容 iOS WKWebview 不支持 localId 直接显示图片的问题 */ - export const getLocalImgData: (config: getLocalImgDataConfig) => void + function getLocalImgData(config: getLocalImgDataConfig): void; /** * 开始录音 */ - export const startRecord: () => void + function startRecord(): void; /** * 停止录音 * res: var localId = res.localId; */ - export const stopRecord: (success: (res: any) => void) => void + function stopRecord(success: (res: any) => void): void; /** * 录音时间超过一分钟没有停止的时候会执行 complete 回调 * @param complete :var localId = res.localId; */ - export const onVoiceRecordEnd: (complete: (res: any) => void) => void + function onVoiceRecordEnd(complete: (res: any) => void): void; /** * 需要播放的音频的本地ID,由stopRecord接口获得 * @param localId */ - export const playVoice: (localId: string) => void + function playVoice(localId: string): void; /** * 需要暂停的音频的本地ID,由stopRecord接口获得 */ - export const pauseVoice: (localId: string) => void + function pauseVoice(localId: string): void; /** * 需要停止的音频的本地ID,由stopRecord接口获得 */ - export const stopVoice: (localId: string) => void + function stopVoice(localId: string): void; /** * res: var localId = res.localId; 返回音频的本地ID */ - export const onVoicePlayEnd: (success: (res: any) => void) => void + function onVoicePlayEnd(success: (res: any) => void): void; - interface uploadVoiceConfig { + interface UploadVoiceConfig { localId: string; isShowProgressTips?: number; - success: (res: any) => void - } + success(res: any): void; + } /** * 上传语音接口,上传语音有效期3天,可用微信多媒体接口下载语音到自己的服务器, * 此处获得的 serverId 即 media_id,参考文档 .目前多媒体文件下载接口的频率限制为10000次/天,如需要调高频率,请登录微信公众平台,在开发 - 接口权限的列表中,申请提高临时上限。 * @param config res: var serverId = res.serverId; 返回音频的服务器端ID */ - export const uploadVoice: (config: uploadVoiceConfig) => void + function uploadVoice(config: UploadVoiceConfig): void; /** * serverId:需要下载的音频的服务器端ID,由uploadVoice接口获得 * isShowProgressTips: 默认为1,显示进度提示 */ - export interface downloadVoiceConfig { + interface downloadVoiceConfig { serverId: string; isShowProgressTips?: number; - success: (res: any) => void + success(res: any): void; } - export const downloadVoice: (config: downloadVoiceConfig) => void - - /** - * success: res.translateResult,语音识别的结果 - */ - export interface translateVoiceConfig extends uploadVoiceConfig { - } + function downloadVoice(config: downloadVoiceConfig): void; /** * 识别音频并返回识别结果接口 * @param config */ - export const translateVoice: (config: translateVoiceConfig) => void + function translateVoice(config: UploadVoiceConfig): void; /** * 获取网络状态, var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi */ - export const getNetworkType: (success: (res: any) => void) => void + function getNetworkType(success: (res: any) => void): void; interface openLocationConfig { latitude: number; @@ -265,112 +267,110 @@ export namespace wx { * @param config name:位置名,scale:地图缩放级别,整形值,范围从1~28。默认为最大 * infoUrl: 在查看位置界面底部显示的超链接,可点击跳转 */ - export const openLocation: (config: openLocationConfig) => void + function openLocation(config: openLocationConfig): void; - export interface Location { + interface Location { latitude: number; longitude: number; speed: number; // 速度,以米/每秒计 accuracy: number; // 位置精度 } - export interface getLocationConfig { - type: string //默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' - success: (res: Location) => void + interface getLocationConfig { + // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + type: string; + success(res: Location): void; } /** * 获取地理位置接口 * @param config */ - export const getLocation: (config: getLocationConfig) => void - + function getLocation(config: getLocationConfig): void; /** * ticket:摇周边的业务ticket, 系统自动添加在摇出来的页面链接后面 * */ - export interface startSearchBeaconsConfig { + interface startSearchBeaconsConfig { ticket: string; - complete: (argv: any) => void + complete(argv: any): void; } /** * 开启查找周边ibeacon设备接口 * @param config */ - export const startSearchBeacons: (config: startSearchBeaconsConfig) => void + function startSearchBeacons(config: startSearchBeaconsConfig): void; - - export interface stopSearchBeaconsConfig { - complete: (res: any) => void + interface stopSearchBeaconsConfig { + complete(res: any): void; } + /** * 关闭查找完成后的回调函数 */ - export const stopSearchBeacons: (config: stopSearchBeaconsConfig) => void + function stopSearchBeacons(config: stopSearchBeaconsConfig): void; - - export interface onSearchBeaconsConfig { - complete: (argv: any) => void + interface onSearchBeaconsConfig { + complete(argv: any): void; } /** * 监听周边ibeacon设备接口, * 摇一摇周边接口使用注意事项及更多返回结果说明,请参考:摇一摇周边获取设备信息 */ - export const onSearchBeacons: (config: onSearchBeaconsConfig) => void + function onSearchBeacons(config: onSearchBeaconsConfig): void; /** * 关闭当前网页窗口接口 */ - export const closeWindow: () => void + function closeWindow(): void; - - export interface menuItemsConfig { - menuList: string[] // 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 + interface menuItemsConfig { + menuList: string[]; // 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 } /** * 批量隐藏功能按钮接口 */ - export const hideMenuItems: (config: menuItemsConfig) => void + function hideMenuItems(config: menuItemsConfig): void; /** * 批量显示功能按钮接口 */ - export const showMenuItems: (config: menuItemsConfig) => void + function showMenuItems(config: menuItemsConfig): void; /** * 隐藏所有非基础按钮接口 */ - export const hideAllNonBaseMenuItem: () => void + function hideAllNonBaseMenuItem(): void; /** * 显示所有功能按钮接口 */ - export const showAllNonBaseMenuItem: () => void + function showAllNonBaseMenuItem(): void; /** * needResult: 默认为0,扫描结果由微信处理,1则直接返回扫描结果, * scanType:["qrCode","barCode"],可以指定扫二维码还是一维码,默认二者都有 * success: var result = res.resultStr; 当needResult 为 1 时,扫码返回的结果 */ - export interface scanQRCodeConfig { + interface scanQRCodeConfig { needResult?: number; scanType?: string[]; - success: (res: any) => void + success(res: any): void; } /** * 调起微信扫一扫接口 */ - export const scanQRCode: (config: scanQRCodeConfig) => void + function scanQRCode(config: scanQRCodeConfig): void; /** * productId:商品id * viewType: 0.默认值,普通商品详情页1.扫一扫商品详情页2.小店商品详情页 */ - export interface openProductSpecificViewConfig { + interface openProductSpecificViewConfig { productId: string; viewType?: string; } @@ -379,8 +379,7 @@ export namespace wx { * 跳转微信商品页接口 * @param config */ - export const openProductSpecificView: (config: openProductSpecificViewConfig) => void - + function openProductSpecificView(config: openProductSpecificViewConfig): void; /** * shopId: 门店Id @@ -392,7 +391,7 @@ export namespace wx { * cardsign:卡券签名 * success: var cardList= res.cardList; 用户选中的卡券列表信息 */ - export interface chooseCardConfig { + interface chooseCardConfig { shopId?: string; cardType?: string; cardId?: string; @@ -400,16 +399,16 @@ export namespace wx { nonceStr: string; signType: string; cardSign: string; - success: (res: any) => void + success(res: any): void; } /** * 拉取适用卡券列表并获取用户选择信息 * @param config */ - export const chooseCard: (config: chooseCardConfig) => void + function chooseCard(config: chooseCardConfig): void; - export class AddCardObj { + class AddCardObj { cardId: string; cardExt: string; } @@ -417,17 +416,17 @@ export namespace wx { /** * res: var cardList = res.cardList; 添加的卡券列表信息 */ - export interface addCardConfig { + interface addCardConfig { cardList: AddCardObj[]; - success: (res: any) => void; + success(res: any): void; } /** * 批量添加卡券接口 */ - export const addCard: (config: addCardConfig) => void + function addCard(config: addCardConfig): void; - export class OpenCardObj { + class OpenCardObj { cardId: string; code: string; } @@ -435,14 +434,14 @@ export namespace wx { /** * 需要打开的卡券列表 */ - export interface openCardConfig { + interface openCardConfig { cardList: OpenCardObj[]; } /** * 查看微信卡包中的卡券接口 */ - export const openCard: (config: openCardConfig) => void + function openCard(config: openCardConfig): void; /** * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 @@ -452,22 +451,18 @@ export namespace wx { * paySign: 支付签名 * success: 支付成功后的回调函数 */ - export interface chooseWXPayConfig { + interface chooseWXPayConfig { timestamp: number; nonceStr: string; package: string; signType: string; paySign: string; - success: (res: any) => void; + success(res: any): void; } /** * 发起一个微信支付请求 * @param config */ - export const chooseWXPay: (config: chooseWXPayConfig) => void - + function chooseWXPay(config: chooseWXPayConfig): void; } - - - diff --git a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts index e69de29bb2..429306e7c1 100644 --- a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts +++ b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts @@ -0,0 +1,7 @@ +// No npm package for wx-js-sdk, source location is: https://res.wx.qq.com/open/js/jweixin-1.2.0.js +declare const wx: any; +wx.config({ + nonceStr: '', + signature: '', + jsApiList: [''] +}); From 3301404c0c6434b358cb0a1d972f176139637e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Thu, 20 Jul 2017 10:24:45 +0800 Subject: [PATCH 0004/2268] Change some definitions and add some tests. --- types/wx-js-sdk-dt/index.d.ts | 120 +++++++++++------------ types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts | 105 +++++++++++++++++++- 2 files changed, 164 insertions(+), 61 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index 321e6a2f09..1edbc1eb65 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -1,12 +1,12 @@ // Type definitions for wx-js-sdk 1.2 -// Project: https://res.wx.qq.com/open/js/jweixin-1.2.0.js +// Project: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115 // Definitions by: Bian Zhongjie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export namespace wx { +declare namespace wx { interface wxconfig { // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - debug: boolean; + debug?: boolean; // 公众号的唯一标识 appId: string; @@ -45,7 +45,7 @@ export namespace wx { /** * 判断当前客户端版本是否支持指定JS接口,checkJsApi接口是客户端6.0.2新引入的一个预留接口,第一期开放的接口均可不使用checkJsApi来检测 */ - interface checkApiConfig { + interface CheckApiConfig { // 需要检测的JS接口列表 jsApiList: string[]; @@ -58,14 +58,14 @@ export namespace wx { * 判断当前客户端版本是否支持指定JS接口 * @param setting */ - function checkJsApi(setting: checkApiConfig): void; + function checkJsApi(setting: CheckApiConfig): void; interface ShareTimelineConfig { title: string; // 分享标题 link: string; // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: string; // 分享图标 - success(): void; - cancel(): void; + imgUrl?: string; // 分享图标 + success?(): void; + cancel?(): void; } /** @@ -75,7 +75,7 @@ export namespace wx { */ function onMenuShareTimeline(setting: ShareTimelineConfig): void; - interface shareAppMessage extends ShareTimelineConfig { + interface SharedAppMessage extends ShareTimelineConfig { desc: string; // 分享描述 type?: string; // 分享类型,music、video或link,不填默认为link dataUrl?: string; // 如果type是music或video,则要提供数据链接,默认为空 @@ -86,16 +86,16 @@ export namespace wx { * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl 分享图标,type 分享类型,music、video或link,不填默认为link * dataUrl如果type是music或video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 */ - function onMenuShareAppMessage(setting: shareAppMessage): void; + function onMenuShareAppMessage(setting: SharedAppMessage): void; - interface menuShareQQ extends ShareTimelineConfig { + interface MenuShareQQ extends ShareTimelineConfig { desc: string; // 分享描述 } /** * “分享到QQ”按钮点击状态及自定义分享内容接口 */ - function onMenuShareQQ(config: menuShareQQ): void; + function onMenuShareQQ(config: MenuShareQQ): void; interface MenuShareWeibo extends ShareTimelineConfig { desc: string; // 分享描述 @@ -115,22 +115,22 @@ export namespace wx { * count默认9, sizeType指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 * var localIds = res.localIds; 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 */ - interface chooseImageConfig { - count: number; // 默认9 - sizeType: string[]; // 可以指定是原图还是压缩图,默认二者都有 - sourceType: string[]; // 可以指定来源是相册还是相机,默认二者都有 - success(res: any): void; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + interface ChooseImageConfig { + count?: number; // 默认9 + sizeType?: string[]; // 可以指定是原图还是压缩图,默认二者都有 + sourceType?: string[]; // 可以指定来源是相册还是相机,默认二者都有 + success(res: { localIds: string[]}): void; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 } /** * 拍照或从手机相册中选图接口 */ - function chooseImage(config: chooseImageConfig): void; + function chooseImage(config: ChooseImageConfig): void; /** * current:当前显示图片的http链接, urls:需要预览的图片http链接列表 */ - interface previewImageConfig { + interface PreviewImageConfig { current: string; // 当前显示图片的http链接 urls: string[]; // 需要预览的图片http链接列表 } @@ -139,32 +139,32 @@ export namespace wx { *  预览图片接口 * @param config */ - function previewImage(config: previewImageConfig): void; + function previewImage(config: PreviewImageConfig): void; /** * localId:要上传的图片的本地ID,由chooseImage接口获得 * isShowProgressTips:默认为1,显示进度提示 * res: var serverId = res.serverId; 返回图片的服务器端ID */ - interface uploadImageConfig { + interface UploadImageConfig { localId: string; isShowProgressTips?: number; success(res: any): void; } - function uploadImage(config: uploadImageConfig): void; + function uploadImage(config: UploadImageConfig): void; /** * serverId:需要下载的图片的服务器端ID,由uploadImage接口获得 * res: var localId = res.localId; 返回图片下载后的本地ID */ - interface downLoadImageConfig { + interface DownLoadImageConfig { serverId: string; isShowProgressTips?: number; - success(res: any): void; + success?(res: any): void; } - function downLoadImage(config: downLoadImageConfig): void; + function downloadImage(config: DownLoadImageConfig): void; /** * locallId: 图片的localID @@ -251,15 +251,15 @@ export namespace wx { /** * 获取网络状态, var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi */ - function getNetworkType(success: (res: any) => void): void; + function getNetworkType(success: (res: { networkType: string }) => void): void; - interface openLocationConfig { - latitude: number; - longitude: number; - name: string; // 位置名 - address: string; // 地址详情说明 - scale: number; // 地图缩放级别,整形值,范围从1~28。默认为最大 - infoUrl: string; // 在查看位置界面底部显示的超链接,可点击跳转 + interface OpenLocationConfig { + latitude?: number; + longitude?: number; + name?: string; // 位置名 + address?: string; // 地址详情说明 + scale?: number; // 地图缩放级别,整形值,范围从1~28。默认为最大 + infoUrl?: string; // 在查看位置界面底部显示的超链接,可点击跳转 } /** @@ -267,7 +267,7 @@ export namespace wx { * @param config name:位置名,scale:地图缩放级别,整形值,范围从1~28。默认为最大 * infoUrl: 在查看位置界面底部显示的超链接,可点击跳转 */ - function openLocation(config: openLocationConfig): void; + function openLocation(config: OpenLocationConfig): void; interface Location { latitude: number; @@ -276,9 +276,9 @@ export namespace wx { accuracy: number; // 位置精度 } - interface getLocationConfig { + interface GetLocationConfig { // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' - type: string; + type?: string; success(res: Location): void; } @@ -286,13 +286,13 @@ export namespace wx { * 获取地理位置接口 * @param config */ - function getLocation(config: getLocationConfig): void; + function getLocation(config: GetLocationConfig): void; /** * ticket:摇周边的业务ticket, 系统自动添加在摇出来的页面链接后面 * */ - interface startSearchBeaconsConfig { + interface StartSearchBeaconsConfig { ticket: string; complete(argv: any): void; } @@ -301,16 +301,16 @@ export namespace wx { * 开启查找周边ibeacon设备接口 * @param config */ - function startSearchBeacons(config: startSearchBeaconsConfig): void; + function startSearchBeacons(config: StartSearchBeaconsConfig): void; - interface stopSearchBeaconsConfig { + interface StopSearchBeaconsConfig { complete(res: any): void; } /** * 关闭查找完成后的回调函数 */ - function stopSearchBeacons(config: stopSearchBeaconsConfig): void; + function stopSearchBeacons(config: StopSearchBeaconsConfig): void; interface onSearchBeaconsConfig { complete(argv: any): void; @@ -326,19 +326,19 @@ export namespace wx { */ function closeWindow(): void; - interface menuItemsConfig { + interface MenuItemsConfig { menuList: string[]; // 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 } /** * 批量隐藏功能按钮接口 */ - function hideMenuItems(config: menuItemsConfig): void; + function hideMenuItems(config: MenuItemsConfig): void; /** * 批量显示功能按钮接口 */ - function showMenuItems(config: menuItemsConfig): void; + function showMenuItems(config: MenuItemsConfig): void; /** * 隐藏所有非基础按钮接口 @@ -355,22 +355,22 @@ export namespace wx { * scanType:["qrCode","barCode"],可以指定扫二维码还是一维码,默认二者都有 * success: var result = res.resultStr; 当needResult 为 1 时,扫码返回的结果 */ - interface scanQRCodeConfig { + interface ScanQRCodeConfig { needResult?: number; scanType?: string[]; - success(res: any): void; + success?(res: any): void; } /** * 调起微信扫一扫接口 */ - function scanQRCode(config: scanQRCodeConfig): void; + function scanQRCode(config: ScanQRCodeConfig): void; /** * productId:商品id * viewType: 0.默认值,普通商品详情页1.扫一扫商品详情页2.小店商品详情页 */ - interface openProductSpecificViewConfig { + interface OpenProductSpecificViewConfig { productId: string; viewType?: string; } @@ -379,7 +379,7 @@ export namespace wx { * 跳转微信商品页接口 * @param config */ - function openProductSpecificView(config: openProductSpecificViewConfig): void; + function openProductSpecificView(config: OpenProductSpecificViewConfig): void; /** * shopId: 门店Id @@ -391,7 +391,7 @@ export namespace wx { * cardsign:卡券签名 * success: var cardList= res.cardList; 用户选中的卡券列表信息 */ - interface chooseCardConfig { + interface ChooseCardConfig { shopId?: string; cardType?: string; cardId?: string; @@ -399,14 +399,14 @@ export namespace wx { nonceStr: string; signType: string; cardSign: string; - success(res: any): void; + success?(res: any): void; } /** * 拉取适用卡券列表并获取用户选择信息 * @param config */ - function chooseCard(config: chooseCardConfig): void; + function chooseCard(config: ChooseCardConfig): void; class AddCardObj { cardId: string; @@ -416,15 +416,15 @@ export namespace wx { /** * res: var cardList = res.cardList; 添加的卡券列表信息 */ - interface addCardConfig { + interface AddCardConfig { cardList: AddCardObj[]; - success(res: any): void; + success?(res: any): void; } /** * 批量添加卡券接口 */ - function addCard(config: addCardConfig): void; + function addCard(config: AddCardConfig): void; class OpenCardObj { cardId: string; @@ -434,14 +434,14 @@ export namespace wx { /** * 需要打开的卡券列表 */ - interface openCardConfig { + interface OpenCardConfig { cardList: OpenCardObj[]; } /** * 查看微信卡包中的卡券接口 */ - function openCard(config: openCardConfig): void; + function openCard(config: OpenCardConfig): void; /** * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 @@ -451,11 +451,11 @@ export namespace wx { * paySign: 支付签名 * success: 支付成功后的回调函数 */ - interface chooseWXPayConfig { + interface ChooseWXPayConfig { timestamp: number; nonceStr: string; package: string; - signType: string; + signType?: string; paySign: string; success(res: any): void; } @@ -464,5 +464,5 @@ export namespace wx { * 发起一个微信支付请求 * @param config */ - function chooseWXPay(config: chooseWXPayConfig): void; + function chooseWXPay(config: ChooseWXPayConfig): void; } diff --git a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts index 429306e7c1..81ba2e9b80 100644 --- a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts +++ b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts @@ -1,7 +1,110 @@ // No npm package for wx-js-sdk, source location is: https://res.wx.qq.com/open/js/jweixin-1.2.0.js -declare const wx: any; + wx.config({ + appId: '', + timestamp: 123, nonceStr: '', signature: '', jsApiList: [''] }); + +wx.ready(() => { +}); + +wx.error((res: any) => { +}); + +wx.checkJsApi({ + jsApiList: [''], + success: (res) => { + } +}); + +wx.onMenuShareAppMessage({ + desc: '', + title: '', + link: '', + imgUrl: '' +}); + +wx.scanQRCode({ +}); + +wx.closeWindow(); + +wx.downloadImage({ + serverId: '' +}); + +wx.addCard({ + cardList: [ + { + cardId: '', + cardExt: '' + } + ] +}); + +wx.chooseImage({ + success: (res) => { + res.localIds; + } +}); + +wx.chooseWXPay({ + timestamp: 0, + nonceStr: '', + package: '', + paySign: '', + success: (res) => {} +}); + +wx.getLocation({ + success: (res) => { + if (res) { + res.accuracy; + res.latitude; + res.longitude; + res.speed; + } + } +}); + +wx.getNetworkType((res) => { + if (res) { + res.networkType; + } +}); + +wx.hideMenuItems({ + menuList: [] +}); + +wx.hideAllNonBaseMenuItem(); + +wx.onMenuShareQQ({ + title: '', + link: '', + desc: '' +}); + +wx.openLocation({ + name: '', + latitude: 123.2, + longitude: -12.23 +}); + +wx.openProductSpecificView({ + productId: '', + viewType: '' +}); + +wx.chooseCard({ + cardId: '', + shopId: '', + cardType: '', + cardSign: '', + nonceStr: '', + timestamp: 1, + signType: '' +}); From c87e766b76c6f78be7ffcad2e810d6defc69e869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Thu, 20 Jul 2017 12:28:35 +0800 Subject: [PATCH 0005/2268] Update comments --- types/wx-js-sdk-dt/index.d.ts | 240 ++++++++++++++++------- types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts | 5 + 2 files changed, 175 insertions(+), 70 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index 1edbc1eb65..d55d7fca4f 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -4,66 +4,96 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace wx { + /** + * 微信配置对象 + */ interface wxconfig { - // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + /** + * 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 + */ debug?: boolean; - // 公众号的唯一标识 + /** + * 公众号的唯一标识 + */ appId: string; - // 签名的时间戳 + /** + * 签名的时间戳 + */ timestamp: number; - // 签名的随机串 + /** + * 签名的随机串 + */ nonceStr: string; - // 签名 + /** + * 签名 + */ signature: string; - // 需要使用的JS接口列表 + /** + * 需要使用的JS接口列表 + */ jsApiList: string[]; } /** - * 通过config接口注入权限验证配置 - * @param setting 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - * jsApiList[] 需要使用的JS接口列表 + * 通过 config 接口注入权限验证配置 + * @param setting 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 + * jsApiList[] 需要使用的 JS 接口列表 */ function config(setting: wxconfig): void; /** - * config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。 + * config 信息验证后会执行 ready 方法,所有接口调用都必须在 config 接口获得结果之后,config 是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在 ready 函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在 ready 函数中。 * @param x */ function ready(x: () => void ): void; /** - * config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 + * config 信息验证失败会执行 error 函数,如签名过期导致验证失败,具体错误信息可以打开 config 的 debug 模式查看,也可以在返回的 res 参数中查看,对于 SPA 可以在这里更新签名。 */ function error(err: (res: any) => void): void; /** - * 判断当前客户端版本是否支持指定JS接口,checkJsApi接口是客户端6.0.2新引入的一个预留接口,第一期开放的接口均可不使用checkJsApi来检测 + * 判断当前客户端版本是否支持指定 JS 接口, checkJsApi 接口是客户端6.0.2新引入的一个预留接口,第一期开放的接口均可不使用 checkJsApi 来检测 */ interface CheckApiConfig { - // 需要检测的JS接口列表 + /** + * 需要检测的JS接口列表 + */ jsApiList: string[]; - // 以键值对的形式返回,可用的api值true,不可用为false - // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"} - success(res: {checkResult: {[methodName: string]: boolean}, errMsg: {msg: string}}): void; + /** + * 以键值对的形式返回,可用的 api 值 true,不可用为 false + * 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"} + */ + success(res: { checkResult: { [methodName: string]: boolean }, errMsg: { msg: string } }): void; } /** - * 判断当前客户端版本是否支持指定JS接口 - * @param setting + * 判断当前客户端版本是否支持指定 JS 接口 + * @param setting CheckApiConfig 对象 */ function checkJsApi(setting: CheckApiConfig): void; interface ShareTimelineConfig { - title: string; // 分享标题 - link: string; // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl?: string; // 分享图标 + /** + * 分享标题 + */ + title: string; + + /** + * 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致 + */ + link: string; + + /** + * 分享图标 + */ + imgUrl?: string; success?(): void; cancel?(): void; } @@ -71,25 +101,42 @@ declare namespace wx { /** * 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 * - * @param setting itle分享标题 ,link分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl分享图标, success用户确认分享后执行的回调函数 + * @param setting ShareTimelineConfig 对象 */ function onMenuShareTimeline(setting: ShareTimelineConfig): void; + /** + * 消息分享对象 + */ interface SharedAppMessage extends ShareTimelineConfig { - desc: string; // 分享描述 - type?: string; // 分享类型,music、video或link,不填默认为link - dataUrl?: string; // 如果type是music或video,则要提供数据链接,默认为空 + /** + * 分享描述 + */ + desc: string; + + /** + * 分享类型, music、video 或 link,不填默认为 link + */ + type?: string; + + /** + * 如果 type 是 music 或 video,则要提供数据链接,默认为空 + */ + dataUrl?: string; } /** * 获取“分享给朋友”按钮点击状态及自定义分享内容接口 - * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致, imgUrl 分享图标,type 分享类型,music、video或link,不填默认为link - * dataUrl如果type是music或video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 + * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致, imgUrl 分享图标,type 分享类型, music、video 或 link,不填默认为 link + * dataUrl 如果 type 是 music 或 video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 */ function onMenuShareAppMessage(setting: SharedAppMessage): void; interface MenuShareQQ extends ShareTimelineConfig { - desc: string; // 分享描述 + /** + * 分享描述 + */ + desc: string; } /** @@ -98,7 +145,10 @@ declare namespace wx { function onMenuShareQQ(config: MenuShareQQ): void; interface MenuShareWeibo extends ShareTimelineConfig { - desc: string; // 分享描述 + /** + * 分享描述 + */ + desc: string; } /** @@ -112,14 +162,29 @@ declare namespace wx { function onMenuShareQzone(config: MenuShareWeibo): void; /** - * count默认9, sizeType指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 - * var localIds = res.localIds; 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + * count 默认9, sizeType 指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 + * var localIds = res.localIds; 返回选定照片的本地ID列表,localId 可以作为 img 标签的 src 属性显示图片 */ interface ChooseImageConfig { - count?: number; // 默认9 - sizeType?: string[]; // 可以指定是原图还是压缩图,默认二者都有 - sourceType?: string[]; // 可以指定来源是相册还是相机,默认二者都有 - success(res: { localIds: string[]}): void; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + /** + * 照片数,默认9 + */ + count?: number; + + /** + * 可以指定是原图还是压缩图,默认二者都有 + */ + sizeType?: string[]; + + /** + * 可以指定来源是相册还是相机,默认二者都有 + */ + sourceType?: string[]; + + /** + * 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 + */ + success(res: { localIds: string[]}): void; } /** @@ -128,11 +193,17 @@ declare namespace wx { function chooseImage(config: ChooseImageConfig): void; /** - * current:当前显示图片的http链接, urls:需要预览的图片http链接列表 + * 显示照片预览用的配置对象 */ interface PreviewImageConfig { - current: string; // 当前显示图片的http链接 - urls: string[]; // 需要预览的图片http链接列表 + /** + * 当前显示图片的 http 链接 + */ + current: string; + /** + * 需要预览的图片 http 链接列表 + */ + urls: string[]; } /** @@ -142,9 +213,9 @@ declare namespace wx { function previewImage(config: PreviewImageConfig): void; /** - * localId:要上传的图片的本地ID,由chooseImage接口获得 - * isShowProgressTips:默认为1,显示进度提示 - * res: var serverId = res.serverId; 返回图片的服务器端ID + * localId:要上传的图片的本地 ID,由 chooseImage 接口获得 + * isShowProgressTips: 默认为1,显示进度提示 + * res: var serverId = res.serverId; 返回图片的服务器端 ID */ interface UploadImageConfig { localId: string; @@ -155,8 +226,8 @@ declare namespace wx { function uploadImage(config: UploadImageConfig): void; /** - * serverId:需要下载的图片的服务器端ID,由uploadImage接口获得 - * res: var localId = res.localId; 返回图片下载后的本地ID + * serverId: 需要下载的图片的服务器端ID,由 uploadImage 接口获得 + * res: var localId = res.localId; 返回图片下载后的本地 ID */ interface DownLoadImageConfig { serverId: string; @@ -167,7 +238,7 @@ declare namespace wx { function downloadImage(config: DownLoadImageConfig): void; /** - * locallId: 图片的localID + * locallId: 图片的 localID */ interface getLocalImgDataConfig { localId: string; @@ -197,23 +268,23 @@ declare namespace wx { function onVoiceRecordEnd(complete: (res: any) => void): void; /** - * 需要播放的音频的本地ID,由stopRecord接口获得 + * 需要播放的音频的本地 ID,由 stopRecord 接口获得 * @param localId */ function playVoice(localId: string): void; /** - * 需要暂停的音频的本地ID,由stopRecord接口获得 + * 需要暂停的音频的本地 ID,由 stopRecord 接口获得 */ function pauseVoice(localId: string): void; /** - * 需要停止的音频的本地ID,由stopRecord接口获得 + * 需要停止的音频的本地 ID,由 stopRecord 接口获得 */ function stopVoice(localId: string): void; /** - * res: var localId = res.localId; 返回音频的本地ID + * res: var localId = res.localId; 返回音频的本地 ID */ function onVoicePlayEnd(success: (res: any) => void): void; @@ -226,12 +297,12 @@ declare namespace wx { /** * 上传语音接口,上传语音有效期3天,可用微信多媒体接口下载语音到自己的服务器, * 此处获得的 serverId 即 media_id,参考文档 .目前多媒体文件下载接口的频率限制为10000次/天,如需要调高频率,请登录微信公众平台,在开发 - 接口权限的列表中,申请提高临时上限。 - * @param config res: var serverId = res.serverId; 返回音频的服务器端ID + * @param config res: var serverId = res.serverId; 返回音频的服务器端 ID */ function uploadVoice(config: UploadVoiceConfig): void; /** - * serverId:需要下载的音频的服务器端ID,由uploadVoice接口获得 + * serverId:需要下载的音频的服务器端 ID,由 uploadVoice 接口获得 * isShowProgressTips: 默认为1,显示进度提示 */ interface downloadVoiceConfig { @@ -249,35 +320,61 @@ declare namespace wx { function translateVoice(config: UploadVoiceConfig): void; /** - * 获取网络状态, var networkType = res.networkType; // 返回网络类型2g,3g,4g,wifi + * 获取网络状态, var networkType = res.networkType; 返回网络类型 2g,3g,4g,wifi */ function getNetworkType(success: (res: { networkType: string }) => void): void; interface OpenLocationConfig { latitude?: number; longitude?: number; - name?: string; // 位置名 - address?: string; // 地址详情说明 - scale?: number; // 地图缩放级别,整形值,范围从1~28。默认为最大 - infoUrl?: string; // 在查看位置界面底部显示的超链接,可点击跳转 + + /** + * 位置名 + */ + name?: string; + + /** + * 地址详情说明 + */ + address?: string; + + /** + * 地图缩放级别,整形值,范围从1~28。默认为最大 + */ + scale?: number; + + /** + * 在查看位置界面底部显示的超链接, 可点击跳转 + */ + infoUrl?: string; } /** * 微信内置地图查看位置接口 - * @param config name:位置名,scale:地图缩放级别,整形值,范围从1~28。默认为最大 - * infoUrl: 在查看位置界面底部显示的超链接,可点击跳转 + * @param config name: 位置名, scale: 地图缩放级别, 整形值, 范围从1~28。默认为最大 + * infoUrl: 在查看位置界面底部显示的超链接, 可点击跳转 */ function openLocation(config: OpenLocationConfig): void; interface Location { latitude: number; longitude: number; - speed: number; // 速度,以米/每秒计 - accuracy: number; // 位置精度 + + /** + * 速度,以米/每秒计 + */ + speed: number; + + /** + * 位置精度 + */ + accuracy: number; } interface GetLocationConfig { - // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + /** + * 默认为 wgs84 的 gps 坐标,如果要返回直接给 openLocation 用的火星坐标,可传入'gcj02' + */ type?: string; success(res: Location): void; } @@ -289,7 +386,7 @@ declare namespace wx { function getLocation(config: GetLocationConfig): void; /** - * ticket:摇周边的业务ticket, 系统自动添加在摇出来的页面链接后面 + * ticket:摇周边的业务 ticket, 系统自动添加在摇出来的页面链接后面 * */ interface StartSearchBeaconsConfig { @@ -298,7 +395,7 @@ declare namespace wx { } /** - * 开启查找周边ibeacon设备接口 + * 开启查找周边 ibeacon 设备接口 * @param config */ function startSearchBeacons(config: StartSearchBeaconsConfig): void; @@ -316,7 +413,7 @@ declare namespace wx { complete(argv: any): void; } /** - * 监听周边ibeacon设备接口, + * 监听周边 ibeacon 设备接口, * 摇一摇周边接口使用注意事项及更多返回结果说明,请参考:摇一摇周边获取设备信息 */ function onSearchBeacons(config: onSearchBeaconsConfig): void; @@ -327,7 +424,10 @@ declare namespace wx { function closeWindow(): void; interface MenuItemsConfig { - menuList: string[]; // 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 + /** + * 要隐藏/显示的菜单项,只能隐藏“传播类”和“保护类”按钮 + */ + menuList: string[]; } /** @@ -352,8 +452,8 @@ declare namespace wx { /** * needResult: 默认为0,扫描结果由微信处理,1则直接返回扫描结果, - * scanType:["qrCode","barCode"],可以指定扫二维码还是一维码,默认二者都有 - * success: var result = res.resultStr; 当needResult 为 1 时,扫码返回的结果 + * scanType:["qrCode","barCode"], 可以指定扫二维码还是一维码,默认二者都有 + * success: var result = res.resultStr; 当 needResult 为 1 时,扫码返回的结果 */ interface ScanQRCodeConfig { needResult?: number; @@ -368,7 +468,7 @@ declare namespace wx { /** * productId:商品id - * viewType: 0.默认值,普通商品详情页1.扫一扫商品详情页2.小店商品详情页 + * viewType: 0.默认值,普通商品详情页; 1.扫一扫商品详情页; 2.小店商品详情页 */ interface OpenProductSpecificViewConfig { productId: string; @@ -414,7 +514,7 @@ declare namespace wx { } /** - * res: var cardList = res.cardList; 添加的卡券列表信息 + * res: var cardList = res.cardList; 添加的卡券列表信息 */ interface AddCardConfig { cardList: AddCardObj[]; @@ -444,9 +544,9 @@ declare namespace wx { function openCard(config: OpenCardConfig): void; /** - * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的S字符 * nonceStr: 支付签名随机串,不长于 32 位 - * package: 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=*** + * package: 统一支付接口返回的 prepay_id 参数值,提交格式如:prepay_id=*** * signType: 签名方式,默认为'SHA1',使用新版支付需传入'MD5' * paySign: 支付签名 * success: 支付成功后的回调函数 diff --git a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts index 81ba2e9b80..84c97e6bf4 100644 --- a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts +++ b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts @@ -27,6 +27,11 @@ wx.onMenuShareAppMessage({ imgUrl: '' }); +wx.onMenuShareTimeline({ + title: '', + link: '' +}); + wx.scanQRCode({ }); From 751fa3012923f3ebfbd7576374ecef51e4127908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Thu, 20 Jul 2017 15:20:55 +0800 Subject: [PATCH 0006/2268] Update comments --- types/wx-js-sdk-dt/index.d.ts | 268 +++++++++++++++++++++------------- 1 file changed, 163 insertions(+), 105 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index d55d7fca4f..c775c1df68 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -7,7 +7,7 @@ declare namespace wx { /** * 微信配置对象 */ - interface wxconfig { + interface WxConfig { /** * 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 */ @@ -40,20 +40,20 @@ declare namespace wx { } /** - * 通过 config 接口注入权限验证配置 - * @param setting 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。 - * jsApiList[] 需要使用的 JS 接口列表 + * 初始化,做任何操作前必须调用该方法 + * @param setting 配置对象 */ - function config(setting: wxconfig): void; + function config(setting: WxConfig): void; /** - * config 信息验证后会执行 ready 方法,所有接口调用都必须在 config 接口获得结果之后,config 是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在 ready 函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在 ready 函数中。 - * @param x + * 配置微信初始化成功后的回调 + * @param x 回调 */ function ready(x: () => void ): void; /** - * config 信息验证失败会执行 error 函数,如签名过期导致验证失败,具体错误信息可以打开 config 的 debug 模式查看,也可以在返回的 res 参数中查看,对于 SPA 可以在这里更新签名。 + * 配置微信初始化失败后的回调 + * @param err 失败回调 */ function error(err: (res: any) => void): void; @@ -75,7 +75,6 @@ declare namespace wx { /** * 判断当前客户端版本是否支持指定 JS 接口 - * @param setting CheckApiConfig 对象 */ function checkJsApi(setting: CheckApiConfig): void; @@ -94,14 +93,20 @@ declare namespace wx { * 分享图标 */ imgUrl?: string; + + /** + * 分享成功后的回调 + */ success?(): void; + + /** + * 分享失败后的回调 + */ cancel?(): void; } /** * 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 - * - * @param setting ShareTimelineConfig 对象 */ function onMenuShareTimeline(setting: ShareTimelineConfig): void; @@ -127,8 +132,6 @@ declare namespace wx { /** * 获取“分享给朋友”按钮点击状态及自定义分享内容接口 - * @param setting title 标题,desc 分享描述,link 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致, imgUrl 分享图标,type 分享类型, music、video 或 link,不填默认为 link - * dataUrl 如果 type 是 music 或 video,则要提供数据链接,默认为空, success 用户确认分享后执行的回调函数, cancel 用户取消分享后执行的回调函数 */ function onMenuShareAppMessage(setting: SharedAppMessage): void; @@ -161,10 +164,6 @@ declare namespace wx { */ function onMenuShareQzone(config: MenuShareWeibo): void; - /** - * count 默认9, sizeType 指定是原图还是压缩图,默认二者都有,sourceType 可以指定来源是相册还是相机,默认二者都有 - * var localIds = res.localIds; 返回选定照片的本地ID列表,localId 可以作为 img 标签的 src 属性显示图片 - */ interface ChooseImageConfig { /** * 照片数,默认9 @@ -207,48 +206,64 @@ declare namespace wx { } /** - *  预览图片接口 - * @param config + * 预览图片接口 */ function previewImage(config: PreviewImageConfig): void; - /** - * localId:要上传的图片的本地 ID,由 chooseImage 接口获得 - * isShowProgressTips: 默认为1,显示进度提示 - * res: var serverId = res.serverId; 返回图片的服务器端 ID - */ interface UploadImageConfig { + /** + * localId:要上传的图片的本地 ID,由 chooseImage 接口获得 + */ localId: string; + + /** + * isShowProgressTips: 默认为1,显示进度提示 + */ isShowProgressTips?: number; + + /** + * res: var serverId = res.serverId; 返回图片的服务器端 ID + */ success(res: any): void; } + /** + * 上传图片 + */ function uploadImage(config: UploadImageConfig): void; - /** - * serverId: 需要下载的图片的服务器端ID,由 uploadImage 接口获得 - * res: var localId = res.localId; 返回图片下载后的本地 ID - */ interface DownLoadImageConfig { + /** + * serverId: 需要下载的图片的服务器端ID,由 uploadImage 接口获得 + */ serverId: string; + isShowProgressTips?: number; - success?(res: any): void; + + /** + * var localId = res.localId; 返回图片下载后的本地 ID + */ + success?(res: { localId: string }): void; } function downloadImage(config: DownLoadImageConfig): void; - /** - * locallId: 图片的 localID - */ - interface getLocalImgDataConfig { + interface GetLocalImgDataConfig { + /** + * 图片的 localID + */ localId: string; - success(res: any): void; + + /** + * 成功后的回调, localData是图片的base64数据,可以用img标签显示 + */ + success(res: { localData: string} ): void; } /** * 获取本地图片接口,此接口仅在 iOS WKWebview 下提供,用于兼容 iOS WKWebview 不支持 localId 直接显示图片的问题 */ - function getLocalImgData(config: getLocalImgDataConfig): void; + function getLocalImgData(config: GetLocalImgDataConfig): void; /** * 开始录音 @@ -257,36 +272,33 @@ declare namespace wx { /** * 停止录音 - * res: var localId = res.localId; */ - function stopRecord(success: (res: any) => void): void; + function stopRecord(success: (res: {localId: string}) => void): void; /** - * 录音时间超过一分钟没有停止的时候会执行 complete 回调 - * @param complete :var localId = res.localId; + * 录音时间超过一分钟没有停止的时候会执回调 */ - function onVoiceRecordEnd(complete: (res: any) => void): void; + function onVoiceRecordEnd(complete: (res: { localId: string }) => void): void; /** - * 需要播放的音频的本地 ID,由 stopRecord 接口获得 - * @param localId + * 播放音频 */ function playVoice(localId: string): void; /** - * 需要暂停的音频的本地 ID,由 stopRecord 接口获得 + * 暂停音频 */ function pauseVoice(localId: string): void; /** - * 需要停止的音频的本地 ID,由 stopRecord 接口获得 + * 停止播放音频 */ function stopVoice(localId: string): void; /** - * res: var localId = res.localId; 返回音频的本地 ID + * 停止播放后的回调 */ - function onVoicePlayEnd(success: (res: any) => void): void; + function onVoicePlayEnd(success: (res: { localId: string }) => void): void; interface UploadVoiceConfig { localId: string; @@ -295,27 +307,31 @@ declare namespace wx { } /** - * 上传语音接口,上传语音有效期3天,可用微信多媒体接口下载语音到自己的服务器, - * 此处获得的 serverId 即 media_id,参考文档 .目前多媒体文件下载接口的频率限制为10000次/天,如需要调高频率,请登录微信公众平台,在开发 - 接口权限的列表中,申请提高临时上限。 - * @param config res: var serverId = res.serverId; 返回音频的服务器端 ID + * 上传语音接口, 上传语音有效期3天,可用微信多媒体接口下载语音到自己的服务器, */ function uploadVoice(config: UploadVoiceConfig): void; - /** - * serverId:需要下载的音频的服务器端 ID,由 uploadVoice 接口获得 - * isShowProgressTips: 默认为1,显示进度提示 - */ interface downloadVoiceConfig { - serverId: string; - isShowProgressTips?: number; - success(res: any): void; + /** + * 需要下载的音频的服务器端 ID,由 uploadVoice 接口获得 + */ + serverId: string; + + /** + * 默认为1,显示进度提示 + */ + isShowProgressTips?: number; + + /** + * 下载成功回调 + */ + success(res: any): void; } function downloadVoice(config: downloadVoiceConfig): void; /** * 识别音频并返回识别结果接口 - * @param config */ function translateVoice(config: UploadVoiceConfig): void; @@ -350,9 +366,7 @@ declare namespace wx { } /** - * 微信内置地图查看位置接口 - * @param config name: 位置名, scale: 地图缩放级别, 整形值, 范围从1~28。默认为最大 - * infoUrl: 在查看位置界面底部显示的超链接, 可点击跳转 + * 微信内置地图查看位置 */ function openLocation(config: OpenLocationConfig): void; @@ -376,27 +390,29 @@ declare namespace wx { * 默认为 wgs84 的 gps 坐标,如果要返回直接给 openLocation 用的火星坐标,可传入'gcj02' */ type?: string; + success(res: Location): void; } /** * 获取地理位置接口 - * @param config */ function getLocation(config: GetLocationConfig): void; - /** - * ticket:摇周边的业务 ticket, 系统自动添加在摇出来的页面链接后面 - * - */ interface StartSearchBeaconsConfig { + /** + * 摇周边的业务ticket, 系统自动添加在摇出来的页面链接后面 + */ ticket: string; + + /** + * 完成后的回调 + */ complete(argv: any): void; } /** * 开启查找周边 ibeacon 设备接口 - * @param config */ function startSearchBeacons(config: StartSearchBeaconsConfig): void; @@ -450,15 +466,21 @@ declare namespace wx { */ function showAllNonBaseMenuItem(): void; - /** - * needResult: 默认为0,扫描结果由微信处理,1则直接返回扫描结果, - * scanType:["qrCode","barCode"], 可以指定扫二维码还是一维码,默认二者都有 - * success: var result = res.resultStr; 当 needResult 为 1 时,扫码返回的结果 - */ interface ScanQRCodeConfig { + /** + * 默认为0,扫描结果由微信处理,1则直接返回扫描结果, + */ needResult?: number; + + /** + * ["qrCode","barCode"], 可以指定扫二维码还是一维码,默认二者都有 + */ scanType?: string[]; - success?(res: any): void; + + /** + * resultStr 是当 needResult 为 1 时,扫码返回的结果 + */ + success?(res: { resultStr: string }): void; } /** @@ -466,59 +488,81 @@ declare namespace wx { */ function scanQRCode(config: ScanQRCodeConfig): void; - /** - * productId:商品id - * viewType: 0.默认值,普通商品详情页; 1.扫一扫商品详情页; 2.小店商品详情页 - */ interface OpenProductSpecificViewConfig { + /** + * 商品id + */ productId: string; + + /** + * 0.默认值,普通商品详情页; 1.扫一扫商品详情页; 2.小店商品详情页 + */ viewType?: string; } /** * 跳转微信商品页接口 - * @param config */ function openProductSpecificView(config: OpenProductSpecificViewConfig): void; - /** - * shopId: 门店Id - * cardType:卡券类型 - * cardId:卡券Id - * timestamp:卡券签名时间戳 - * nonceStr:卡券签名随机串 - * signtype:签名方式,默认'SHA1' - * cardsign:卡券签名 - * success: var cardList= res.cardList; 用户选中的卡券列表信息 - */ interface ChooseCardConfig { + /** + * 门店Id + */ shopId?: string; + + /** + * 卡券类型 + */ cardType?: string; + + /** + * 卡券Id + */ cardId?: string; + + /** + * 卡券签名时间戳 + */ timestamp: number; + + /** + * 卡券签名随机串 + */ nonceStr: string; + + /** + * 签名方式,默认'SHA1' + */ signType: string; + + /** + * 卡券签名 + */ cardSign: string; - success?(res: any): void; + + /** + * var cardList= res.cardList; 用户选中的卡券列表信息 + */ + success?(res: { cardList: Card[] }): void; } /** - * 拉取适用卡券列表并获取用户选择信息 - * @param config + * 卡券对象 */ - function chooseCard(config: ChooseCardConfig): void; - - class AddCardObj { + interface Card { cardId: string; cardExt: string; } /** - * res: var cardList = res.cardList; 添加的卡券列表信息 + * 拉取适用卡券列表并获取用户选择信息 */ + function chooseCard(config: ChooseCardConfig): void; + interface AddCardConfig { - cardList: AddCardObj[]; - success?(res: any): void; + cardList: Card[]; + success?(res: { cardList: Card[] }): void; } /** @@ -543,26 +587,40 @@ declare namespace wx { */ function openCard(config: OpenCardConfig): void; - /** - * timestamp: 支付签名时间戳,注意微信jssdk中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的S字符 - * nonceStr: 支付签名随机串,不长于 32 位 - * package: 统一支付接口返回的 prepay_id 参数值,提交格式如:prepay_id=*** - * signType: 签名方式,默认为'SHA1',使用新版支付需传入'MD5' - * paySign: 支付签名 - * success: 支付成功后的回调函数 - */ interface ChooseWXPayConfig { + /** + * 支付签名时间戳,注意微信jssdk中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的S字符 + */ timestamp: number; + + /** + * 支付签名随机串,不长于 32 位 + */ nonceStr: string; + + /** + * 统一支付接口返回的 prepay_id 参数值,提交格式如:prepay_id=*** + */ package: string; + + /** + * 签名方式,默认为'SHA1',使用新版支付需传入'MD5' + */ signType?: string; + + /** + * 支付签名 + */ paySign: string; + + /** + * 支付成功后的回调函数 + */ success(res: any): void; } /** * 发起一个微信支付请求 - * @param config */ function chooseWXPay(config: ChooseWXPayConfig): void; } From 9e2b390ee9dd8d835e3e3f1f8fdf795264038fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Thu, 20 Jul 2017 15:58:00 +0800 Subject: [PATCH 0007/2268] Fix a type error and update comments --- types/wx-js-sdk-dt/index.d.ts | 12 ++++++------ types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/types/wx-js-sdk-dt/index.d.ts b/types/wx-js-sdk-dt/index.d.ts index c775c1df68..ec93e37efa 100644 --- a/types/wx-js-sdk-dt/index.d.ts +++ b/types/wx-js-sdk-dt/index.d.ts @@ -212,12 +212,12 @@ declare namespace wx { interface UploadImageConfig { /** - * localId:要上传的图片的本地 ID,由 chooseImage 接口获得 + * 要上传的图片的本地 ID,由 chooseImage 接口获得 */ localId: string; /** - * isShowProgressTips: 默认为1,显示进度提示 + * 默认为1,显示进度提示 */ isShowProgressTips?: number; @@ -276,7 +276,7 @@ declare namespace wx { function stopRecord(success: (res: {localId: string}) => void): void; /** - * 录音时间超过一分钟没有停止的时候会执回调 + * 录音时间超过一分钟没有停止的时候会执行回调 */ function onVoiceRecordEnd(complete: (res: { localId: string }) => void): void; @@ -425,14 +425,14 @@ declare namespace wx { */ function stopSearchBeacons(config: StopSearchBeaconsConfig): void; - interface onSearchBeaconsConfig { + interface OnSearchBeaconsConfig { complete(argv: any): void; } /** * 监听周边 ibeacon 设备接口, * 摇一摇周边接口使用注意事项及更多返回结果说明,请参考:摇一摇周边获取设备信息 */ - function onSearchBeacons(config: onSearchBeaconsConfig): void; + function onSearchBeacons(config: OnSearchBeaconsConfig): void; /** * 关闭当前网页窗口接口 @@ -497,7 +497,7 @@ declare namespace wx { /** * 0.默认值,普通商品详情页; 1.扫一扫商品详情页; 2.小店商品详情页 */ - viewType?: string; + viewType?: number; } /** diff --git a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts index 84c97e6bf4..deeb753b29 100644 --- a/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts +++ b/types/wx-js-sdk-dt/wx-js-sdk-dt-tests.ts @@ -100,8 +100,8 @@ wx.openLocation({ }); wx.openProductSpecificView({ - productId: '', - viewType: '' + productId: '1', + viewType: 0 }); wx.chooseCard({ @@ -113,3 +113,15 @@ wx.chooseCard({ timestamp: 1, signType: '' }); + +wx.onVoiceRecordEnd((res) => { + res.localId; +}); + +wx.onVoicePlayEnd((res) => { + res.localId; +}); + +wx.openProductSpecificView({ + productId: '' +}); From 4fa494c39a1484bbbd2677117fa84c67790ea5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Wed, 26 Jul 2017 10:32:21 +0800 Subject: [PATCH 0008/2268] Add amap typings --- types/amap-js-sdk/amap-js-sdk-tests.ts | 4 + types/amap-js-sdk/index.d.ts | 898 +++++++++++++++++++++++++ types/amap-js-sdk/tsconfig.json | 23 + types/amap-js-sdk/tslint.json | 1 + 4 files changed, 926 insertions(+) create mode 100644 types/amap-js-sdk/amap-js-sdk-tests.ts create mode 100644 types/amap-js-sdk/index.d.ts create mode 100644 types/amap-js-sdk/tsconfig.json create mode 100644 types/amap-js-sdk/tslint.json diff --git a/types/amap-js-sdk/amap-js-sdk-tests.ts b/types/amap-js-sdk/amap-js-sdk-tests.ts new file mode 100644 index 0000000000..9354bed23a --- /dev/null +++ b/types/amap-js-sdk/amap-js-sdk-tests.ts @@ -0,0 +1,4 @@ +const map = new AMap.Map('id', { + resizeEnable: true, + animateEnable: true +}); diff --git a/types/amap-js-sdk/index.d.ts b/types/amap-js-sdk/index.d.ts new file mode 100644 index 0000000000..681ac7c2d0 --- /dev/null +++ b/types/amap-js-sdk/index.d.ts @@ -0,0 +1,898 @@ +// Type definitions for amap-js-sdk x.x +// Project: http://lbs.amap.com/api/javascript-api/summary/ +// Definitions by: Bian Zhongjie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace AMap { + type EventCallback = (...args: any[]) => void; + type GenericEventCallback = (res: T) => void; + + const plugin: (pluginNames: string[], ready?: () => void) => void; + + namespace event { + /** + * 注册DOM对象事件:给DOM对象注册事件,并返回eventListener。运行AMap.event.removeListener(eventListener)可以删除该事件的监听器。 + 参数: + instance:需注册事件的DOM对象(必填), + eventName:事件名称(必填), + handler:事件功能函数(必填), + context:事件上下文(可选,缺省时,handler中this指向参数instance引用的对象,否则this指向context引用的对象) + */ + const addDomListener: (instance: any, eventName: string, handler: EventCallback, context?: any) => EventListener; + + /** + * 注册对象事件:给对象注册事件,并返回eventListener。运行AMap.event.removeListener(eventListener)可以删除该事件的监听器。 + 参数: + instance:需注册事件的对象(必填), + eventName:事件名称(必填), + handler:事件功能函数(必填), + context:事件上下文(可选,缺省时,handler中this指向参数instance引用的对象,否则this指向context引用的对象) + */ + const addListener: (instance: Object, eventName: string, handler: EventCallback, context?: any) => EventListener; + + /** + * 类似于addListener,但处理程序会在处理完第一个事件后将自已移除。 + */ + const addListenerOnce: (instance: Object, eventName: string, handler: EventCallback, context?: any) => EventListener; + + /** + * 删除由上述 event.addDomListener 和 event.addListener 传回的指定侦听器。 + */ + const removeListener: (listener: EventListener) => void; + + /** + * 触发非DOM事件:触发非DOM事件eventName,extArgs将扩展到事件监听函数(handler)接受到的event参数中。如:在extArgs内写入{m:10,p:2},eventName监听函数(handler)可以接收到包含m,p两个key值的event对象。 + */ + const trigger: (instance: Object, eventName: string, extArgs: any) => void; + } + + + /** + * 此对象用于表示地图、覆盖物、叠加层上的各种鼠标事件返回,包含以下字段: + */ + interface MapsEventOptions { + lnglat: LngLat; + pixel: Pixel; + type: string; + target: Object; + } + + abstract class EventBindable { + on(eventName: string, callback: EventCallback): void; + off(eventName: string, callback: EventCallback): void; + } + + +/* --------------------------- 基础类 --------------------------- */ +/* 参考地址:http://lbs.amap.com/api/javascript-api/reference/core */ + + /** + * 像素坐标,确定地图上的一个像素点。 + */ + class Pixel { + + /** + * 构造一个像素坐标对象。 + */ + constructor(x: number, y: number); + /** + * 获得X方向像素坐标 + */ + getX(): number; + + /** + * 获得Y方向像素坐标 + */ + getY(): number; + + /** + * 当前像素坐标与传入像素坐标是否相等 + */ + equals(point: Pixel): boolean; + + /** + * 以字符串形式返回像素坐标对象 + */ + toString(): string; + } + + /** + * 地物对象的像素尺寸 + */ + class Size { + + /** + * 构造尺寸对象 + * @param {number} width 宽度,单位:像素 + * @param {number} height 高度,单位:像素 + */ + constructor(width: number, height: number); + + /** + * 获得宽度 + */ + getWidth(): number; + + /** + * 获得高度 + */ + getHeight(): number; + + /** + * 以字符串形式返回尺寸大小对象 + */ + toString(): string; + } + + /** + * 经纬度坐标,确定地图上的一个点 + */ + class LngLat { + + /** + * 构造一个地理坐标对象 + * @param {number} lng 经度 + * @param {number} lat 纬度 + */ + constructor(lng: number, lat:number); + + /** + * 当前经纬度坐标值经度移动w,纬度移动s,得到新的坐标。 + * + * @param {number} w 经度,向右移为正值,单位:米 + * @param {number} s 纬度,向上移为正值,单位:米 + */ + offset(w:number, s:number): LngLat; + + /** + * 计算当前经纬度和传入经纬度或者经纬度数组连线之间的地面距离,单位为米 + * + * @param {(LngLat | [number, number])} lnglat 传入的经纬度 + */ + distance(lnglat: LngLat | [number, number]): number; + + /** + * 获取经度值 + */ + getLng(): number; + + /** + * 获取纬度值 + */ + getLat(): number; + + /** + * 判断当前坐标对象与传入坐标对象是否相等 + * + * @param {LngLat} lnglat 传入坐标对象 + */ + equals(lnglat: LngLat): boolean; + + /** + * LngLat对象以字符串的形式返回 + */ + toString(): string; + } + + /** + * 地物对象的经纬度矩形范围 + */ + class Bounds { + + /** + * 构造一个矩形范围 + * @param {LngLat} southWest 西南角经纬度坐标 + * @param {LngLat} northEast 东北角经纬度坐标 + */ + constructor(southWest: LngLat, northEast: LngLat); + + /** + * 判断指定点坐标是否在矩形范围内 + * @param {LngLat} point 指定点 + */ + contains(point: LngLat): boolean; + + /** + * 获取当前Bounds的中心点经纬度坐标 + */ + getCenter(): LngLat; + + /** + * 获取西南角坐标 + */ + getSouthWest(): LngLat; + + /** + * 获取东北角坐标 + */ + getNorthEast(): LngLat; + + /** + * 以字符串形式返回地物对象的矩形范围 + */ + toString(): string; + } + + interface TileLayerOptions { + map: Map; + tileSize: number; + tileUrl: string; + errorUrl: string; + getTileUrl: (x: number, y: number, z: number) => string; + zIndex: number; + opacity: number; + zooms: number[]; + detectRetina: boolean; + } + + abstract class Layer extends EventBindable { + setOpacity(alpha: number): void; + show(): void; + hide(): void; + getTiles(): string[]; + reload(): void; + setTileUrl(): void; + getZooms(): number[]; + setzIndex(index: number): void; + setMap(map: Map): void; + } + + class TileLayer extends Layer { + constructor(tileOpt?: { + map: Map, + tileSize?: number, + tileUrl?: string, + errorUrl?: string, + getTileUrl?: (x: number, y: number, z: number) => string, + zIndex?: number, + opacity?: number, + zooms?: number[], + detectRetina?: boolean + }); + } + + namespace TileLayer { + + abstract class MapTypeLayer extends Layer { + constructor(options?: { + map: Map, + zIndex?: number, + opacity?: number, + zooms?: number[], + detectRetina?: boolean + }); + } + + class Satellite extends MapTypeLayer { + } + + class RoadNet extends MapTypeLayer { + } + + class Traffic extends MapTypeLayer { + constructor(options?: { + map: Map, + zIndex?: number, + opacity?: number, + zooms?: number[], + detectRetina?: boolean, + autoRefresh?: boolean, + interval?: number + }); + + interval: number; + autoRefresh: boolean; + } + } + + interface IndoorMap { + + } + + interface MapOptions { + view?: View2D; + layers?: TileLayer[]; + level?: number; + center?: LngLat; + labelzIndex?: number; + zooms?: number[]; + lang?: string; + cursor?: string; + crs?: string; + animateEnable?: boolean; + isHotspot?: boolean; + defaultLayer?: TileLayer; + rotateEnable?: boolean; + resizeEnable?: boolean; + showIndoorMap?: boolean; + indoorMap?: IndoorMap; + expandZoomRange?: boolean; + dragEnable?: boolean; + zoomEnable?: boolean; + doubleClickZoom?: boolean; + keyboardEnable?: boolean; + jogEnable?: boolean; + scrollWheel?: boolean; + touchZoom?: boolean; + mapStyle?: string; + features?: string[]; + } + + class View2D { + constructor(opt: { + center?: LngLat, + rotation?: number, + zoom?: number, + crs?: string + }); + } + + class Map extends EventBindable { + + constructor(mapDiv: string, opts?: MapOptions); + + getZoom(): number; + + getLayers(): TileLayer[]; + + getCenter(): LngLat; + + getCity(callback: (result: { + provice: string, + city: string, + citycode: string, + district: string + }) => void): void; + + getBounds(): Bounds; + getlabelzIndex(): number; + getLimitBounds(): Bounds; + getLang(): string; + getSize(): Size; + getRotation(): number; + getStatus(): any; + getDefaultCursor(): string; + getResolution(point: LngLat): number; + getScale(dpi: number): number; + setZoom(level: number): void; + setlabelzIndex(index: number): void; + setLayers(layers: TileLayer[]): void; + add(overlayers: any[]): void; + remove(overlayers: any[]): void; + getAllOverlays(type: string): Marker[] | Circle[] | Polygon[] | Polyline[]; + setCenter(position: LngLat): void; + setZoomAndCenter(zoomLevel: number, center: LngLat): void; + setCity(city:string, callback: () => void): void; + setBounds(bound: Bounds): void; + setLimitBounds(bound: Bounds): void; + clearLimitBounds(): void; + setLang(lang: string): void; + setRotation(rotation: number): void; + setStatus(status: any): void; + setDefaultCursor(cursor: string): void; + zoomIn(): void; + zoomOut(): void; + panTo(position: LngLat): void; + panBy(x: number, y: number): void; + setFitView(overlayList?: any[]): void; + clearMap(): void; + destroy(): void; + plugin(name: string| string[], callback: () => void): void; + addControl(obj: IMapControl|Object): void; + removeControl(obj: IMapControl|Object): void; + clearInfoWindow(): void; + pixelToLngLat(pixel: Pixel, level: number): LngLat; + lnglatToPixel(lnglat: LngLat, level: number): Pixel; + containerToLngLat(pixel: Pixel, level: number): LngLat; + lngLatToContainer(lnglat: LngLat, level: number): Pixel; + setMapStyle(style: string): void; + getMapStyle(): string; + setFeatures(features: string[]): void; + getFeatures(): string[]; + setDefaultLayer(layer: TileLayer): void; + + } + + class Icon { + constructor(options?: { + size?: Size, + imageOffset?: Pixel, + image?: string, + imageSize?: Size + }); + + getImageSize(): Size; + setImageSize(size: Size): void; + } + + /** + * MarkerShape用于划定Marker的可点击区域范围。需要注意的是,在IE浏览器中图标透明区域默认为不触发事件,因此MarkerShape在IE中不起作用。 + */ + class MarkerShape { + constructor(options: { + /** + * + * 可点击区域组成元素数组,存放图形的像素坐标等信息,该数组元素由type决定: + * - circle:coords格式为 [x1, y1, r],x1,y1为圆心像素坐标,r为圆半径 + * - poly: coords格式为 [x1, y1, x2, y2 … xn, yn],各x,y表示多边形边界像素坐标 + * - rect: coords格式为 [x1, y1, x2, y2],x1,y1为矩形左上角像素坐标,x2,y2为矩形右下角像素坐标 + * Markshape的像素坐标是指相对于marker的左上角的像素坐标偏移量 + */ + coords?: number[], + + /** + * 可点击区域类型,可选值: + * - circle:圆形 + * - poly:多边形 + * - rect:矩形 + */ + type?: string + }); + } + + interface MarkerOptions { + map?: Map; + position?: LngLat; + offset?: Pixel; + icon?: string|Icon; + content?: string| HTMLElement; + topWhenClick?: boolean; + topWhenMouseOver?: boolean; + draggable?: boolean; + raiseOnDrag?: boolean; + cursor?: string; + visible?: boolean; + zIndex?: number; + angle?: number; + autoRotation?: boolean; + animation?: string; + shadow?: Icon; + title?: string; + clickable?: boolean; + shape?: MarkerShape; + extData?: any; + label?: { content: string, offset: Pixel }; + } + + /** + * 点标记。 + */ + class Marker extends EventBindable { + constructor(options?: MarkerOptions); + + markOnAMAP(obj: { + name: string, + position: LngLat + }): void; + + getOffset(): Pixel; + setOffset(offset: Pixel): void; + + setAnimation(animate: string): void; + getAnimation(): string; + + setClickable(clickable: boolean): void; + getClickable(): boolean; + + getPosition(): LngLat; + setPosition(lnglat: LngLat): void; + + setAngle(angle: number): void; + getAngle(): number; + + setLabel(label: { + content?: string, + offset?: Pixel + }): void; + getLabel(): { + content?: string, + offset?: Pixel + }; + + setzIndex(index: number): void; + + getIcon(): string|Icon; + setIcon(content: string|Icon): void; + + setDraggable(draggable: boolean): void; + getDraggable(): boolean; + + hide(): void; + show(): void; + + setCursor(cursor: string): void; + + setContent(content: string| HTMLElement): void; + getContent(): string; + + moveAlong(lnglatlist: LngLat[], speed?: number, f?: (k: number) => number, circlable?: boolean): void; + moveTo(lnglat: LngLat, speed?: number, f?: (k: number) => number): void; + stopMove(): void; + setMap(map: Map): void; + getMap(): Map; + setTitle(title: string): void; + getTitle(): string; + setTop(isTop: boolean): void; + getTop(): boolean; + setShadow(icon: Icon): void; + getShadow(): Icon; + setShape(shape: MarkerShape): void; + getShape(): MarkerShape; + setExtData(ext: any): void; + getExtData(): any; + } + + interface CircleOptions { + map: Map; + zIndex?: number; + center: LngLat; + radius?: number; + strokeColor?: string; + strokeOpacity?: number; + fillColor?: string; + fillOpacity?: string; + strokeStyle?: string; + extData?: any; + strokeDasharray?: number[]; + } + + class Circle { + constructor(options?: CircleOptions); + setCenter(lnglat: LngLat): void; + getCenter(): LngLat; + getBounds(): Bounds; + setRadius(radius: number): void; + getRadius(): number; + setOptions(circleopt: CircleOptions): void; + getOptions(): CircleOptions; + hide(): void; + show(): void; + setMap(map: Map): void; + setExtData(ext: any): void; + getExtData(): any; + contains(point: LngLat): boolean; + } + + interface PolygonOptions { + map?: Map; + zIndex?: number; + path?: LngLat[]|LngLat[][]; + strokeColor?: string; + strokeOpacity?: number; + strokeWeight?: number; + fillColor?: string; + fillOpacity?: number; + extData?: any; + strokeStyle?: string; + strokeDasharray?: number[]; + } + + class Polygon extends EventBindable { + constructor(options?: PolygonOptions); + + setPath(path: LngLat[]|LngLat[][]): void; + getPath(): LngLat[]|LngLat[][]; + setOptions(opt: PolygonOptions): void; + getOptions(): PolygonOptions; + getBounds(): Bounds; + getArea(): number; + hide(): void; + show(): void; + setMap(map: Map): void; + setExtData(ext: any): void; + getExtData(): any; + contains(point: LngLat): boolean; + } + + interface PolylineOptions { + map?: Map; + zIndex?: number; + geodesic?: boolean; + isOutline?: boolean; + outlineColor?: string; + path?: LngLat[]; + strokeColor?: string; + strokeOpacity?: number; + strokeWeight?: number; + strokeStyle?: string; + strokeDasharray?: number[]; + extData?: any; + } + + class Polyline extends EventBindable { + constructor(options?: PolylineOptions); + + setPath(path: LngLat[]): void; + getPath(): LngLat[]; + + setOptions(opt: PolylineOptions): void; + getOptions(): PolylineOptions; + + getLength(): number; + getBounds(): Bounds; + hide(): void; + show(): void; + + setMap(map: Map): void; + setExtData(ext: any): void; + getExtData(): any; + + } + + interface IMapControl { + show(): void; + hide(): void; + } + + class MapType implements IMapControl { + constructor(options?: { + defaultType?: number; + showTraffic?: boolean; + showRoad?: boolean; + }); + + show(): void; + hide(): void; + } + + class OverView extends EventBindable implements IMapControl { + constructor(options?: { + tileLayer?: TileLayer[], + isOpen?: boolean, + visible?: boolean + }); + + open(): void; + close(): void; + setTileLayer(layer: TileLayer): void; + getTileLayer(): TileLayer; + show(): void; + hide(): void; + } + + class Scale extends EventBindable implements IMapControl { + offset: Pixel; + position: string; + + show(): void; + hide(): void; + } + + class ToolBar extends EventBindable implements IMapControl { + constructor(options?: { + offset?: Pixel, + position?: string, + ruler?: boolean, + noIpLocate?: boolean, + locate?: boolean, + liteStyle?: boolean, + direction?: boolean, + autoPosition?: boolean, + locationMarker?: Marker, + useNative?: boolean + }); + + getOffset(): Pixel; + setOffset(offset: Pixel): void; + hideRuler(): void; + showRuler(): void; + hideDirection(): void; + showDirection(): void + hideLocation(): void; + showLocation(): void; + doLocation(): void; + getLocation(): { lng:number, lat:number }; + show(): void; + hide(): void; + } + + class InfoWindow extends EventBindable { + constructor(options?: { + isCustom?: boolean, + autoMove?: boolean, + closeWhenClickMap?: boolean, + content?: string | HTMLElement, + size?: Size, + offset?: Pixel, + position?: LngLat, + showShadow?: boolean + }); + + open(map: Map, pos: LngLat): void; + close(): void; + getIsOpen(): boolean; + setPosition(lnglat: LngLat): void; + getPosition(): LngLat; + setSize(size: Size): void; + getSize(): Size; + getContent(): string; + setContent(content: string|HTMLElement): void; + } + + class AdvancedInfoWindow extends EventBindable { + constructor(options?: { + autoMove?: boolean, + closeWhenClickMap?: boolean, + content?: string|HTMLElement, + offset?: Pixel, + position?: LngLat, + panel?: string|HTMLElement, + searchRadius?: number, + placeSearch?: boolean, + driving?: boolean, + walking?: boolean, + transit?: boolean, + asOrigin?: boolean, + asDestination?: boolean + }); + + open(map: Map, pos: LngLat): void; + close(): void; + getIsOpen(): boolean; + setPosition(lnglat: LngLat): void; + getPosition(): LngLat; + setContent(content: string|HTMLElement): void; + getContent(): string; + } + + class Geolocation extends EventBindable { + constructor(options: { + enableHighAccuracy?: boolean, + timeout?: number, + noIpLocate?: boolean, + maximumAge?: number, + convert?: boolean, + showButton?: boolean, + buttonDom?: string|HTMLElement, + buttonPosition?: string, + buttonOffset?: Pixel, + showMarker?: boolean, + markerOptions?: MarkerOptions, + showCircle?: boolean, + circleOptions?: CircleOptions, + panToLocation?: boolean, + zoomToAccuracy?: boolean, + useNative?: boolean + }); + + isSupported(): boolean; + getCurrentPosition(): void; + watchPosition(): number; + clearWatch(watchId: number): number; + } + + interface GeolocationResult { + position: LngLat; + accuracy: number; + isConverted: boolean; + info: string; + } + + interface GeolocationError { + info: string; + } + + /** + * 坐标转换结果 + */ + interface ConvertorResult { + info: string; + locations: LngLat[]; + } + + /** + * 坐标转换 + */ + function convertFrom(lnglat: LngLat | LngLat[], type: string, result: (status: string, result: ConvertorResult) => void): void; + + interface CitySearchResult { + city: string; + bounds: Bounds; + } + + class CitySearch extends EventBindable { + getLocalCity(callback: (status: string, result: string | CitySearchResult) => void): void; + getCityByIp(ip: string, callback: (status: string, result: string | CitySearchResult) => void): void; + } + + class Poi { + + } + + const enum DrivingPolicy { + LEAST_TIME, + LEAST_FEE, + LEAST_DISTANCE, + REAL_TRAFFIC + } + + interface ViaCity { + name: string; + citycode: string; + adcode: string; + districts: District[] + } + + interface District { + name: string; + adcode: string; + } + + interface TMC { + lcode: string; + distance: number; + status: string; + } + + interface DriveStep { + start_location: LngLat; + end_location: LngLat; + instruction: string; + action: string; + assist_action: string; + orientation: string; + road: string; + distance: number; + tolls: number; + tolls_distance: number; + toll_road: string; + time: number; + path: LngLat[], + cities?: ViaCity[], + tmcs?: TMC[] + } + + interface DriveRoute { + distance: number; + time: number; + policy: string; + tolls: number; + tolls_distance: number; + steps: DriveStep[] + } + + interface DrivingResult { + info: string; + origin: LngLat; + destination: LngLat|Poi; + start: Poi; + waypoints: Poi; + taxi_cost: number; + routes: DriveRoute[] + } + + class Driving extends EventBindable { + constructor(options?: { + policy?: DrivingPolicy, + extensions?: string, + map?: Map, + panel?: string|HTMLElement, + hideMarkers?: boolean, + showTraffic?: boolean + }); + + search(origin:LngLat, destination: LngLat, opts?: { + waypoints: LngLat[] + }, callback?: (status: string, result: string|DrivingResult) => void): void; + + search(point: { + keyword: string, + city: string + }[], callback: (status: string, result: string|DrivingResult) => void): void; + + setPolicy(policy: DrivingPolicy): void; + setAvoidPolygons(path: LngLat[][]): void; + setAvoidRoad(road: string): void; + clearAvoidRoad(): void; + clearAvoidPolygons(): void; + getAvlidPolygons(): LngLat[][]; + getAvoidRoad(): string; + clear(): void; + searchOnAMAP(obj: { + origin?: LngLat, + originName?: string, + destination?: LngLat, + destinationName?: string + }): void; + } +} diff --git a/types/amap-js-sdk/tsconfig.json b/types/amap-js-sdk/tsconfig.json new file mode 100644 index 0000000000..5fe4ef145c --- /dev/null +++ b/types/amap-js-sdk/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amap-js-sdk-tests.ts" + ] +} diff --git a/types/amap-js-sdk/tslint.json b/types/amap-js-sdk/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/amap-js-sdk/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 3046d015fa80ce2c08df936fe6495ba641a444ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9E=E4=B8=AD=E6=9D=B0?= Date: Fri, 18 Aug 2017 14:32:40 +0800 Subject: [PATCH 0009/2268] =?UTF-8?q?=E6=9B=B4=E6=96=B0amap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/amap-js-sdk/index.d.ts | 147 +++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/types/amap-js-sdk/index.d.ts b/types/amap-js-sdk/index.d.ts index 681ac7c2d0..5cdde31e53 100644 --- a/types/amap-js-sdk/index.d.ts +++ b/types/amap-js-sdk/index.d.ts @@ -772,6 +772,100 @@ declare namespace AMap { info: string; } + interface BusinessArea { + id: string; + name: string; + location: string; + } + + interface Road { + id: string; + name: string; + distance: number; + location: LngLat; + direction: string; + } + + interface Cross { + distance: number; + direction: string; + location: LngLat; + first_id: string; + first_name: string; + second_id: string; + second_name: string; + } + + interface AddressComponent { + province: string; + city: string; + citycode: string; + district: string; + adcode: string; + township: string; + street: string; + streetNumber: string; + neighborhood: string; + neighborhoodType: string; + building: string; + buildingType: string; + businessAreas: BusinessArea[]; + } + + interface Geocode { + addressComponent: AddressComponent; + formattedAddress: string; + location: LngLat; + adcode: string; + level: string; + } + + interface ReGeocode { + addressComponent: AddressComponent; + formattedAddress: string; + roads: Road[]; + crosses: Cross[]; + pois: ReGeocodePoi[]; + } + + interface ReGeocodePoi { + id: string; + name: string; + type: string; + tel: string; + distance: number; + direction: string; + address: string; + location: LngLat; + businessArea: string; + } + + interface GeocodeResult { + info: string; + geocodes: LngLat[]; + resultNum: number; + } + + interface ReGeocodeResult { + info: string; + regeocode: ReGeocode; + } + + class Geocoder { + constructor(opts?: { + city?: string, + radius?: number, + batch?: boolean, + extensions?: string + }); + + getLocation(address: string, callback?: (status?: string, result?: string | GeocodeResult) => void): void; + + setCity(city: string): void; + + getAddress(location:LngLat|LngLat[], callback: (status?: string, result?: string | ReGeocodeResult) => void): void; + } + /** * 坐标转换结果 */ @@ -895,4 +989,57 @@ declare namespace AMap { destinationName?: string }): void; } + + // 天气插件 + + interface WeatherLiveResult { + info: string; + province: string; + city: string; + adcode: string; + weather: string; + temperature: number; + windDirection: string; + windPower: number; + humidity: string; + reportTime: string; + } + + interface Forecast { + date: string; + week: string; + dayWeather: string; + nightWeather: string; + dayTemp: number; + nightTemp: number; + dayWindDir: string; + nightWindDir: string; + dayWindPower: string; + nightWindPower: string; + } + + interface WeatherForecastResult { + info: string; + province: string; + city: string; + adcode: string; + reportTime: string; + forecasts: Forecast[]; + } + + class Weather { + /** + * 查询实时天气信息 + * @param district 支持城市名称/区域编码(如:“杭州市”/“330100”) + * @param callback 当请求成功时ErrorStatus为null,当请求不成功时ErrorStatus为Obj + */ + getLive(district: string, callback: (errorStatus: any, result: WeatherLiveResult) => void): void; + + /** + * 查询四天预报天气,包括查询当天天气信息 + * @param district 支持城市名称/区域编码(如:“杭州市”/“330100”) + * @param callback 当请求成功时ErrorStatus为null,当请求不成功时ErrorStatus为Obj + */ + getForecast(district: string, callback: (errorStatus: any, result: WeatherForecastResult) => void): void; + } } From 02182cbb750c8e3507d22dbc5510d6e3dc133ae8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 11 Sep 2017 13:29:53 +0800 Subject: [PATCH 0010/2268] Add some apis --- types/amap-js-sdk/index.d.ts | 171 ++++++++++++++++++++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) diff --git a/types/amap-js-sdk/index.d.ts b/types/amap-js-sdk/index.d.ts index 5cdde31e53..e6b4311dc3 100644 --- a/types/amap-js-sdk/index.d.ts +++ b/types/amap-js-sdk/index.d.ts @@ -7,7 +7,19 @@ declare namespace AMap { type EventCallback = (...args: any[]) => void; type GenericEventCallback = (res: T) => void; - const plugin: (pluginNames: string[], ready?: () => void) => void; + /** + * 加载插件 + * @param pluginNames + * @param ready + */ + function plugin(pluginNames: string[], ready?: () => void): void; + + /** + * 加载服务 + * @param serviceName + * @param ready + */ + function service(serviceName: string, ready?: () => void): void; namespace event { /** @@ -1042,4 +1054,161 @@ declare namespace AMap { */ getForecast(district: string, callback: (errorStatus: any, result: WeatherForecastResult) => void): void; } + + + interface Tip { + name: string, + district: string, + adcode: string + } + + interface AutocompleteResult { + info: string, + count: number, + tips: Tip[] + } + + class Autocomplete { + constructor(opts: { + type?: string, + city?: string, + datatype?: string, + citylimit?: boolean, + input?: string + }); + + search(keyword:string, callback: (status: string, result: string | AutocompleteResult) => void): void; + } + + interface SelectChangeEvent { + type: string, + id: string, + marker: Marker, + listElement: HTMLLIElement, + data: Poi + } + + interface PoiList { + pois: Poi[], + pageIndex: number, + pageSize: number, + count: number + } + + interface CityInfo { + name: string, + citycode: string, + adcode: string, + count: number + } + + interface SearchResult { + info: string, + poiList: PoiList, + keywordList: string[], + cityList: CityInfo[] + } + + interface Photo { + title: string, + url: string + } + + interface Content { + id: string, + name: string + } + + interface Discount { + title: string, + detail: string, + start_time: string, + end_time: string, + sold_num: string, + photos: Photo[], + url: string, + provider: string + } + + interface Groupbuy { + title: string, + type_code: string, + type: string, + detail: string, + stime: string, + etime: string, + count: number, + sold_num: number, + original_price: number, + groupbuy_price: number, + discount: number, + ticket_address: string, + ticket_tel: string, + photos: Photo[], + url: string, + provider: string + } + + class PlaceSearch { + constructor(opts: { + city?: string, + citylimit?: boolean, + children?: number, + type?: string, + lang?: string, + pageSize?: number, + pageIndex?: number, + extensions?: string, + map?: Map, + panel?: string|HTMLElement, + showCover?: boolean, + renderStyle?: string, + autoFitView?: boolean + }); + + search(keyword: string, callback: (status: string, result: string | SearchResult) => void): void; + searchNearBy(keyword: string, center: LngLat, radius: number, callback: (status: string,result: string|SearchResult) => void): void; + searchInBounds(keyword: string, bounds: Bounds|Polygon, callback: (status: string, result: string|SearchResult) => void): void; + getDetails(POIID: string, callback: (status: string, result: string|SearchResult) => void): void; + setType(type: string): void; + setCityLimit(p: boolean): void; + setPageIndex(pageIndex: number): void; + setPageSize(setPageSize: number): void; + setCity(city: string): void; + setLang(lang: string): string; + getLang(): string; + clear(): void; + poiOnAMAP(obj: Object): void; + detailOnAMAP(obj: object): void; + } + + interface DistrictSearchOptions { + level: string, + showbiz?: boolean, + extensions?: string, + subdistrict?: number + } + + interface DistrictSearchResult { + info: string, + districtList: District[] + } + + interface District { + name: string, + center: LngLat, + citycode: string, + adcode: string, + level: string, + boundaries: LngLat[], + districtList: District[] + } + + class DistrictSearch { + constructor(opts: DistrictSearchOptions); + + search(keywords: string, callback?: (status: string,result: string| DistrictSearchResult) => void, opts?: DistrictSearchOptions): void; + setLevel(level: string): void; + setSubdistrict(district: number): void; + } } From e8b4b7cd22fd2c3fc03637f75b8b7da85d8a7464 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Wed, 18 Apr 2018 16:22:00 +0300 Subject: [PATCH 0011/2268] upgrade gijgo typings to version 1.9.6 --- types/gijgo/index.d.ts | 58 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/types/gijgo/index.d.ts b/types/gijgo/index.d.ts index 188d8753b1..611373be11 100644 --- a/types/gijgo/index.d.ts +++ b/types/gijgo/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Gijgo v1.8.2 +// Type definitions for Gijgo v1.9.6 // Project: http://gijgo.com // Definitions by: Atanas Atanasov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -88,6 +88,7 @@ declare module Types { //Configuration options autoGenerateColumns?: boolean; autoLoad?: boolean; + bodyRowHeight?: string; columnReorder?: boolean; columns?: Array; dataSource?: any; @@ -97,6 +98,7 @@ declare module Types { fontSize?: string; grouping?: GridGrouping; headerFilter?: GridHeaderFilter; + headerRowHeight?: string; icons?: GridIcons; iconsLibrary?: string; inlineEditing?: GridInlineEditing; @@ -158,7 +160,7 @@ declare module Types { 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; @@ -256,11 +258,16 @@ declare module Types { 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 { @@ -285,6 +292,7 @@ declare module Types { uiLibrary?: string; iconsLibrary?: string; icons?: DropDownIcons; + placeholder?: string; //Events change?: (e: any) => any; @@ -325,11 +333,13 @@ declare module Types { 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 { @@ -339,6 +349,45 @@ declare module Types { 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; @@ -397,6 +446,7 @@ declare module Types { 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; @@ -444,5 +494,9 @@ interface JQuery { timepicker(settings: Types.TimePickerSettings): Types.TimePicker; + datetimepicker(settings: Types.DateTimePickerSettings): Types.DateTimePicker; + + slider(settings: Types.SliderSettings): Types.Slider; + tree(settings: Types.TreeSettings): Types.Tree; } From b1b9f1a32481a7e62370b3fe7c7ffc555fe18ec3 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Wed, 29 Aug 2018 09:38:58 -0700 Subject: [PATCH 0012/2268] Initial commit. Does not compile yet due to strictNullChecks and all. Need to fix those in the next transaction. --- types/@oracle/index.d.ts | 0 types/@oracle/oraclejet/index.d.ts | 0 types/@oracle/oraclejet/ojs/index.d.ts | 23 + .../oraclejet/ojs/ojaccordion/index.d.ts | 49 ++ .../oraclejet/ojs/ojanimation/index.d.ts | 19 + .../ojs/ojarraydataprovider/index.d.ts | 22 + .../ojs/ojarraytreedataprovider/index.d.ts | 18 + .../@oracle/oraclejet/ojs/ojavatar/index.d.ts | 28 + .../@oracle/oraclejet/ojs/ojbutton/index.d.ts | 144 +++ .../@oracle/oraclejet/ojs/ojchart/index.d.ts | 822 ++++++++++++++++++ .../oraclejet/ojs/ojcheckboxset/index.d.ts | 47 + .../oraclejet/ojs/ojcollapsible/index.d.ts | 52 ++ .../ojs/ojcollectiondataprovider/index.d.ts | 17 + .../@oracle/oraclejet/ojs/ojcolor/index.d.ts | 179 ++++ .../oraclejet/ojs/ojcolorpalette/index.d.ts | 56 ++ .../oraclejet/ojs/ojcolorspectrum/index.d.ts | 44 + .../oraclejet/ojs/ojcomponentcore/index.d.ts | 31 + .../oraclejet/ojs/ojcomposite/index.d.ts | 31 + .../oraclejet/ojs/ojconveyorbelt/index.d.ts | 23 + types/@oracle/oraclejet/ojs/ojcore/index.d.ts | 123 +++ .../oraclejet/ojs/ojdataprovider/index.d.ts | 254 ++++++ .../oraclejet/ojs/ojdatetimepicker/index.d.ts | 308 +++++++ .../@oracle/oraclejet/ojs/ojdefer/index.d.ts | 13 + .../ojs/ojdeferreddataprovider/index.d.ts | 17 + .../@oracle/oraclejet/ojs/ojdialog/index.d.ts | 127 +++ .../oraclejet/ojs/ojdvt-base/index.d.ts | 20 + .../oraclejet/ojs/ojeditablevalue/index.d.ts | 67 ++ .../oraclejet/ojs/ojfilepicker/index.d.ts | 44 + .../oraclejet/ojs/ojfilmstrip/index.d.ts | 42 + .../oraclejet/ojs/ojformlayout/index.d.ts | 37 + .../@oracle/oraclejet/ojs/ojgantt/index.d.ts | 286 ++++++ .../@oracle/oraclejet/ojs/ojgauge/index.d.ts | 347 ++++++++ .../oraclejet/ojs/ojindexer/index.d.ts | 13 + .../oraclejet/ojs/ojinputnumber/index.d.ts | 95 ++ .../oraclejet/ojs/ojinputtext/index.d.ts | 178 ++++ .../@oracle/oraclejet/ojs/ojkeyset/index.d.ts | 32 + .../ojs/ojknockout-keyset/index.d.ts | 9 + .../oraclejet/ojs/ojknockout-model/index.d.ts | 7 + .../oraclejet/ojs/ojknockout/index.d.ts | 14 + .../@oracle/oraclejet/ojs/ojlabel/index.d.ts | 33 + .../oraclejet/ojs/ojlabelvalue/index.d.ts | 25 + .../@oracle/oraclejet/ojs/ojlegend/index.d.ts | 230 +++++ .../ojs/ojlistdataproviderview/index.d.ts | 21 + .../oraclejet/ojs/ojlistview/index.d.ts | 167 ++++ .../oraclejet/ojs/ojmasonrylayout/index.d.ts | 85 ++ types/@oracle/oraclejet/ojs/ojmenu/index.d.ts | 87 ++ .../oraclejet/ojs/ojmenuselectmany/index.d.ts | 36 + .../oraclejet/ojs/ojmessage/index.d.ts | 51 ++ .../oraclejet/ojs/ojmessages/index.d.ts | 55 ++ .../oraclejet/ojs/ojmessaging/index.d.ts | 30 + .../@oracle/oraclejet/ojs/ojmodel/index.d.ts | 169 ++++ .../ojs/ojmodule-element-utils/index.d.ts | 3 + .../oraclejet/ojs/ojmodule-element/index.d.ts | 54 ++ .../@oracle/oraclejet/ojs/ojmodule/index.d.ts | 24 + .../ojs/ojmoduleanimations/index.d.ts | 30 + .../oraclejet/ojs/ojnavigationlist/index.d.ts | 253 ++++++ types/@oracle/oraclejet/ojs/ojnbox/index.d.ts | 251 ++++++ .../oraclejet/ojs/ojoffcanvas/index.d.ts | 13 + .../oraclejet/ojs/ojoptgroup/index.d.ts | 25 + .../@oracle/oraclejet/ojs/ojoption/index.d.ts | 25 + .../oraclejet/ojs/ojpictochart/index.d.ts | 206 +++++ .../@oracle/oraclejet/ojs/ojpopup/index.d.ts | 105 +++ .../oraclejet/ojs/ojprogress/index.d.ts | 28 + .../oraclejet/ojs/ojprogresslist/index.d.ts | 50 ++ .../oraclejet/ojs/ojpulltorefresh/index.d.ts | 7 + .../oraclejet/ojs/ojradioset/index.d.ts | 47 + .../oraclejet/ojs/ojrefresher/index.d.ts | 30 + .../@oracle/oraclejet/ojs/ojrouter/index.d.ts | 69 ++ .../oraclejet/ojs/ojselectcombobox/index.d.ts | 427 +++++++++ .../@oracle/oraclejet/ojs/ojslider/index.d.ts | 61 ++ .../oraclejet/ojs/ojsunburst/index.d.ts | 270 ++++++ .../oraclejet/ojs/ojswipeactions/index.d.ts | 24 + .../oraclejet/ojs/ojswipetoreveal/index.d.ts | 7 + .../@oracle/oraclejet/ojs/ojswitch/index.d.ts | 39 + .../oraclejet/ojs/ojswitcher/index.d.ts | 21 + .../@oracle/oraclejet/ojs/ojtable/index.d.ts | 197 +++++ .../oraclejet/ojs/ojtagcloud/index.d.ts | 139 +++ .../oraclejet/ojs/ojthematicmap/index.d.ts | 376 ++++++++ .../oraclejet/ojs/ojtime-base/index.d.ts | 15 + .../oraclejet/ojs/ojtimeaxis/index.d.ts | 40 + .../oraclejet/ojs/ojtimeutils/index.d.ts | 8 + .../oraclejet/ojs/ojtoolbar/index.d.ts | 19 + .../@oracle/oraclejet/ojs/ojtrain/index.d.ts | 58 ++ .../ojs/ojtreedataprovider/index.d.ts | 7 + .../oraclejet/ojs/ojtreemap/index.d.ts | 241 +++++ .../ojs/ojvalidation-base/index.d.ts | 188 ++++ .../ojs/ojvalidation-datetime/index.d.ts | 108 +++ .../ojs/ojvalidation-number/index.d.ts | 51 ++ .../ojs/ojvalidationgroup/index.d.ts | 22 + .../tests/oraclejet/@oraclejet-tests.ts | 26 + types/@oracle/tsconfig.json | 20 + types/@oracle/tslint.json | 1 + 92 files changed, 8212 insertions(+) create mode 100644 types/@oracle/index.d.ts create mode 100644 types/@oracle/oraclejet/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojanimation/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojavatar/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojbutton/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojchart/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolor/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojcore/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdefer/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdialog/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojgantt/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojgauge/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojindexer/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojknockout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlabel/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlegend/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojlistview/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmenu/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessage/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessages/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodel/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmodule/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojnbox/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojoption/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpopup/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojprogress/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojradioset/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojrouter/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojslider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswitch/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtable/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtrain/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts create mode 100644 types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts create mode 100644 types/@oracle/tests/oraclejet/@oraclejet-tests.ts create mode 100644 types/@oracle/tsconfig.json create mode 100644 types/@oracle/tslint.json diff --git a/types/@oracle/index.d.ts b/types/@oracle/index.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/@oracle/oraclejet/index.d.ts b/types/@oracle/oraclejet/index.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/@oracle/oraclejet/ojs/index.d.ts b/types/@oracle/oraclejet/ojs/index.d.ts new file mode 100644 index 0000000000..90fb69208a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/index.d.ts @@ -0,0 +1,23 @@ +/// +declare namespace oj { + + var revision: string; + var version: string; + function ajax(settings?: object): object; + function sync(method: string, model: oj.Model|oj.Collection, options?: object): object; + +} +declare namespace oj { + interface JetSettableProperties { + } + interface GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: K): void; + } + abstract class JetElement extends HTMLElement implements GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: K): void; + } + interface JetElementEventMap extends HTMLElementEventMap { + } +} \ No newline at end of file diff --git a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts new file mode 100644 index 0000000000..427ee7ecaa --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts @@ -0,0 +1,49 @@ +/// +/// +declare namespace oj { + class ojAccordion extends baseComponent { + expanded: Array<{id?: string, index?: number}>|null; + multiple: boolean; + onExpandedChanged: (event: CustomEvent)=> any; + onMultipleChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojAccordion.ojBeforeCollapse)=> any; + onOjBeforeExpand: (event: oj.ojAccordion.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojAccordion.ojCollapse)=> any; + onOjExpand: (event: oj.ojAccordion.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojAccordion { + class ojBeforeCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { + + } + } + interface ojAccordionEventMap extends oj.baseComponentEventMap { + 'ojBeforeCollapse': oj.ojAccordion.ojBeforeCollapse; + 'ojBeforeExpand': oj.ojAccordion.ojBeforeExpand; + 'ojCollapse': oj.ojAccordion.ojCollapse; + 'ojExpand': oj.ojAccordion.ojExpand; + 'expandedChanged': CustomEvent; + 'multipleChanged': CustomEvent; + } + interface ojAccordionSettableProperties extends baseComponentSettableProperties { + expanded: Array|Array|Array<{id?: string, index?: number}>|null; + multiple: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts new file mode 100644 index 0000000000..bd4b77f2c6 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts @@ -0,0 +1,19 @@ +declare namespace oj { + namespace AnimationUtils { + function collapse(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; + function expand(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; + function fadeIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; + function fadeOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; + function flipIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; + function flipOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; + function ripple(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, offsetX?: string, offsetY?: string, color?: string, diameter?: string, startOpacity?: number, endOpacity?: number}): Promise; + function slideIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; + function slideOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; + function zoomIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; + function zoomOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; + } + namespace AnimationUtils { + type AnimationMethods = 'collapse'|'expand'|'fadeIn'|'fadeOut'|'flipIn'|'flipOut'|'ripple'|'slideIn'|'slideOut'|'zoomIn'|'zoomOut'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts new file mode 100644 index 0000000000..dddaf2290a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts @@ -0,0 +1,22 @@ +/// +declare namespace oj { + class ArrayDataProvider implements DataProvider { + constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keys?: Array|(()=> Array), idAttribute?: string|Array, keyAttributes?: string|Array}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} +declare namespace oj { + interface SortComparators { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts new file mode 100644 index 0000000000..dbb445c36f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts @@ -0,0 +1,18 @@ +/// +declare namespace oj { + class ArrayTreeDataProvider implements TreeDataProvider { + constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keyAttributes?: string|Array, keyAttributesScope?: 'global'|'siblings', childrenAttribute?: string}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getChildDataProvider(any): ArrayTreeDataProvider + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts new file mode 100644 index 0000000000..bfdda53359 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts @@ -0,0 +1,28 @@ +declare namespace oj { + class ojAvatar extends JetElement { + initials: string; + size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; + src: string; + onInitialsChanged: (event: CustomEvent)=> any; + onSizeChanged: (event: CustomEvent)=> any; + onSrcChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojAvatarEventMap extends oj.JetElementEventMap { + 'initialsChanged': CustomEvent; + 'sizeChanged': CustomEvent; + 'srcChanged': CustomEvent; + } + interface ojAvatarSettableProperties extends JetSettableProperties { + initials: string; + size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; + src: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts new file mode 100644 index 0000000000..22df674702 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts @@ -0,0 +1,144 @@ +/// +declare namespace oj { + class ojButton extends baseComponent { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojButton.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojButton { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojButtonEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojButton.ojAction; + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + } + interface ojButtonSettableProperties extends baseComponentSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + } + +} +declare namespace oj { + abstract class ojButtonset extends baseComponent { + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetEventMap extends oj.baseComponentEventMap { + } + interface ojButtonsetSettableProperties extends baseComponentSettableProperties { + } + +} +declare namespace oj { + class ojButtonsetMany extends ojButtonset { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: Array|null; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onFocusManagementChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetManyEventMap extends oj.ojButtonsetEventMap { + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'focusManagementChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: Array|null; + } + +} +declare namespace oj { + class ojButtonsetOne extends ojButtonset { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: any; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onFocusManagementChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojButtonsetOneEventMap extends oj.ojButtonsetEventMap { + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'focusManagementChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + focusManagement: 'oneTabstop'|'none'; + value: any; + } + +} +declare namespace oj { + class ojMenuButton extends ojButton { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + onChromingChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojMenuButton.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojMenuButton { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojMenuButtonEventMap extends oj.ojButtonEventMap { + 'ojAction': oj.ojMenuButton.ojAction; + 'chromingChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayChanged': CustomEvent; + } + interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { + chroming: 'full'|'half'|'outlined'; + disabled: boolean; + display: 'all'|'icons'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts new file mode 100644 index 0000000000..f2e3354441 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts @@ -0,0 +1,822 @@ +/// +/// +declare namespace oj { + class ojChart extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; + animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; + as: string; + coordinateSystem: 'polar'|'cartesian'; + data: oj.DataProvider|null; + dataCursor: 'off'|'on'|'auto'; + dataCursorBehavior: 'smooth'|'snap'|'auto'; + dataCursorPosition: {x: number|string, y: number, y2: number}; + dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); + dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; + dragMode: 'pan'|'zoom'|'select'|'off'|'user'; + drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; + groupComparator: ((param0: object, param1: Object)=> number)|null; + hiddenCategories: Array; + hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + initialZooming: 'first'|'last'|'none'; + legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; + orientation: 'horizontal'|'vertical'; + otherThreshold: number; + overview: {content: object, height: string, rendered: 'on'|'off'}; + pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; + plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; + polarGridShape: 'polygon'|'circle'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + seriesComparator: ((param0: object, param1: Object)=> number)|null; + sorting: 'ascending'|'descending'|'off'; + splitDualY: 'on'|'off'|'auto'; + splitterPosition: number; + stack: 'on'|'off'; + stackLabel: 'on'|'off'; + styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; + timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; + tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; + valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; + xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; + y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; + yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; + zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; + zoomDirection: 'x'|'y'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onCoordinateSystemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDataCursorChanged: (event: CustomEvent)=> any; + onDataCursorBehaviorChanged: (event: CustomEvent)=> any; + onDataCursorPositionChanged: (event: CustomEvent)=> any; + onDataLabelChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onDragModeChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupComparatorChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onInitialZoomingChanged: (event: CustomEvent)=> any; + onLegendChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onOtherThresholdChanged: (event: CustomEvent)=> any; + onOverviewChanged: (event: CustomEvent)=> any; + onPieCenterChanged: (event: CustomEvent)=> any; + onPlotAreaChanged: (event: CustomEvent)=> any; + onPolarGridShapeChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSeriesComparatorChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onSplitDualYChanged: (event: CustomEvent)=> any; + onSplitterPositionChanged: (event: CustomEvent)=> any; + onStackChanged: (event: CustomEvent)=> any; + onStackLabelChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTimeAxisTypeChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueFormatsChanged: (event: CustomEvent)=> any; + onXAxisChanged: (event: CustomEvent)=> any; + onY2AxisChanged: (event: CustomEvent)=> any; + onYAxisChanged: (event: CustomEvent)=> any; + onZoomAndScrollChanged: (event: CustomEvent)=> any; + onZoomDirectionChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojChart.ojDrill)=> any; + onOjSelectInput: (event: oj.ojChart.ojSelectInput)=> any; + onOjViewportChange: (event: oj.ojChart.ojViewportChange)=> any; + onOjViewportChangeInput: (event: oj.ojChart.ojViewportChangeInput)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojChart.PieCenterLabelContext|oj.ojChart.LegendItemContext|oj.ojChart.ReferenceObject|oj.ojChart.GroupContext|oj.ojChart.AxisTitleContext|oj.ojChart.ItemContext|oj.ojChart.SeriesContext; + getDataItem(seriesIndex: number, groupIndex: number): object|null; + getGroup(groupIndex: string): string; + getGroupCount(): number; + getLegend(): object; + getPlotArea(): object; + getSeries(seriesIndex: string): string; + getSeriesCount(): number; + getValuesAt(x: number, y: number): object; + getXAxis(): object; + getY2Axis(): object; + getYAxis(): object; + } + namespace ojChart { + class ojDrill extends CustomEvent<{id: string, series: string, group: string, data: object, itemData: object, seriesData: object, groupData: Array, [propName: string]: any}> { + + } + + class ojSelectInput extends CustomEvent<{items: Array, selectionData: Array<{data: object, itemData: object, groupData: Array, seriesData: object}>, endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + + class ojViewportChange extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + + class ojViewportChangeInput extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { + + } + } + interface ojChartEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojChart.ojDrill; + 'ojSelectInput': oj.ojChart.ojSelectInput; + 'ojViewportChange': oj.ojChart.ojViewportChange; + 'ojViewportChangeInput': oj.ojChart.ojViewportChangeInput; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'coordinateSystemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'dataCursorChanged': CustomEvent; + 'dataCursorBehaviorChanged': CustomEvent; + 'dataCursorPositionChanged': CustomEvent; + 'dataLabelChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'dragModeChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupComparatorChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'hideAndShowBehaviorChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'initialZoomingChanged': CustomEvent; + 'legendChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'otherThresholdChanged': CustomEvent; + 'overviewChanged': CustomEvent; + 'pieCenterChanged': CustomEvent; + 'plotAreaChanged': CustomEvent; + 'polarGridShapeChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'seriesComparatorChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'splitDualYChanged': CustomEvent; + 'splitterPositionChanged': CustomEvent; + 'stackChanged': CustomEvent; + 'stackLabelChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'timeAxisTypeChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueFormatsChanged': CustomEvent; + 'xAxisChanged': CustomEvent; + 'y2AxisChanged': CustomEvent; + 'yAxisChanged': CustomEvent; + 'zoomAndScrollChanged': CustomEvent; + 'zoomDirectionChanged': CustomEvent; + } + interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; + animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; + as: string; + coordinateSystem: 'polar'|'cartesian'; + data: oj.DataProvider|null; + dataCursor: 'off'|'on'|'auto'; + dataCursorBehavior: 'smooth'|'snap'|'auto'; + dataCursorPosition: {x: number|string, y: number, y2: number}; + dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); + dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; + dragMode: 'pan'|'zoom'|'select'|'off'|'user'; + drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; + groupComparator: ((param0: object, param1: Object)=> number)|null; + hiddenCategories: Array; + hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + initialZooming: 'first'|'last'|'none'; + legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; + orientation: 'horizontal'|'vertical'; + otherThreshold: number; + overview: {content: object, height: string, rendered: 'on'|'off'}; + pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; + plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; + polarGridShape: 'polygon'|'circle'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + seriesComparator: ((param0: object, param1: Object)=> number)|null; + sorting: 'ascending'|'descending'|'off'; + splitDualY: 'on'|'off'|'auto'; + splitterPosition: number; + stack: 'on'|'off'; + stackLabel: 'on'|'off'; + styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; + timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; + tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; + valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; + xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; + y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; + yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; + zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; + zoomDirection: 'x'|'y'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; + } + namespace ojChart { + type AxisTitleContext = + { + axis: 'xAxis'|'yAxis'|'y2Axis', subId: string + } + } + namespace ojChart { + type DataLabelContext = + { + id: any, series: string, group: string|Array, value: number, targetValue: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, label: string, totalValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element + } + } + namespace ojChart { + type GroupContext = + { + indexPath: Array, subId: string + } + } + namespace ojChart { + type ItemContext = + { + seriesIndex: number, itemIndex: number, subId: string + } + } + namespace ojChart { + type LegendItemContext = + { + sectionIndexPath: Array, itemIndex: number, subId: string + } + } + namespace ojChart { + type PieCenterContext = + { + outerBounds: object, innerBounds: object, label: string, componentElement: Element + } + } + namespace ojChart { + type PieCenterLabelContext = + { + subId: string + } + } + namespace ojChart { + type ReferenceObject = + { + axis: 'xAxis'|'yAxis'|'y2Axis', index: number, subId: string + } + } + namespace ojChart { + type SeriesContext = + { + itemIndex: number, subId: string + } + } + namespace ojChart { + type TooltipContext = + { + parentElement: Element, id: any, series: string, group: string|Array, label: string, value: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, targetValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element, color: string + } + } + +} +declare namespace oj { + class ojChartGroup extends JetElement { + drilling?: 'on'|'off'|'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + onDrillingChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartGroupEventMap extends oj.JetElementEventMap { + 'drillingChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + } + interface ojChartGroupSettableProperties extends JetSettableProperties { + drilling?: 'on'|'off'|'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + } + +} +declare namespace oj { + class ojChartItem extends JetElement { + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + close?: number; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupId: Array; + high?: number; + items?: Array|Array; + label?: string|Array; + labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; + labelStyle?: object|Array; + low?: number; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number|string; + y?: number; + z?: number; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onBoxPlotChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onCloseChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupIdChanged: (event: CustomEvent)=> any; + onHighChanged: (event: CustomEvent)=> any; + onItemsChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLowChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onOpenChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onQ1Changed: (event: CustomEvent)=> any; + onQ2Changed: (event: CustomEvent)=> any; + onQ3Changed: (event: CustomEvent)=> any; + onSeriesIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTargetValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVolumeChanged: (event: CustomEvent)=> any; + onXChanged: (event: CustomEvent)=> any; + onYChanged: (event: CustomEvent)=> any; + onZChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'boxPlotChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'closeChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupIdChanged': CustomEvent; + 'highChanged': CustomEvent; + 'itemsChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'lowChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'openChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'q1Changed': CustomEvent; + 'q2Changed': CustomEvent; + 'q3Changed': CustomEvent; + 'seriesIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'targetValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'volumeChanged': CustomEvent; + 'xChanged': CustomEvent; + 'yChanged': CustomEvent; + 'zChanged': CustomEvent; + } + interface ojChartItemSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + close?: number; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupId: Array; + high?: number; + items?: Array|Array; + label?: string|Array; + labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; + labelStyle?: object|Array; + low?: number; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number|string; + y?: number; + z?: number; + } + +} +declare namespace oj { + class ojChartSeries extends JetElement { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on'|'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + color?: string; + displayInLegend?: 'on'|'off'|'auto'; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; + onAreaColorChanged: (event: CustomEvent)=> any; + onAreaSvgClassNameChanged: (event: CustomEvent)=> any; + onAreaSvgStyleChanged: (event: CustomEvent)=> any; + onAssignedToY2Changed: (event: CustomEvent)=> any; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onBoxPlotChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDisplayInLegendChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineTypeChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onMarkerColorChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; + onMarkerSvgStyleChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onPieSliceExplodeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onStackCategoryChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojChartSeriesEventMap extends oj.JetElementEventMap { + 'areaColorChanged': CustomEvent; + 'areaSvgClassNameChanged': CustomEvent; + 'areaSvgStyleChanged': CustomEvent; + 'assignedToY2Changed': CustomEvent; + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'boxPlotChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'displayInLegendChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineTypeChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'markerColorChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'markerSvgClassNameChanged': CustomEvent; + 'markerSvgStyleChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'pieSliceExplodeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'stackCategoryChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojChartSeriesSettableProperties extends JetSettableProperties { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on'|'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; + categories?: Array; + color?: string; + displayInLegend?: 'on'|'off'|'auto'; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on'|'off'|'auto'; + markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; + } + +} +declare namespace oj { + class ojSparkChart extends dvtBaseComponent> { + animationDuration: number|null; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero'|'min'; + color: string; + data: oj.DataProvider|null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted'|'dashed'|'solid'; + lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; + markerSize: number; + referenceObjects: Array; + svgClassName: string; + svgStyle: object; + tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + type: 'area'|'lineWithArea'|'bar'|'line'; + visualEffects: 'none'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAreaColorChanged: (event: CustomEvent)=> any; + onAreaSvgClassNameChanged: (event: CustomEvent)=> any; + onAreaSvgStyleChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onBarGapRatioChanged: (event: CustomEvent)=> any; + onBaselineScalingChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onFirstColorChanged: (event: CustomEvent)=> any; + onHighColorChanged: (event: CustomEvent)=> any; + onLastColorChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineTypeChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onLowColorChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onReferenceObjectsChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getDataItem(itemIndex: number): oj.ojSparkChart.ItemContext|null; + } + interface ojSparkChartEventMap extends oj.dvtBaseComponentEventMap { + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'areaColorChanged': CustomEvent; + 'areaSvgClassNameChanged': CustomEvent; + 'areaSvgStyleChanged': CustomEvent; + 'asChanged': CustomEvent; + 'barGapRatioChanged': CustomEvent; + 'baselineScalingChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'firstColorChanged': CustomEvent; + 'highColorChanged': CustomEvent; + 'lastColorChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineTypeChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'lowColorChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'referenceObjectsChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number|null; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero'|'min'; + color: string; + data: oj.DataProvider|null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted'|'dashed'|'solid'; + lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; + markerSize: number; + referenceObjects: Array; + svgClassName: string; + svgStyle: object; + tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + type: 'area'|'lineWithArea'|'bar'|'line'; + visualEffects: 'none'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojSparkChart { + type Item = + { + borderColor: string, color: string, date: Date, high: number, low: number, markerDisplayed: 'on'|'off', markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'|string, markerSize: number, svgClassName: string, svgStyle: object, value: number + } + } + namespace ojSparkChart { + type ItemContext = + { + borderColor: string, color: string, date: Date, high: number, low: number, value: number + } + } + namespace ojSparkChart { + type ReferenceObject = + { + color?: string, high?: number, lineWidth?: number, lineStyle: 'dotted'|'dashed'|'solid', location: 'front'|'back', low?: number, svgClassName?: string, svgStyle?: object, type: 'area'|'line', value?: number + } + } + namespace ojSparkChart { + type TooltipContext = + { + color: string, componentElement: Element, parentElement: Element + } + } + +} +declare namespace oj { + class ojSparkChartItem extends JetElement { + borderColor: string; + color: string; + date: string; + high: number|null; + low: number|null; + markerDisplayed: 'off'|'on'; + markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDateChanged: (event: CustomEvent)=> any; + onHighChanged: (event: CustomEvent)=> any; + onLowChanged: (event: CustomEvent)=> any; + onMarkerDisplayedChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSizeChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojSparkChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'dateChanged': CustomEvent; + 'highChanged': CustomEvent; + 'lowChanged': CustomEvent; + 'markerDisplayedChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSizeChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSparkChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + color: string; + date: string; + high: number|null; + low: number|null; + markerDisplayed: 'off'|'on'; + markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts new file mode 100644 index 0000000000..6972efe009 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts @@ -0,0 +1,47 @@ +/// +declare namespace oj { + class ojCheckboxset extends editableValue, ojCheckboxsetSettableProperties> { + disabled: boolean; + labelledBy: string|null; + required: boolean; + value: Array; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojCheckboxset.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojCheckboxset.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojCheckboxset { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojCheckboxsetEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojCheckboxset.ojAnimateEnd; + 'ojAnimateStart': oj.ojCheckboxset.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojCheckboxsetSettableProperties extends editableValueSettableProperties> { + disabled: boolean; + labelledBy: string|null; + required: boolean; + value: Array; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts new file mode 100644 index 0000000000..4784d83c1c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts @@ -0,0 +1,52 @@ +/// +declare namespace oj { + class ojCollapsible extends baseComponent { + disabled: boolean; + expandArea: 'header'|'disclosureIcon'; + expanded: boolean; + onDisabledChanged: (event: CustomEvent)=> any; + onExpandAreaChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojCollapsible.ojBeforeCollapse)=> any; + onOjBeforeExpand: (event: oj.ojCollapsible.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojCollapsible.ojCollapse)=> any; + onOjExpand: (event: oj.ojCollapsible.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojCollapsible { + class ojBeforeCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { + + } + } + interface ojCollapsibleEventMap extends oj.baseComponentEventMap { + 'ojBeforeCollapse': oj.ojCollapsible.ojBeforeCollapse; + 'ojBeforeExpand': oj.ojCollapsible.ojBeforeExpand; + 'ojCollapse': oj.ojCollapsible.ojCollapse; + 'ojExpand': oj.ojCollapsible.ojExpand; + 'disabledChanged': CustomEvent; + 'expandAreaChanged': CustomEvent; + 'expandedChanged': CustomEvent; + } + interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + expandArea: 'header'|'disclosureIcon'; + expanded: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts new file mode 100644 index 0000000000..08bd5b25c8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts @@ -0,0 +1,17 @@ +/// +declare namespace oj { + class CollectionDataProvider implements DataProvider { + constructor(collection: oj.Collection); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName?: string): any + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts new file mode 100644 index 0000000000..0c8397621c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts @@ -0,0 +1,179 @@ +declare namespace oj { + class Color { + static ALICEBLUE: oj.Color; + static ANTIQUEWHITE: oj.Color; + static AQUA: oj.Color; + static AQUAMARINE: oj.Color; + static AZURE: oj.Color; + static BEIGE: oj.Color; + static BISQUE: oj.Color; + static BLACK: oj.Color; + static BLANCHEDALMOND: oj.Color; + static BLUE: oj.Color; + static BLUEVIOLET: oj.Color; + static BROWN: oj.Color; + static BURLYWOOD: oj.Color; + static CADETBLUE: oj.Color; + static CHARTREUSE: oj.Color; + static CHOCOLATE: oj.Color; + static CORAL: oj.Color; + static CORNFLOWERBLUE: oj.Color; + static CORNSILK: oj.Color; + static CRIMSON: oj.Color; + static CYAN: oj.Color; + static DARKBLUE: oj.Color; + static DARKCYAN: oj.Color; + static DARKGOLDENROD: oj.Color; + static DARKGRAY: oj.Color; + static DARKGREEN: oj.Color; + static DARKGREY: oj.Color; + static DARKKHAKI: oj.Color; + static DARKMAGENTA: oj.Color; + static DARKOLIVEGREEN: oj.Color; + static DARKORANGE: oj.Color; + static DARKORCHID: oj.Color; + static DARKRED: oj.Color; + static DARKSALMON: oj.Color; + static DARKSEAGREEN: oj.Color; + static DARKSLATEBLUE: oj.Color; + static DARKSLATEGRAY: oj.Color; + static DARKSLATEGREY: oj.Color; + static DARKTURQUOISE: oj.Color; + static DARKVIOLET: oj.Color; + static DEEPPINK: oj.Color; + static DEEPSKYBLUE: oj.Color; + static DIMGRAY: oj.Color; + static DIMGREY: oj.Color; + static DODGERBLUE: oj.Color; + static FIREBRICK: oj.Color; + static FLORALWHITE: oj.Color; + static FORESTGREEN: oj.Color; + static FUCHSIA: oj.Color; + static GAINSBORO: oj.Color; + static GHOSTWHITE: oj.Color; + static GOLD: oj.Color; + static GOLDENROD: oj.Color; + static GRAY: oj.Color; + static GREEN: oj.Color; + static GREENYELLOW: oj.Color; + static GREY: oj.Color; + static HONEYDEW: oj.Color; + static HOTPINK: oj.Color; + static INDIANRED: oj.Color; + static INDIGO: oj.Color; + static IVORY: oj.Color; + static KHAKI: oj.Color; + static LAVENDER: oj.Color; + static LAVENDERBLUSH: oj.Color; + static LAWNGREEN: oj.Color; + static LEMONCHIFFON: oj.Color; + static LIGHTBLUE: oj.Color; + static LIGHTCORAL: oj.Color; + static LIGHTCYAN: oj.Color; + static LIGHTGOLDENRODYELLOW: oj.Color; + static LIGHTGRAY: oj.Color; + static LIGHTGREEN: oj.Color; + static LIGHTGREY: oj.Color; + static LIGHTPINK: oj.Color; + static LIGHTSALMON: oj.Color; + static LIGHTSEAGREEN: oj.Color; + static LIGHTSKYBLUE: oj.Color; + static LIGHTSLATEGRAY: oj.Color; + static LIGHTSLATEGREY: oj.Color; + static LIGHTSTEELBLUE: oj.Color; + static LIGHTYELLOW: oj.Color; + static LIME: oj.Color; + static LIMEGREEN: oj.Color; + static LINEN: oj.Color; + static MAGENTA: oj.Color; + static MAROON: oj.Color; + static MEDIUMAQUAMARINE: oj.Color; + static MEDIUMBLUE: oj.Color; + static MEDIUMORCHID: oj.Color; + static MEDIUMPURPLE: oj.Color; + static MEDIUMSEAGREEN: oj.Color; + static MEDIUMSLATEBLUE: oj.Color; + static MEDIUMSPRINGGREEN: oj.Color; + static MEDIUMTURQUOISE: oj.Color; + static MEDIUMVIOLETRED: oj.Color; + static MIDNIGHTBLUE: oj.Color; + static MINTCREAM: oj.Color; + static MISTYROSE: oj.Color; + static MOCCASIN: oj.Color; + static NAVAJOWHITE: oj.Color; + static NAVY: oj.Color; + static OLDLACE: oj.Color; + static OLIVE: oj.Color; + static OLIVEDRAB: oj.Color; + static ORANGE: oj.Color; + static ORANGERED: oj.Color; + static ORCHID: oj.Color; + static PALEGOLDENROD: oj.Color; + static PALEGREEN: oj.Color; + static PALETURQUOISE: oj.Color; + static PALEVIOLETRED: oj.Color; + static PAPAYAWHIP: oj.Color; + static PEACHPUFF: oj.Color; + static PERU: oj.Color; + static PINK: oj.Color; + static PLUM: oj.Color; + static POWDERBLUE: oj.Color; + static PURPLE: oj.Color; + static REBECCAPURPLE: oj.Color; + static RED: oj.Color; + static ROSYBROWN: oj.Color; + static ROYALBLUE: oj.Color; + static SADDLEBROWN: oj.Color; + static SALMON: oj.Color; + static SANDYBROWN: oj.Color; + static SEAGREEN: oj.Color; + static SEASHELL: oj.Color; + static SIENNA: oj.Color; + static SILVER: oj.Color; + static SKYBLUE: oj.Color; + static SLATEBLUE: oj.Color; + static SLATEGRAY: oj.Color; + static SLATEGREY: oj.Color; + static SNOW: oj.Color; + static SPRINGGREEN: oj.Color; + static STEELBLUE: oj.Color; + static TAN: oj.Color; + static TEAL: oj.Color; + static THISTLE: oj.Color; + static TOMATO: oj.Color; + static TRANSPARENT: oj.Color; + static TURQUOISE: oj.Color; + static VIOLET: oj.Color; + static WHEAT: oj.Color; + static WHITE: oj.Color; + static WHITESMOKE: oj.Color; + static YELLOW: oj.Color; + static YELLOWGREEN: oj.Color; + constructor(color: string|oj.Color.RGBA|oj.Color.HSLA|oj.Color.HSVA); + getAlpha(): number; + getBlue(doNotRound?: boolean): number; + getGreen(doNotRound?: boolean): number; + getRed(doNotRound?: boolean): number; + isEqual(color: oj.Color): boolean; + toString(): string; + } + namespace Color { + type HSLA = + { + h: number, s: number, l: number, a?: number + } + } + namespace Color { + type HSVA = + { + h: number, s: number, v: number, a?: number + } + } + namespace Color { + type RGBA = + { + r: number, g: number, b: number, a?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts new file mode 100644 index 0000000000..34aaa0e23e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts @@ -0,0 +1,56 @@ +/// +declare namespace oj { + class ojColorPalette extends editableValue { + labelDisplay: 'auto'|'off'; + labelledBy: string|null; + layout: 'grid'|'list'; + palette: Array<{color: oj.Color, label?: string}>; + swatchSize: 'xs'|'sm'|'lg'; + value: oj.Color; + translations: {labelNone?: string}; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onPaletteChanged: (event: CustomEvent)=> any; + onSwatchSizeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojColorPalette.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojColorPalette.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): any; + setProperty(property: string, value: any): any; + } + namespace ojColorPalette { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojColorPaletteEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojColorPalette.ojAnimateEnd; + 'ojAnimateStart': oj.ojColorPalette.ojAnimateStart; + 'labelDisplayChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'paletteChanged': CustomEvent; + 'swatchSizeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojColorPaletteSettableProperties extends editableValueSettableProperties { + labelDisplay: 'auto'|'off'; + labelledBy: string|null; + layout: 'grid'|'list'; + palette: Array<{color: oj.Color, label?: string}>; + swatchSize: 'xs'|'sm'|'lg'; + value: oj.Color; + translations: {labelNone?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts new file mode 100644 index 0000000000..f5e8308c9c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts @@ -0,0 +1,44 @@ +/// +declare namespace oj { + class ojColorSpectrum extends editableValue { + labelledBy: string|null; + readonly transientValue: oj.Color; + value: oj.Color; + translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; + onLabelledByChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojColorSpectrum.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojColorSpectrum.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): any; + setProperty(property: string, value: any): any; + } + namespace ojColorSpectrum { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojColorSpectrumEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojColorSpectrum.ojAnimateEnd; + 'ojAnimateStart': oj.ojColorSpectrum.ojAnimateStart; + 'labelledByChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { + labelledBy: string|null; + readonly transientValue: oj.Color; + value: oj.Color; + translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts new file mode 100644 index 0000000000..0bb4197939 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts @@ -0,0 +1,31 @@ +declare namespace oj { + abstract class baseComponent extends JetElement { + translations: object|null; + + onTranslationsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface baseComponentEventMap extends oj.JetElementEventMap { + 'translationsChanged': CustomEvent; + } + interface baseComponentSettableProperties extends JetSettableProperties { + translations: object|null; + } + +} +declare namespace oj { + class Components { + static subtreeAttached(node: Element): void; + static subtreeDetached(node: Element): void; + static subtreeHidden(node: Element): void; + static subtreeShown(node: Element, options?: {initialRender: boolean}): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts new file mode 100644 index 0000000000..aeb13c443b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts @@ -0,0 +1,31 @@ +declare namespace oj { + namespace Composite { + function getComponentMetadata(name: string): oj.Composite.Metadata|null; + function register(name: string, descriptor: {metadata: oj.Composite.Metadata, view: string, viewModel: ((param0: oj.Composite.ViewModelContext)=> void|object), parseFunction: ((value: string, name: string, meta: Object, defaultParseFunction: (value: string)=> any)=>any)}): void; + } + namespace Composite { + type Metadata = + { + name: string, version: string, jetVersion: string, properties?: object, methods?: object, events?: object, slots?: object + } + } + namespace Composite { + type PropertyChangedContext = + { + property: string, value: any, previousValue: any, updatedFrom: 'external'|'internal', subproperty?: {path: string, value: any, previousValue: any} + } + } + namespace Composite { + type ViewModel = + { + activated: ((param0: oj.Composite.ViewModelContext)=> Promise|void), connected: ((param0: oj.Composite.ViewModelContext)=> void), bindingsApplied: ((param0: oj.Composite.ViewModelContext)=> void), propertyChanged: ((param0: oj.Composite.PropertyChangedContext)=> void), disconnected: ((param0: Element)=> void) + } + } + namespace Composite { + type ViewModelContext = + { + element: Element, properties: object, slotCounts: object, unique: string, uniqueId: string + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts new file mode 100644 index 0000000000..f7463f449e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts @@ -0,0 +1,23 @@ +/// +declare namespace oj { + class ojConveyorBelt extends baseComponent { + contentParent: string|null; + orientation: 'horizontal'|'vertical'; + onContentParentChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojConveyorBeltEventMap extends oj.baseComponentEventMap { + 'contentParentChanged': CustomEvent; + 'orientationChanged': CustomEvent; + } + interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { + contentParent: string|null; + orientation: 'horizontal'|'vertical'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts new file mode 100644 index 0000000000..2d23485157 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts @@ -0,0 +1,123 @@ +declare namespace oj { + class BusyContext { + static applicationBootstrapComplete(): undefined; + static setDefaultTimeout(timeout: number): undefined; + addBusyState(options: {description: object|(()=> string)}): (()=> void); + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{id:string, description:string}>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean|Error)>; + } + +} +declare namespace oj { + class Config { + static getAutomationMode(): string; + static getDeviceType(): 'phone'|'tablet'|'others'; + static getLocale(): string; + static getResourceUrl(relativePath: string): string; + static getVersionInfo(): string; + static logVersionInfo(): undefined; + static setAutomationMode(mode: string): undefined; + static setLocale(locale: string, callback?: (()=> void)): undefined; + static setResourceBaseUrl(baseUrl: string): undefined; + } + +} +declare namespace oj { + class Context { + static getContext(node: Element): oj.Context; + static getPageContext(): oj.Context; + getBusyContext(): oj.BusyContext; + } + +} +declare namespace oj { + class Logger { + static readonly LEVEL_ERROR: number; + static readonly LEVEL_INFO: number; + static readonly LEVEL_LOG: number; + static readonly LEVEL_NONE: number; + static readonly LEVEL_WARN: number; + static error(...args: (object|string|number)[]): void; + static info(...args: (object|string|number)[]): void; + static log(...args: (object|string|number)[]): void; + static option(key?: object|string, value?: any): any; + static warn(...args: (object|string|number)[]): void; + } + +} +declare namespace oj { + class Object { + constructor(); + static compareValues(obj1: any, obj2: any): boolean; + static copyPropertiesForClass(targetClass: object, source: object): void; + static createCallback(obj: object, func: object): ()=>any; + static createSubclass(extendingClass: object, baseClass: object, typeName?: string): void; + static ensureClassInitialization(clazz: object): void; + static getTypeName(): string; + static isEmpty(): boolean; + clone(): object; + equals(object: object): boolean; + getClass(otherInstance?: object): object; + getTypeName(clazz: object|null): string; + Init(): void; + toDebugString(): string; + toString(): string; + } + +} +declare namespace oj { + class ResponsiveUtils { + static compare(size1: oj.ResponsiveUtils.SCREEN_RANGE, size2: oj.ResponsiveUtils.SCREEN_RANGE): number; + static getFrameworkQuery(frameworkQueryKey: oj.ResponsiveUtils.FRAMEWORK_QUERY_KEY): string|null; + } + namespace ResponsiveUtils { + enum FRAMEWORK_QUERY_KEY { + SM_UP = "sm-up", + MD_UP = "md-up", + LG_UP = "lg-up", + XL_UP = "xl-up", + XXL_UP = "xxl-up", + SM_ONLY = "sm-only", + MD_ONLY = "md-only", + LG_ONLY = "lg-only", + XL_ONLY = "xl-only", + MD_DOWN = "md-down", + LG_DOWN = "lg-down", + XL_DOWN = "xl-down", + HIGH_RESOLUTION = "high-resolution", + } + enum SCREEN_RANGE { + SM = "sm", + MD = "md", + LG = "lg", + XL = "xl", + XXL = "xxl", + } + } + + +} +declare namespace oj { + class ThemeUtils { + constructor(); + static clearCache(): void; + static getThemeName(): string|null; + static getThemeTargetPlatform(): string|null; + static parseJSONFromFontFamily(selector: string): any; + } + +} +declare namespace oj { + class Translations { + static applyParameters(pattern: string, parameters: object|Array): string|null; + static getComponentTranslations(componentName: string): object; + static getResource(key: string): object|string|null; + static getTranslatedString(key: string, ...var_args: (string|object|Array)[]): string; + static setBundle(bundle: object): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts new file mode 100644 index 0000000000..45cd10f459 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts @@ -0,0 +1,254 @@ +declare namespace oj { + interface AttributeFilterOperator { + attribute: string; + op: oj.AttributeFilterOperator.AttributeOperator; + value: any; + } + namespace AttributeFilterOperator { + enum AttributeOperator { + $co, + $eq, + $ew, + $pr, + $gt, + $ge, + $lt, + $le, + $ne, + $regex, + $sw, + } + } + + +} +declare namespace oj { + interface CompoundFilterOperator { + criteria: FilterOperator[]; + op: oj.CompoundFilterOperator.CompoundOperator; + } + namespace CompoundFilterOperator { + enum CompoundOperator { + $and, + $or, + } + } + + +} +declare namespace oj { + interface ContainsKeysResults { + containsParameters: FetchByKeysParameters; + results: Set; + } + +} +declare namespace oj { + interface DataMapping { + mapFields: (item: Item) => Item; + mapFilterCriterion?: (filterCriterion: FilterOperator[]) => FilterOperator[]; + mapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; + unmapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; + } + +} +declare namespace oj { + interface DataProvider extends EventTarget { + containsKeys(parameters : FetchByKeysParameters) : Promise> + fetchByKeys(parameters : FetchByKeysParameters) : Promise> + fetchByOffset(parameters: FetchByOffsetParameters): Promise> + fetchFirst(FetchListParameters?): AsyncIterable> + getCapability(capabilityName: string): any + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown' + } + +} +declare namespace oj { + interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { + afterKeys?: Set; + } + +} +declare namespace oj { + class DataProviderMutationEvent implements Event { + AT_TARGET: number; + BUBBLING_PHASE: number; + CAPTURING_PHASE: number; + NONE: number; + bubbles: boolean; + cancelBubble: boolean; + cancelable: boolean; + composed: boolean; + currentTarget: EventTarget; + deepPath: () => EventTarget[]; + defaultPrevented: boolean; + detail: DataProviderMutationEventDetail; + eventPhase: number; + initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; + isTrusted: boolean; + preventDefault: () => void; + returnValue: boolean; + scoped: boolean; + srcElement: Element|null; + stopImmediatePropagation: () => void; + stopPropagation: () => void; + target: EventTarget; + timeStamp: number; + type: string; + constructor(detail: DataProviderMutationEventDetail); + } + +} +declare namespace oj { + interface DataProviderMutationEventDetail { + add?: DataProviderAddOperationEventDetail; + remove?: DataProviderOperationEventDetail; + update?: DataProviderOperationEventDetail; + } + +} +declare namespace oj { + interface DataProviderOperationEventDetail { + data?: D[]; + indexes?: number[]; + keys: Set; + metadata?: ItemMetadata[]; + } + +} +declare namespace oj { + class DataProviderRefreshEvent implements Event { + AT_TARGET: number; + BUBBLING_PHASE: number; + CAPTURING_PHASE: number; + NONE: number; + bubbles: boolean; + cancelBubble: boolean; + cancelable: boolean; + composed: boolean; + currentTarget: EventTarget; + deepPath: () => EventTarget[]; + defaultPrevented: boolean; + eventPhase: number; + initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; + isTrusted: boolean; + preventDefault: () => void; + returnValue: boolean; + scoped: boolean; + srcElement: Element|null; + stopImmediatePropagation: () => void; + stopPropagation: () => void; + target: EventTarget; + timeStamp: number; + type: string; + constructor(); + } + +} +declare namespace oj { + interface FetchByKeysCapability { + implementation: 'iteration'|'lookup'; + } + +} +declare namespace oj { + class FetchByKeysMixin { + static applyMixin(derivedCtor: Function): any; + } + +} +declare namespace oj { + interface FetchByKeysParameters { + keys: Set; + } + +} +declare namespace oj { + interface FetchByKeysResults { + fetchParameters: FetchByKeysParameters; + results: Map>; + } + +} +declare namespace oj { + interface FetchByOffsetCapability { + implementation: 'iteration'|'randomAccess'; + } + +} +declare namespace oj { + class FetchByOffsetMixin { + static applyMixin(derivedCtor: Function): any; + } + +} +declare namespace oj { + interface FetchByOffsetParameters extends FetchListParameters { + offset: number; + } + +} +declare namespace oj { + interface FetchByOffsetResults { + done: boolean; + fetchParameters: FetchByOffsetParameters; + results: Array>; + } + +} +declare namespace oj { + interface FetchListParameters { + filterCriterion?: FilterOperator; + size: number; + sortCriteria?: SortCriterion[]; + } + +} +declare namespace oj { + interface FetchListResult { + data: D[]; + fetchParameters: FetchListParameters; + metadata: ItemMetadata[]; + } + +} +declare namespace oj { + interface FilterCapability { + operators: Array; + } + +} +declare namespace oj { + interface FilterOperator { + op: oj.AttributeFilterOperator.AttributeOperator|oj.CompoundFilterOperator.CompoundOperator; + filter(data: Array): Array; + } + +} +declare namespace oj { + interface Item { + data: D; + metadata: ItemMetadata; + } + +} +declare namespace oj { + interface ItemMetadata { + key: K; + } + +} +declare namespace oj { + interface SortCapability { + attributes: 'none'|'single'|'multiple'; + } + +} +declare namespace oj { + interface SortCriterion { + attribute: keyof D; + direction: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts new file mode 100644 index 0000000000..707a963de7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts @@ -0,0 +1,308 @@ +/// +/// +/// +declare namespace oj { + class ojDatePicker extends ojInputDate { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDatePicker.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDatePicker.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojDatePicker { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojDatePickerEventMap extends oj.ojInputDateEventMap { + 'ojAnimateEnd': oj.ojDatePicker.ojAnimateEnd; + 'ojAnimateStart': oj.ojDatePicker.ojAnimateStart; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + } + +} +declare namespace oj { + class ojDateTimePicker extends ojInputDateTime { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDateTimePicker.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDateTimePicker.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojDateTimePicker { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojDateTimePickerEventMap extends oj.ojInputDateTimeEventMap { + 'ojAnimateEnd': oj.ojDateTimePicker.ojAnimateEnd; + 'ojAnimateStart': oj.ojDateTimePicker.ojAnimateStart; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { + keyboardEdit: 'disabled'; + max: string|null; + min: string|null; + renderMode: 'jet'; + value: string; + } + +} +declare namespace oj { + class ojInputDate extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter; + datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; + dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); + dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onDatePickerChanged: (event: CustomEvent)=> any; + onDayFormatterChanged: (event: CustomEvent)=> any; + onDayMetaDataChanged: (event: CustomEvent)=> any; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputDate.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputDate.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hide(): void; + refresh(): void; + show(): void; + } + namespace ojInputDate { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputDateEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputDate.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputDate.ojAnimateStart; + 'converterChanged': CustomEvent; + 'datePickerChanged': CustomEvent; + 'dayFormatterChanged': CustomEvent; + 'dayMetaDataChanged': CustomEvent; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputDateSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; + dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); + dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + } + namespace ojInputDate { + type DayFormatterInput = + { + fullYear: number, month: number, date: number + } + } + namespace ojInputDate { + type DayFormatterOutput = + { + disabled?: boolean, className?: string, tooltip?: string + } + } + +} +declare namespace oj { + class ojInputDateTime extends ojInputDate { + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: string|null; + min: string|null; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onTimePickerChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputDateTime.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputDateTime.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hideTimePicker(): void; + show(): void; + showTimePicker(): void; + } + namespace ojInputDateTime { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputDateTimeEventMap extends oj.ojInputDateEventMap { + 'ojAnimateEnd': oj.ojInputDateTime.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputDateTime.ojAnimateStart; + 'converterChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'timePickerChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: string|null; + min: string|null; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; + } + +} +declare namespace oj { + class ojInputTime extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onKeyboardEditChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onTimePickerChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputTime.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputTime.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + hide(): void; + refresh(): void; + show(): void; + } + namespace ojInputTime { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputTimeEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputTime.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputTime.ojAnimateStart; + 'converterChanged': CustomEvent; + 'keyboardEditChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'timePickerChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojInputTimeSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter; + keyboardEdit: 'enabled'|'disabled'; + max: string|null; + min: string|null; + pickerAttributes: {style?: string, class?: string}; + renderMode: 'jet'|'native'; + timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; + validators: Array|oj.Validation.RegisteredValidator>; + value: string; + translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts new file mode 100644 index 0000000000..7672ac8a35 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + class ojDefer extends JetElement { + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojDeferEventMap extends oj.JetElementEventMap { + } + interface ojDeferSettableProperties extends JetSettableProperties { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts new file mode 100644 index 0000000000..0df017ec3c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts @@ -0,0 +1,17 @@ +/// +declare namespace oj { + class DeferredDataProvider implements DataProvider { + constructor(dataProvider: Promise>[], capabilityFunc: Function); + addEventListener(eventType: string, listener: EventListener): any; + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName: string): object; + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): any; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts new file mode 100644 index 0000000000..85ea4be39c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts @@ -0,0 +1,127 @@ +/// +declare namespace oj { + class ojDialog extends baseComponent { + cancelBehavior: 'icon'|'escape'|'none'; + dragAffordance: 'title-bar'|'none'; + initialVisibility: 'hide'|'show'; + modality: 'modal'|'modeless'; + position: oj.ojDialog.Position; + resizeBehavior: 'resizable'|'none'; + role: string; + translations: {labelCloseIcon?: string}; + onCancelBehaviorChanged: (event: CustomEvent)=> any; + onDragAffordanceChanged: (event: CustomEvent)=> any; + onInitialVisibilityChanged: (event: CustomEvent)=> any; + onModalityChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + onResizeBehaviorChanged: (event: CustomEvent)=> any; + onRoleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojDialog.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojDialog.ojAnimateStart)=> any; + onOjBeforeClose: (event: oj.ojDialog.ojBeforeClose)=> any; + onOjBeforeOpen: (event: oj.ojDialog.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojDialog.ojClose)=> any; + onOjFocus: (event: oj.ojDialog.ojFocus)=> any; + onOjOpen: (event: oj.ojDialog.ojOpen)=> any; + onOjResize: (event: oj.ojDialog.ojResize)=> any; + onOjResizeStart: (event: oj.ojDialog.ojResizeStart)=> any; + onOjResizeStop: (event: oj.ojDialog.ojResizeStop)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + isOpen(): boolean; + open(): void; + refresh(): void; + } + namespace ojDialog { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojFocus extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResize extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResizeStart extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojResizeStop extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + } + interface ojDialogEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojDialog.ojAnimateEnd; + 'ojAnimateStart': oj.ojDialog.ojAnimateStart; + 'ojBeforeClose': oj.ojDialog.ojBeforeClose; + 'ojBeforeOpen': oj.ojDialog.ojBeforeOpen; + 'ojClose': oj.ojDialog.ojClose; + 'ojFocus': oj.ojDialog.ojFocus; + 'ojOpen': oj.ojDialog.ojOpen; + 'ojResize': oj.ojDialog.ojResize; + 'ojResizeStart': oj.ojDialog.ojResizeStart; + 'ojResizeStop': oj.ojDialog.ojResizeStop; + 'cancelBehaviorChanged': CustomEvent; + 'dragAffordanceChanged': CustomEvent; + 'initialVisibilityChanged': CustomEvent; + 'modalityChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'resizeBehaviorChanged': CustomEvent; + 'roleChanged': CustomEvent; + } + interface ojDialogSettableProperties extends baseComponentSettableProperties { + cancelBehavior: 'icon'|'escape'|'none'; + dragAffordance: 'title-bar'|'none'; + initialVisibility: 'hide'|'show'; + modality: 'modal'|'modeless'; + position: oj.ojDialog.Position; + resizeBehavior: 'resizable'|'none'; + role: string; + translations: {labelCloseIcon?: string}; + } + namespace ojDialog { + type Position = + { + my?: oj.ojDialog.PositionAlign, at?: oj.ojDialog.PositionAlign, offset?: oj.ojDialog.PositionPoint, of?: string|oj.ojDialog.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' + } + } + namespace ojDialog { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojDialog { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts new file mode 100644 index 0000000000..9624749ed1 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts @@ -0,0 +1,20 @@ +/// +declare namespace oj { + abstract class dvtBaseComponent extends baseComponent { + trackResize: 'on'|'off'; + translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onTrackResizeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtBaseComponentEventMap extends oj.baseComponentEventMap { + 'trackResizeChanged': CustomEvent; + } + interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { + trackResize: 'on'|'off'; + translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts new file mode 100644 index 0000000000..63176945d9 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts @@ -0,0 +1,67 @@ +/// +/// +declare namespace oj { + abstract class editableValue, SV= V, RV= V> extends baseComponent { + describedBy: string|null; + disabled: boolean; + displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; + help: {instruction?: string}; + helpHints: {definition?: string, source?: string}; + labelHint: string; + messagesCustom: Array; + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + value: V; + onDescribedByChanged: (event: CustomEvent)=> any; + onDisabledChanged: (event: CustomEvent)=> any; + onDisplayOptionsChanged: (event: CustomEvent)=> any; + onHelpChanged: (event: CustomEvent)=> any; + onHelpHintsChanged: (event: CustomEvent)=> any; + onLabelHintChanged: (event: CustomEvent)=> any; + onMessagesCustomChanged: (event: CustomEvent)=> any; + onValidChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.editableValue.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.editableValue.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + reset(): void; + showMessages(): void; + } + namespace editableValue { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface editableValueEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.editableValue.ojAnimateEnd; + 'ojAnimateStart': oj.editableValue.ojAnimateStart; + 'describedByChanged': CustomEvent; + 'disabledChanged': CustomEvent; + 'displayOptionsChanged': CustomEvent; + 'helpChanged': CustomEvent; + 'helpHintsChanged': CustomEvent; + 'labelHintChanged': CustomEvent; + 'messagesCustomChanged': CustomEvent; + 'validChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface editableValueSettableProperties extends baseComponentSettableProperties { + describedBy: string|null; + disabled: boolean; + displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; + help: {instruction?: string}; + helpHints: {definition?: string, source?: string}; + labelHint: string; + messagesCustom: Array; + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + value: SV; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts new file mode 100644 index 0000000000..dbcfec3632 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts @@ -0,0 +1,44 @@ +/// +/// +declare namespace oj { + interface FileUploadTransport { + flush(): void; + queue(fileList: FileList): Array; + } + +} +declare namespace oj { + class ojFilePicker extends JetElement { + accept: Array|null; + selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; + selectionMode: 'multiple'|'single'; + onAcceptChanged: (event: CustomEvent)=> any; + onSelectOnChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onOjSelect: (event: oj.ojFilePicker.ojSelect)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + namespace ojFilePicker { + class ojSelect extends CustomEvent<{files: FileList, [propName: string]: any}> { + + } + } + interface ojFilePickerEventMap extends oj.JetElementEventMap { + 'ojSelect': oj.ojFilePicker.ojSelect; + 'acceptChanged': CustomEvent; + 'selectOnChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + } + interface ojFilePickerSettableProperties extends JetSettableProperties { + accept: Array|null; + selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; + selectionMode: 'multiple'|'single'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts new file mode 100644 index 0000000000..5287e1be53 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts @@ -0,0 +1,42 @@ +/// +declare namespace oj { + class ojFilmStrip extends baseComponent { + arrowPlacement: 'adjacent'|'overlay'; + arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; + currentItem: {id?: string, index?: number}; + looping: 'off'|'page'; + maxItemsPerPage: number; + orientation: 'horizontal'|'vertical'; + translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; + onArrowPlacementChanged: (event: CustomEvent)=> any; + onArrowVisibilityChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onLoopingChanged: (event: CustomEvent)=> any; + onMaxItemsPerPageChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getItemsPerPage(): number; + refresh(): void; + } + interface ojFilmStripEventMap extends oj.baseComponentEventMap { + 'arrowPlacementChanged': CustomEvent; + 'arrowVisibilityChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'loopingChanged': CustomEvent; + 'maxItemsPerPageChanged': CustomEvent; + 'orientationChanged': CustomEvent; + } + interface ojFilmStripSettableProperties extends baseComponentSettableProperties { + arrowPlacement: 'adjacent'|'overlay'; + arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; + currentItem: {id?: string, index?: number}; + looping: 'off'|'page'; + maxItemsPerPage: number; + orientation: 'horizontal'|'vertical'; + translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts new file mode 100644 index 0000000000..4487a1baa7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts @@ -0,0 +1,37 @@ +declare namespace oj { + class ojFormLayout extends JetElement { + direction: 'column'|'row'; + labelEdge: 'start'|'top'; + labelWidth: string; + labelWrapping: 'truncate'|'wrap'; + maxColumns: number; + onDirectionChanged: (event: CustomEvent)=> any; + onLabelEdgeChanged: (event: CustomEvent)=> any; + onLabelWidthChanged: (event: CustomEvent)=> any; + onLabelWrappingChanged: (event: CustomEvent)=> any; + onMaxColumnsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojFormLayoutEventMap extends oj.JetElementEventMap { + 'directionChanged': CustomEvent; + 'labelEdgeChanged': CustomEvent; + 'labelWidthChanged': CustomEvent; + 'labelWrappingChanged': CustomEvent; + 'maxColumnsChanged': CustomEvent; + } + interface ojFormLayoutSettableProperties extends JetSettableProperties { + direction: 'column'|'row'; + labelEdge: 'start'|'top'; + labelWidth: string; + labelWrapping: 'truncate'|'wrap'; + maxColumns: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts new file mode 100644 index 0000000000..86b2f26147 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts @@ -0,0 +1,286 @@ +/// +/// +declare namespace oj { + class ojGantt extends dvtTimeComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + axisPosition: 'bottom'|'top'; + dependencyData?: (oj.DataProvider); + dnd: {move?: {tasks?: 'disabled'|'enabled'}}; + end: string; + gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; + majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + referenceObjects: Array; + rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; + rowDefaults: {height?: number}; + scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + start: string; + taskData?: (oj.DataProvider); + taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; + tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; + viewportEnd: string; + viewportStart: string; + translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onAxisPositionChanged: (event: CustomEvent)=> any; + onDependencyDataChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onGridlinesChanged: (event: CustomEvent)=> any; + onMajorAxisChanged: (event: CustomEvent)=> any; + onMinorAxisChanged: (event: CustomEvent)=> any; + onReferenceObjectsChanged: (event: CustomEvent)=> any; + onRowAxisChanged: (event: CustomEvent)=> any; + onRowDefaultsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + onTaskDataChanged: (event: CustomEvent)=> any; + onTaskDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onValueFormatsChanged: (event: CustomEvent)=> any; + onViewportEndChanged: (event: CustomEvent)=> any; + onViewportStartChanged: (event: CustomEvent)=> any; + onOjMove: (event: oj.ojGantt.ojMove)=> any; + onOjViewportChange: (event: oj.ojGantt.ojViewportChange)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): {subId: 'oj-gantt-row-label', index: number} | {subId: 'oj-gantt-taskbar', rowIndex: number, index: number} | null; + } + namespace ojGantt { + class ojMove extends CustomEvent<{taskContexts: Array<{data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2|null, color: string}>, value: string, start: string, end: string, baselineStart: string, baselineEnd: string, rowContext: {rowData: oj.ojGantt.Row, componentElement: Element}, [propName: string]: any}> { + + } + + class ojViewportChange extends CustomEvent<{viewportStart: string, viewportEnd: string, majorAxisScale: string, minorAxisScale: string, [propName: string]: any}> { + + } + } + interface ojGanttEventMap extends oj.dvtTimeComponentEventMap { + 'ojMove': oj.ojGantt.ojMove; + 'ojViewportChange': oj.ojGantt.ojViewportChange; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'axisPositionChanged': CustomEvent; + 'dependencyDataChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'endChanged': CustomEvent; + 'gridlinesChanged': CustomEvent; + 'majorAxisChanged': CustomEvent; + 'minorAxisChanged': CustomEvent; + 'referenceObjectsChanged': CustomEvent; + 'rowAxisChanged': CustomEvent; + 'rowDefaultsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'startChanged': CustomEvent; + 'taskDataChanged': CustomEvent; + 'taskDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'valueFormatsChanged': CustomEvent; + 'viewportEndChanged': CustomEvent; + 'viewportStartChanged': CustomEvent; + } + interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + axisPosition: 'bottom'|'top'; + dependencyData?: (oj.DataProvider); + dnd: {move?: {tasks?: 'disabled'|'enabled'}}; + end: string; + gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; + majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; + referenceObjects: Array; + rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; + rowDefaults: {height?: number}; + scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + start: string; + taskData?: (oj.DataProvider); + taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; + tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; + viewportEnd: string; + viewportStart: string; + translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; + } + namespace ojGantt { + type Dependency = + { + id: K1, predecessorTaskId: K2, shortDesc?: string, successorTaskId: K2, svgClassName?: string, svgStyle?: object, type?: 'startStart'|'startFinish'|'finishFinish'|'finishStart' + } + } + namespace ojGantt { + type ReferenceObject = + { + svgClassName?: string, svgStyle?: object, value?: string + } + } + namespace ojGantt { + type Row = + { + id?: any, label?: string, labelStyle?: object, tasks?: Array> + } + } + namespace ojGantt { + type RowAxisLabelRendererContext = + { + parentElement: Element, rowData: oj.ojGantt.Row, itemData: Array, componentElement: Element, maxWidth: number, maxHeight: number + } + } + namespace ojGantt { + type RowTask = + { + borderRadius?: string, end?: string, height?: number, id: K2, label?: string, labelPosition?: string|Array, labelStyle?: object, start?: string, shortDesc?: string, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto', progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}, baseline?: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object} + } + } + namespace ojGantt { + type TooltipContext = + { + parentElement: Element, data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2, componentElement: Element, color: string + } + } + +} +declare namespace oj { + class ojGanttDependency extends JetElement { + predecessorTaskId: any; + shortDesc: string|null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; + onPredecessorTaskIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSuccessorTaskIdChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttDependencyEventMap extends oj.JetElementEventMap { + 'predecessorTaskIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'successorTaskIdChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojGanttDependencySettableProperties extends JetSettableProperties { + predecessorTaskId: any; + shortDesc: string|null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; + } + +} +declare namespace oj { + class ojGanttRow extends JetElement { + label: string; + labelStyle: object; + onLabelChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttRowEventMap extends oj.JetElementEventMap { + 'labelChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + } + interface ojGanttRowSettableProperties extends JetSettableProperties { + label: string; + labelStyle: object; + } + +} +declare namespace oj { + class ojGanttTask extends JetElement { + baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; + borderRadius: string; + end: string; + height: number|null; + label: string; + labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; + labelStyle: object; + progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; + rowId?: any; + shortDesc: string|null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal'|'milestone'|'summary'|'auto'; + onBaselineChanged: (event: CustomEvent)=> any; + onBorderRadiusChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onHeightChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onProgressChanged: (event: CustomEvent)=> any; + onRowIdChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojGanttTaskEventMap extends oj.JetElementEventMap { + 'baselineChanged': CustomEvent; + 'borderRadiusChanged': CustomEvent; + 'endChanged': CustomEvent; + 'heightChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'progressChanged': CustomEvent; + 'rowIdChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'startChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'typeChanged': CustomEvent; + } + interface ojGanttTaskSettableProperties extends JetSettableProperties { + baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; + borderRadius: string; + end: string; + height: number|null; + label: string; + labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; + labelStyle: object; + progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; + rowId?: any; + shortDesc: string|null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal'|'milestone'|'summary'|'auto'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts new file mode 100644 index 0000000000..0c3efab804 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts @@ -0,0 +1,347 @@ +/// +declare namespace oj { + abstract class dvtBaseGauge extends dvtBaseComponent { + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtBaseGaugeEventMap extends oj.dvtBaseComponentEventMap { + } + interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + +} +declare namespace oj { + class ojLedGauge extends dvtBaseGauge { + borderColor: string; + color: string; + label: {style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + rotation: 90|180|270|0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; + value: number|null; + visualEffects: 'none'|'auto'; + onBorderColorChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMetricLabelChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSizeChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getMetricLabel(): string; + } + interface ojLedGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'borderColorChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'metricLabelChanged': CustomEvent; + 'minChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'sizeChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + borderColor: string; + color: string; + label: {style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + rotation: 90|180|270|0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojLedGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojLedGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} +declare namespace oj { + class ojRatingGauge extends dvtBaseGauge { + changed: boolean; + changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + max: number; + min: number; + orientation: 'vertical'|'horizontal'; + preserveAspectRatio: 'none'|'meet'; + readonly: boolean; + selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + step: 0.5|1; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + value: number|null; + visualEffects: 'none'|'auto'; + onChangedChanged: (event: CustomEvent)=> any; + onChangedStateChanged: (event: CustomEvent)=> any; + onHoverStateChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onPreserveAspectRatioChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onSelectedStateChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onUnselectedStateChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojRatingGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'changedChanged': CustomEvent; + 'changedStateChanged': CustomEvent; + 'hoverStateChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'preserveAspectRatioChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'selectedStateChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'unselectedStateChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + changed: boolean; + changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + max: number; + min: number; + orientation: 'vertical'|'horizontal'; + preserveAspectRatio: 'none'|'meet'; + readonly: boolean; + selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + step: 0.5|1; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojRatingGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojRatingGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} +declare namespace oj { + class ojStatusMeterGauge extends dvtBaseGauge { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + borderColor: string; + borderRadius: string; + center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + color: string; + indicatorSize: number; + innerRadius: number; + label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + orientation: 'circular'|'vertical'|'horizontal'; + plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; + readonly: boolean; + referenceLines: Array; + startAngle: number; + step: number|null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + value: number|null; + visualEffects: 'none'|'auto'; + onAngleExtentChanged: (event: CustomEvent)=> any; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderRadiusChanged: (event: CustomEvent)=> any; + onCenterChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onIndicatorSizeChanged: (event: CustomEvent)=> any; + onInnerRadiusChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMetricLabelChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onPlotAreaChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onReferenceLinesChanged: (event: CustomEvent)=> any; + onStartAngleChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onThresholdDisplayChanged: (event: CustomEvent)=> any; + onThresholdsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVisualEffectsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getMetricLabel(): string; + } + interface ojStatusMeterGaugeEventMap extends oj.dvtBaseGaugeEventMap { + 'angleExtentChanged': CustomEvent; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'borderColorChanged': CustomEvent; + 'borderRadiusChanged': CustomEvent; + 'centerChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'indicatorSizeChanged': CustomEvent; + 'innerRadiusChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'metricLabelChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'plotAreaChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'referenceLinesChanged': CustomEvent; + 'startAngleChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'thresholdDisplayChanged': CustomEvent; + 'thresholdsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'visualEffectsChanged': CustomEvent; + } + interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + borderColor: string; + borderRadius: string; + center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + color: string; + indicatorSize: number; + innerRadius: number; + label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; + max: number; + metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; + min: number; + orientation: 'circular'|'vertical'|'horizontal'; + plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; + readonly: boolean; + referenceLines: Array; + startAngle: number; + step: number|null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; + thresholds: Array; + tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + readonly transientValue: number|null; + value: number|null; + visualEffects: 'none'|'auto'; + } + namespace ojStatusMeterGauge { + type Bounds = + { + x: number, y: number, width: number, height: number + } + } + namespace ojStatusMeterGauge { + type CenterContext = + { + componentElement: Element, innerBounds: oj.ojStatusMeterGauge.Bounds, metricLabel: string, outerBounds: oj.ojStatusMeterGauge.Bounds + } + } + namespace ojStatusMeterGauge { + type ReferenceLine = + { + color?: string, value?: number + } + } + namespace ojStatusMeterGauge { + type Threshold = + { + borderColor?: string, color?: string, max?: number, shortDesc?: string + } + } + namespace ojStatusMeterGauge { + type TooltipContext = + { + color: string, componentElement: Element, label: string, parentElement: Element + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts new file mode 100644 index 0000000000..49b10e2bfa --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + interface IndexerModel { + getIndexableSections(): Array|Array; + getMissingSections(): Array|Array; + setSection(section: string|object): Promise|Promise; + } + var IndexerModel: { + prototype: IndexerModel; + + SECTION_OTHERS: {id: string, label: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts new file mode 100644 index 0000000000..ea03d4c8d3 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts @@ -0,0 +1,95 @@ +/// +/// +/// +declare namespace oj { + class ojInputNumber extends editableValue { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: number|null; + min: number|null; + name: string; + placeholder: string|null; + readonly rawValue: string; + readonly: boolean|null; + required: boolean; + step: number|null; + validators: Array|oj.Validation.RegisteredValidator>; + value: number|null; + virtualKeyboard: 'auto'|'number'|'text'; + translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onAutocompleteChanged: (event: CustomEvent)=> any; + onAutofocusChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onVirtualKeyboardChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputNumber.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputNumber.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + stepDown(steps?: number): void; + stepUp(steps?: number): void; + validate(): Promise; + } + namespace ojInputNumber { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputNumberEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojInputNumber.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputNumber.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'autocompleteChanged': CustomEvent; + 'autofocusChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'virtualKeyboardChanged': CustomEvent; + } + interface ojInputNumberSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + converter: oj.Converter|oj.Validation.RegisteredConverter; + max: number|null; + min: number|null; + name: string; + placeholder: string|null; + readonly rawValue: string; + readonly: boolean|null; + required: boolean; + step: number|null; + validators: Array|oj.Validation.RegisteredValidator>; + value: number|null; + virtualKeyboard: 'auto'|'number'|'text'; + translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts new file mode 100644 index 0000000000..248bf14f58 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts @@ -0,0 +1,178 @@ +/// +/// +/// +/// +declare namespace oj { + abstract class inputBase, SV= V, RV= V> extends editableValue { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + name: string; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onAutocompleteChanged: (event: CustomEvent)=> any; + onAutofocusChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.inputBase.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.inputBase.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise<'valid'|'invalid'>; + } + namespace inputBase { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface inputBaseEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.inputBase.ojAnimateEnd; + 'ojAnimateStart': oj.inputBase.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'autocompleteChanged': CustomEvent; + 'autofocusChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + } + interface inputBaseSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on'|'off'|string; + autofocus: boolean; + name: string; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojInputPassword extends inputBase { + value: string|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputPassword.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputPassword.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojInputPassword { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputPasswordEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputPassword.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputPassword.ojAnimateStart; + 'valueChanged': CustomEvent; + } + interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { + value: string|null; + translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojInputText extends inputBase { + clearIcon: 'never'|'always'|'conditional'; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + list: string; + virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; + onClearIconChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onListChanged: (event: CustomEvent)=> any; + onVirtualKeyboardChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojInputText.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojInputText.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojInputText { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojInputTextEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojInputText.ojAnimateEnd; + 'ojAnimateStart': oj.ojInputText.ojAnimateStart; + 'clearIconChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'listChanged': CustomEvent; + 'virtualKeyboardChanged': CustomEvent; + } + interface ojInputTextSettableProperties extends inputBaseSettableProperties { + clearIcon: 'never'|'always'|'conditional'; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + list: string; + virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; + } + +} +declare namespace oj { + class ojTextArea extends inputBase { + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + rows: number; + onConverterChanged: (event: CustomEvent)=> any; + onRowsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTextArea.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTextArea.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojTextArea { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojTextAreaEventMap extends oj.inputBaseEventMap { + 'ojAnimateEnd': oj.ojTextArea.ojAnimateEnd; + 'ojAnimateStart': oj.ojTextArea.ojAnimateStart; + 'converterChanged': CustomEvent; + 'rowsChanged': CustomEvent; + } + interface ojTextAreaSettableProperties extends inputBaseSettableProperties { + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + rows: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts new file mode 100644 index 0000000000..f6608c7f7d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts @@ -0,0 +1,32 @@ +export class ExpandAllKeySet extends KeySet { + constructor(); + add(keys: Set|Array): ExpandAllKeySet + addAll(): ExpandAllKeySet + clear(): ExpandedKeySet + delete(keys: Set|Array): ExpandAllKeySet + deletedValues(): Set; + has(): ExpandAllKeySet + isAddAll(): boolean; + } + +export class ExpandedKeySet extends KeySet { + constructor(keys?: Set|Array); + add(keys: Set|Array): ExpandedKeySet + addAll(): ExpandAllKeySet + clear(): ExpandedKeySet + delete(keys: Set|Array): ExpandedKeySet + has(key: K): boolean; + isAddAll(): boolean; + values(): Set; + } + +export abstract class KeySet { + abstract add>(keys: Set|Array): KS + abstract addAll>(): KS + abstract clear>(): KS + abstract delete>(keys: Set|Array): KS + abstract has(key: K): boolean; + abstract isAddAll(): boolean; + } + + export as namespace KeySet; diff --git a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts new file mode 100644 index 0000000000..71d1945a6c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts @@ -0,0 +1,9 @@ +/// +export class ObservableExpandedKeySet { + constructor(initialValue?: KeySet.ExpandedKeySet|KeySet.ExpandAllKeySet); + add(keys: Set|Array): ObservableExpandedKeySet; + addAll(): ObservableExpandedKeySet; + clear(): ObservableExpandedKeySet; + delete(keys: Set|Array): ObservableExpandedKeySet; + } + diff --git a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts new file mode 100644 index 0000000000..21bf95f0dc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts @@ -0,0 +1,7 @@ +/// +declare namespace oj { + class KnockoutUtils { + static map(m: object, callback?: ((param0: object)=> void), array?: boolean): Array>|KnockoutObservableArray; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts new file mode 100644 index 0000000000..f388d46c92 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts @@ -0,0 +1,14 @@ +/// +declare namespace oj { + namespace KnockoutTemplateUtils { + function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object)=> void); + } + +} +declare namespace oj { + class ResponsiveKnockoutUtils { + static createMediaQueryObservable(queryString: string): KnockoutObservable; + static createScreenRangeObservable(): KnockoutObservable; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts new file mode 100644 index 0000000000..c10e0daf17 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts @@ -0,0 +1,33 @@ +/// +declare namespace oj { + class ojLabel extends baseComponent { + for: string|null; + help: {definition?: string|null, source?: string|null}; + labelId: string|null; + showRequired: boolean|null; + translations: {tooltipHelp?: string, tooltipRequired?: string}; + onForChanged: (event: CustomEvent)=> any; + onHelpChanged: (event: CustomEvent)=> any; + onLabelIdChanged: (event: CustomEvent)=> any; + onShowRequiredChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojLabelEventMap extends oj.baseComponentEventMap { + 'forChanged': CustomEvent; + 'helpChanged': CustomEvent; + 'labelIdChanged': CustomEvent; + 'showRequiredChanged': CustomEvent; + } + interface ojLabelSettableProperties extends baseComponentSettableProperties { + for: string|null; + help: {definition?: string|null, source?: string|null}; + labelId: string|null; + showRequired: boolean|null; + translations: {tooltipHelp?: string, tooltipRequired?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts new file mode 100644 index 0000000000..c1649bedd7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojLabelValue extends JetElement { + labelEdge: 'start'|'top'|'inherit'; + labelWidth: string; + onLabelEdgeChanged: (event: CustomEvent)=> any; + onLabelWidthChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojLabelValueEventMap extends oj.JetElementEventMap { + 'labelEdgeChanged': CustomEvent; + 'labelWidthChanged': CustomEvent; + } + interface ojLabelValueSettableProperties extends JetSettableProperties { + labelEdge: 'start'|'top'|'inherit'; + labelWidth: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts new file mode 100644 index 0000000000..36f940f25c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts @@ -0,0 +1,230 @@ +/// +/// +declare namespace oj { + class ojLegend extends dvtBaseComponent> { + as: string; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + expanded: KeySet.KeySet|null; + halign: 'center'|'end'|'start'; + hiddenCategories: Array; + hideAndShowBehavior: 'on'|'off'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal'|'vertical'; + scrolling: 'off'|'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle'|'bottom'|'top'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAsChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHalignChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onScrollingChanged: (event: CustomEvent)=> any; + onSymbolHeightChanged: (event: CustomEvent)=> any; + onSymbolWidthChanged: (event: CustomEvent)=> any; + onTextStyleChanged: (event: CustomEvent)=> any; + onValignChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojLegend.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojLegend.NodeContext|null; + getItem(subIdPath: Array): oj.ojLegend.ItemContext|null; + getPreferredSize(): oj.ojLegend.PreferredSize|null; + getSection(subIdPath: Array): oj.ojLegend.SectionContext|null; + } + namespace ojLegend { + class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { + + } + } + interface ojLegendEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojLegend.ojDrill; + 'asChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'halignChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'hideAndShowBehaviorChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'scrollingChanged': CustomEvent; + 'symbolHeightChanged': CustomEvent; + 'symbolWidthChanged': CustomEvent; + 'textStyleChanged': CustomEvent; + 'valignChanged': CustomEvent; + } + interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { + as: string; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + expanded: KeySet.KeySet|null; + halign: 'center'|'end'|'start'; + hiddenCategories: Array; + hideAndShowBehavior: 'on'|'off'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal'|'vertical'; + scrolling: 'off'|'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle'|'bottom'|'top'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojLegend { + type ItemContext = + { + text: string + } + } + namespace ojLegend { + type NodeContext = + { + itemIndex: number, sectionIndexPath: Array, subId: string + } + } + namespace ojLegend { + type PreferredSize = + { + width: number, height: number + } + } + namespace ojLegend { + type SectionContext = + { + title: string, sections: Array, items: Array, getSection: {title: string, sections: string, items: boolean}, getItems: {text: string} + } + } + +} +declare namespace oj { + class ojLegendItem extends JetElement { + borderColor?: string; + categories?: Array; + categoryVisibility?: 'hidden'|'visible'; + color?: string; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; + text: string; + onBorderColorChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onCategoryVisibilityChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLineStyleChanged: (event: CustomEvent)=> any; + onLineWidthChanged: (event: CustomEvent)=> any; + onMarkerColorChanged: (event: CustomEvent)=> any; + onMarkerShapeChanged: (event: CustomEvent)=> any; + onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; + onMarkerSvgStyleChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onSymbolTypeChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojLegendItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'categoryVisibilityChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'lineStyleChanged': CustomEvent; + 'lineWidthChanged': CustomEvent; + 'markerColorChanged': CustomEvent; + 'markerShapeChanged': CustomEvent; + 'markerSvgClassNameChanged': CustomEvent; + 'markerSvgStyleChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'symbolTypeChanged': CustomEvent; + 'textChanged': CustomEvent; + } + interface ojLegendItemSettableProperties extends JetSettableProperties { + borderColor?: string; + categories?: Array; + categoryVisibility?: 'hidden'|'visible'; + color?: string; + drilling?: 'on'|'off'|'inherit'; + lineStyle?: 'dotted'|'dashed'|'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; + text: string; + } + +} +declare namespace oj { + class ojLegendSection extends JetElement { + collapsible?: 'on'|'off'; + text?: string; + textHalign?: 'center'|'end'|'start'; + textStyle?: object; + onCollapsibleChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + onTextHalignChanged: (event: CustomEvent)=> any; + onTextStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojLegendSectionEventMap extends oj.JetElementEventMap { + 'collapsibleChanged': CustomEvent; + 'textChanged': CustomEvent; + 'textHalignChanged': CustomEvent; + 'textStyleChanged': CustomEvent; + } + interface ojLegendSectionSettableProperties extends JetSettableProperties { + collapsible?: 'on'|'off'; + text?: string; + textHalign?: 'center'|'end'|'start'; + textStyle?: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts new file mode 100644 index 0000000000..ed2b3d981f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts @@ -0,0 +1,21 @@ +/// +declare namespace oj { + class ListDataProviderView implements DataProvider { + dataMapping: DataMapping; + from: any; + offset: number; + sortCriteria: SortCriterion[]; + constructor(dataProvider: DataProvider, options?: {from?: object, offset?: number, sortCriteria?: SortCriterion[], dataMapping?: DataMapping}); + addEventListener(eventType: string, listener: EventListener): void + containsKeys(params: FetchByKeysParameters): Promise> + dispatchEvent(evt: Event): boolean + fetchByKeys(params: FetchByKeysParameters): Promise> + fetchByOffset(params: FetchByOffsetParameters): Promise> + fetchFirst>(params?: FetchListParameters): AsyncIterable + getCapability(capabilityName: string) + getTotalSize(): Promise; + isEmpty(): 'yes'|'no'|'unknown'; + removeEventListener(eventType: string, listener: EventListener): void + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts new file mode 100644 index 0000000000..cb4289b6ea --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts @@ -0,0 +1,167 @@ +/// +/// +/// +declare namespace oj { + class ojListView extends baseComponent> { + as: string; + currentItem: K; + data: oj.DataProvider; + dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; + drillMode: 'collapsible'|'none'; + expanded: KeySet.KeySet; + readonly firstSelectedItem: {key: K, data: D}; + groupHeaderPosition: 'static'|'sticky'; + item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; + scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + selectionRequired: boolean; + translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onDrillModeChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onFirstSelectedItemChanged: (event: CustomEvent)=> any; + onGroupHeaderPositionChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onScrollPolicyChanged: (event: CustomEvent)=> any; + onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRequiredChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojListView.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojListView.ojAnimateStart)=> any; + onOjBeforeCollapse: (event: oj.ojListView.ojBeforeCollapse)=> any; + onOjBeforeCurrentItem: (event: oj.ojListView.ojBeforeCurrentItem)=> any; + onOjBeforeExpand: (event: oj.ojListView.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojListView.ojCollapse)=> any; + onOjCopy: (event: oj.ojListView.ojCopy)=> any; + onOjCut: (event: oj.ojListView.ojCut)=> any; + onOjExpand: (event: oj.ojListView.ojExpand)=> any; + onOjPaste: (event: oj.ojListView.ojPaste)=> any; + onOjReorder: (event: oj.ojListView.ojReorder)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojListView.ContextByNode|null; + getDataForVisibleItem(context: {key?: K, index?: number, parent?: Element}): D; + refresh(): void; + scrollToItem(item: {key: K}): void; + } + namespace ojListView { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: K, previousItem: Element, key: K, item: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojCopy extends CustomEvent<{items: Array, [propName: string]: any}> { + + } + + class ojCut extends CustomEvent<{items: Array, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { + + } + + class ojPaste extends CustomEvent<{item: Element, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{items: Array, position: string, reference: Element, [propName: string]: any}> { + + } + } + interface ojListViewEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojListView.ojAnimateEnd; + 'ojAnimateStart': oj.ojListView.ojAnimateStart; + 'ojBeforeCollapse': oj.ojListView.ojBeforeCollapse; + 'ojBeforeCurrentItem': oj.ojListView.ojBeforeCurrentItem; + 'ojBeforeExpand': oj.ojListView.ojBeforeExpand; + 'ojCollapse': oj.ojListView.ojCollapse; + 'ojCopy': oj.ojListView.ojCopy; + 'ojCut': oj.ojListView.ojCut; + 'ojExpand': oj.ojListView.ojExpand; + 'ojPaste': oj.ojListView.ojPaste; + 'ojReorder': oj.ojListView.ojReorder; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'drillModeChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'firstSelectedItemChanged': CustomEvent; + 'groupHeaderPositionChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'scrollPolicyChanged': CustomEvent; + 'scrollPolicyOptionsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRequiredChanged': CustomEvent; + } + interface ojListViewSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: oj.DataProvider; + dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; + drillMode: 'collapsible'|'none'; + expanded: KeySet.KeySet; + readonly firstSelectedItem: {key: K, data: D}; + groupHeaderPosition: 'static'|'sticky'; + item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; + scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + selectionRequired: boolean; + translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; + } + namespace ojListView { + type ContextByNode = + { + subId: string, key: K, index: number, parent?: Element, group?: boolean + } + } + namespace ojListView { + type ItemContext = + { + datasource: oj.DataProvider, index: number, key: K, data: D, parentElement: Element, depth?: number, parentKey?: K, leaf?: boolean + } + } + namespace ojListView { + type ItemsDropContext = + { + item: Element, position: 'before'|'after'|'inside', reorder: boolean + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts new file mode 100644 index 0000000000..f355ffc77b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts @@ -0,0 +1,85 @@ +/// +declare namespace oj { + class ojMasonryLayout extends baseComponent { + reorderHandle: string|null; + translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; + onReorderHandleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojMasonryLayout.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMasonryLayout.ojAnimateStart)=> any; + onOjBeforeInsert: (event: oj.ojMasonryLayout.ojBeforeInsert)=> any; + onOjBeforeRemove: (event: oj.ojMasonryLayout.ojBeforeRemove)=> any; + onOjBeforeReorder: (event: oj.ojMasonryLayout.ojBeforeReorder)=> any; + onOjBeforeResize: (event: oj.ojMasonryLayout.ojBeforeResize)=> any; + onOjInsert: (event: oj.ojMasonryLayout.ojInsert)=> any; + onOjRemove: (event: oj.ojMasonryLayout.ojRemove)=> any; + onOjReorder: (event: oj.ojMasonryLayout.ojReorder)=> any; + onOjResize: (event: oj.ojMasonryLayout.ojResize)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + insertTile(selector: string, index: number): void; + refresh(): void; + removeTile(selector: string): void; + resizeTile(selector: string, sizeStyleClass: string): void; + } + namespace ojMasonryLayout { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { + + } + + class ojBeforeRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { + + } + + class ojBeforeReorder extends CustomEvent<{tile: Element, fromIndex: number, [propName: string]: any}> { + + } + + class ojBeforeResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { + + } + + class ojInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { + + } + + class ojRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{tile: Element, fromIndex: number, toIndex: number, [propName: string]: any}> { + + } + + class ojResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { + + } + } + interface ojMasonryLayoutEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojMasonryLayout.ojAnimateEnd; + 'ojAnimateStart': oj.ojMasonryLayout.ojAnimateStart; + 'ojBeforeInsert': oj.ojMasonryLayout.ojBeforeInsert; + 'ojBeforeRemove': oj.ojMasonryLayout.ojBeforeRemove; + 'ojBeforeReorder': oj.ojMasonryLayout.ojBeforeReorder; + 'ojBeforeResize': oj.ojMasonryLayout.ojBeforeResize; + 'ojInsert': oj.ojMasonryLayout.ojInsert; + 'ojRemove': oj.ojMasonryLayout.ojRemove; + 'ojReorder': oj.ojMasonryLayout.ojReorder; + 'ojResize': oj.ojMasonryLayout.ojResize; + 'reorderHandleChanged': CustomEvent; + } + interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { + reorderHandle: string|null; + translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts new file mode 100644 index 0000000000..cd2c08461c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts @@ -0,0 +1,87 @@ +/// +declare namespace oj { + class ojMenu extends baseComponent { + disabled: boolean; + openOptions: oj.ojMenu.OpenOptions; + translations: {ariaFocusSkipLink?: string, labelCancel?: string}; + onDisabledChanged: (event: CustomEvent)=> any; + onOpenOptionsChanged: (event: CustomEvent)=> any; + onOjAction: (event: oj.ojMenu.ojAction)=> any; + onOjAnimateEnd: (event: oj.ojMenu.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMenu.ojAnimateStart)=> any; + onOjBeforeOpen: (event: oj.ojMenu.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojMenu.ojClose)=> any; + onOjOpen: (event: oj.ojMenu.ojOpen)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + open(event?: object, openOptions?: oj.ojMenu.OpenOptions): void; + refresh(): void; + } + namespace ojMenu { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { + + } + } + interface ojMenuEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojMenu.ojAction; + 'ojAnimateEnd': oj.ojMenu.ojAnimateEnd; + 'ojAnimateStart': oj.ojMenu.ojAnimateStart; + 'ojBeforeOpen': oj.ojMenu.ojBeforeOpen; + 'ojClose': oj.ojMenu.ojClose; + 'ojOpen': oj.ojMenu.ojOpen; + 'disabledChanged': CustomEvent; + 'openOptionsChanged': CustomEvent; + } + interface ojMenuSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + openOptions: oj.ojMenu.OpenOptions; + translations: {ariaFocusSkipLink?: string, labelCancel?: string}; + } + namespace ojMenu { + type OpenOptions = + { + display?: string, initialFocus?: string, launcher?: string|Element, position?: oj.ojMenu.Position + } + } + namespace ojMenu { + type Position = + { + my?: oj.ojMenu.PositionAlign, at?: oj.ojMenu.PositionAlign, offset?: oj.ojMenu.PositionPoint, of?: string|oj.ojMenu.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' + } + } + namespace ojMenu { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojMenu { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts new file mode 100644 index 0000000000..0f380df2f2 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts @@ -0,0 +1,36 @@ +/// +/// +declare namespace oj { + class ojMenuSelectMany extends JetElement { + disabled: boolean; + options: Array|oj.DataProvider|null; + value: Array; + onDisabledChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojMenuSelectManyEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojMenuSelectManySettableProperties extends JetSettableProperties { + disabled: boolean; + options: Array|oj.DataProvider|null; + value: Array; + } + namespace ojMenuSelectMany { + type Option = + { + id?: string, disabled?: boolean, label: string, value: any + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts new file mode 100644 index 0000000000..8be478bd06 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts @@ -0,0 +1,51 @@ +declare namespace oj { + class ojMessage extends JetElement { + message: oj.ojMessage.Message; + translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; + onMessageChanged: (event: CustomEvent)=> any; + + onTranslationsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojMessage.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojMessage.ojAnimateStart)=> any; + onOjClose: (event: oj.ojMessage.ojClose)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + namespace ojMessage { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{element: Element, action: 'open'|'close', endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{message: object, [propName: string]: any}> { + + } + } + interface ojMessageEventMap extends oj.JetElementEventMap { + 'ojAnimateEnd': oj.ojMessage.ojAnimateEnd; + 'ojAnimateStart': oj.ojMessage.ojAnimateStart; + 'ojClose': oj.ojMessage.ojClose; + 'messageChanged': CustomEvent; + 'translationsChanged': CustomEvent; + } + interface ojMessageSettableProperties extends JetSettableProperties { + message: oj.ojMessage.Message; + translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; + } + namespace ojMessage { + type Message = + { + icon?: string, category?: string, severity?: 'error'|'warning'|'confirmation'|'info'|'none', timestamp?: string, summary?: string, detail?: string, autoTimeout?: number, closeAffordance?: 'none'|'defaults', sound?: string + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts new file mode 100644 index 0000000000..3246de390f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts @@ -0,0 +1,55 @@ +/// +/// +declare namespace oj { + class ojMessages extends JetElement { + display: 'general'|'notification'; + messages: Array | null | oj.DataProvider; + position: oj.ojMessages.Position|null; + translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; + onDisplayChanged: (event: CustomEvent)=> any; + onMessagesChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + + onTranslationsChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(associated: object): void; + closeAll(closeFilter?: (message: oj.ojMessage.Message) => boolean): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojMessagesEventMap extends oj.JetElementEventMap { + 'displayChanged': CustomEvent; + 'messagesChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'translationsChanged': CustomEvent; + } + interface ojMessagesSettableProperties extends JetSettableProperties { + display: 'general'|'notification'; + messages: Array | null | oj.DataProvider; + position: oj.ojMessages.Position|null; + translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; + } + namespace ojMessages { + type Position = + { + my?: oj.ojMessages.PositionAlign, at?: oj.ojMessages.PositionAlign, offset?: oj.ojMessages.PositionPoint, of?: string|oj.ojMessages.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' + } + } + namespace ojMessages { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojMessages { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts new file mode 100644 index 0000000000..e65a3ddcc3 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts @@ -0,0 +1,30 @@ +declare namespace oj { + class Message { + detail: string; + severity: string|number; + summary: string; + constructor(summary: string, detail: string, severity?: number|string); + static getMaxSeverity(messages?: Array): number; + static getSeverityLevel(severity?: string|number|undefined): number; + static getSeverityType(level?: string|number|undefined): string; + static isValid(messages: Array): boolean; + } + namespace Message { + enum SEVERITY_LEVEL { + FATAL = "5", + ERROR = "4", + WARNING = "3", + INFO = "2", + CONFIRMATION = "1", + } + enum SEVERITY_TYPE { + CONFIRMATION = "confirmation", + INFO = "info", + WARNING = "warning", + ERROR = "error", + FATAL = "fatal", + } + } + + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts new file mode 100644 index 0000000000..6e3ebe4118 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts @@ -0,0 +1,169 @@ +declare namespace oj { + class Collection { + changes: Array; + comparator: null|string|((param0: oj.Model, param1?: oj.Model)=> number); + customPagingOptions: ((response: object)=> oj.Collection.CustomPagingOptionsReturn|null)|null; + customURL: ((param0: string, param1: oj.Collection, param2: object)=> string|Object|null)|null; + fetchSize: number; + hasMore: boolean; + lastFetchCount: number; + lastFetchSize: number; + length: number; + model: object; + modelLimit: number; + models: Array; + offset: number; + omitLanguageHeader: boolean; + parse: ((param0: object)=> Object); + sortDirection: number; + totalResults: number; + url: null|string|(()=> string); + constructor(models?: Array, options?: object); + static extend(properties?: {parse?: (data: any)=> any, model?: oj.Model, url?: string, initialize?: (models: Array, options: Object)=> void, comparator?: null|string|((model1: oj.Model, model2?: oj.Model)=> number), fetchSize?: number, modelLimit?: number, [propName: string]: any}, classProperties?: object): any; + abort(): Promise; + add(m: oj.Model|object|Array|Array, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; + any(iterator: ((param0: object)=> void), context?: object): boolean; + at(index: number, options?: {fetchSize?: number, deferred?: boolean, [propName: string]: any}): oj.Model|Promise|null; + clone(): oj.Collection; + contains(model: object, options?: object): boolean|Promise; + create(attributes?: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|boolean|Promise; + difference(...var_args: (Array)[]): Array; + each(iterator: ((param0: oj.Model)=> void), context?: object): undefined; + fetch(options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, add?: boolean, set?: boolean, startIndex?: number, startID?: Object, since?: Object, until?: Object, fetchSize?: number, [propName: string]: any}): object; + filter(iterator: ((param0: oj.Model)=> void), context?: object): Array; + findWhere(attrs: object|Array, options?: {deferred?: boolean, [propName: string]: any}): oj.Model|Promise; + first(n?: number, options?: object): Array|null|Promise; + get(id: object|string, options?: object): oj.Model|null|Promise; + getByCid(clientId: string): oj.Model|null; + groupBy(iterator: string|((param0: oj.Model)=> object), context?: object): object; + include(model: object, options?: object): boolean|Promise; + indexBy(iterator: string|((param0: oj.Model)=> void), context?: object): object; + indexOf(model: object, options?: object): number|Promise; + initial(n?: number): Array; + isEmpty(): boolean; + isRangeLocal(start: number, count: number): boolean; + last(n?: number, options?: object): Promise|Array|null; + lastIndexOf(model: oj.Model, fromIndex?: number): number; + listenTo(otherObj: object, eventType: string, callback: Function): undefined; + listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; + map(iterator: ((param0: oj.Model)=> object), context?: object): Array; + max(iterator: ((param0: oj.Model)=> object), context?: object): object; + min(iterator: ((param0: object)=> void), context?: object): object; + modelId(attrs: object): null|string; + next(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object|null; + off(eventType?: string|object, callback?: Function, context?: object): undefined; + on(eventType: string|object, callback: Function, context?: object): undefined; + once(eventType: string, callback: Function, context?: object): undefined; + pluck(attr: string): Array; + pop(options?: {silent?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|Promise; + previous(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object; + push(m: oj.Model|object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|undefined; + refresh(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise; + remove(m: oj.Model|Array, options?: object): Array|object; + reset(data?: object, options?: {silent?: boolean, [propName: string]: any}): oj.Model|Array; + rest(n?: number, options?: object): Array|Promise; + set(models: object, options?: {add?: boolean, remove?: boolean, merge?: boolean, silent?: boolean, deferred?: boolean, [propName: string]: any}): Promise|null; + setFetchSize(n: number): undefined; + setModelLimit(n: number): undefined; + setRangeLocal(start: number, count: number): Promise; + shift(options?: object): oj.Model|Promise|null; + size(): number; + slice(start: number, end?: number, options?: object): Promise>|Array; + sort(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise|null; + sortBy(iterator: string|((param0: oj.Model)=> object), context?: object): Array; + sortedIndex(comparator: string|((param0: oj.Model, param1?: oj.Model)=> object)): number; + stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; + sync(method: string, collection: oj.Collection, options?: {success?: (json?: Array)=> void, error?: (xhr: Object, status: Object, error: Object)=> void, [propName: string]: any}): object; + toJSON(): Array; + trigger(eventType: string): undefined; + unshift(m: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; + whenReady(): Promise; + where(attrs: object|Array, options?: object): Promise>|Array; + whereToCollection(attrs: object|Array, options?: object): oj.Collection|Promise; + without(...var_args: (oj.Model)[]): Array; + } + namespace Collection { + type CustomPagingOptionsReturn = + { + totalResults?: number, limit?: number, count?: number, offset?: number, hasMore?: boolean + } + } + namespace Collection { + type SetRangeLocalPromise = + { + start: number, count: number, models: Array + } + } + +} +declare namespace oj { + class Model { + attributes: object; + customURL: ((param0: string, param1: oj.Model, param2: object)=> string|Object|null)|null; + defaults: object; + id: string|null; + idAttribute: string|null; + omitLanguageHeader: boolean; + parse: ((param0: object)=> Object); + parseSave: ((param0: object)=> Object); + urlRoot: string|null; + validate: ((param0: object, param1: Object)=> string|Object|null)|null; + validationError: string|object|null; + constructor(attributes?: object, options?: object); + static extend(properties?: {parse?: (data: any)=> any, parseSave?: (data: any)=> any, urlRoot?: string, initialize?: (models: Array, options: Object)=> void, validate?: null|object|string|((attributes: Object, options?: oj.Model)=> number), [propName: string]: any}, classProperties?: object): any; + changedAttributes(attributes?: object): object|boolean; + clear(options?: object): oj.Model|boolean; + clone(): oj.Model; + destroy(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, wait?: boolean, [propName: string]: any}): boolean; + fetch(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, [propName: string]: any}): object; + get(property: string): object; + has(property: string): boolean; + hasChanged(attribute?: string): boolean; + invert(): object; + isNew(): boolean; + isValid(): boolean; + keys(): Array; + listenTo(otherObj: object, eventType: string, callback: Function): undefined; + listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; + matches(attrs: object): ((param0: oj.Model)=> boolean); + off(eventType?: string|object, callback?: Function, context?: object): undefined; + omit(keys: Array|object): object; + on(eventType: string|object, callback: Function, context?: object): undefined; + once(eventType: string, callback: Function, context?: object): undefined; + pairs(): object; + pick(keys: Array|object): object; + previous(attr: string): object; + previousAttributes(): object; + save(attributes?: object, options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, contentType?: string, valdiate?: boolean, wait?: boolean, patch?: boolean, attrs?: Object, [propName: string]: any}): object|boolean; + set(property: string|object, value?: object, options?: object): oj.Model|boolean; + stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; + sync(method: string, model: oj.Model, options?: object): object; + toJSON(): object; + trigger(eventType: string): undefined; + unset(property: string, options?: object): boolean; + url(): string|null; + values(): Array; + } + +} +declare namespace oj { + class OAuth { + constructor(attributes: object, header: string); + cleanAccessTokenRequest(): undefined; + cleanAccessTokenResponse(): undefined; + clientCredentialGrant(): undefined; + getAccessTokenRequest(): object; + getAccessTokenResponse(): object; + getHeader(): object; + isInitialized(): boolean; + setAccessTokenRequest(data: object): undefined; + setAccessTokenResponse(data: object): undefined; + } + +} +declare namespace oj { + class URLError { + constructor(); + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts new file mode 100644 index 0000000000..f2b9b3db7c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts @@ -0,0 +1,3 @@ +export class ModuleElementUtils { + } + diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts new file mode 100644 index 0000000000..5129c36e5a --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts @@ -0,0 +1,54 @@ +declare namespace oj { + interface ModuleElementAnimation { + animate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object, newViewParent: Node, oldViewParent: Node, removeOldView: Function, insertNewView: Function, oldDomNodes: Array}): Promise; + canAnimate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): boolean; + prepareAnimation(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): object; + } + +} +declare namespace oj { + class ojModule { + animation: object; + config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; + onAnimationChanged: (event: CustomEvent)=> any; + onConfigChanged: (event: CustomEvent)=> any; + onOjTransitionEnd: (event: oj.ojModule.ojTransitionEnd)=> any; + onOjTransitionStart: (event: oj.ojModule.ojTransitionStart)=> any; + onOjViewConnected: (event: oj.ojModule.ojViewConnected)=> any; + onOjViewDisconnected: (event: oj.ojModule.ojViewDisconnected)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojModule { + class ojTransitionEnd extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojTransitionStart extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojViewConnected extends CustomEvent<{viewModel: object, [propName: string]: any}> { + + } + + class ojViewDisconnected extends CustomEvent<{viewModel: object, view: Array, [propName: string]: any}> { + + } + } + interface ojModuleEventMap extends oj.JetElementEventMap { + 'ojTransitionEnd': oj.ojModule.ojTransitionEnd; + 'ojTransitionStart': oj.ojModule.ojTransitionStart; + 'ojViewConnected': oj.ojModule.ojViewConnected; + 'ojViewDisconnected': oj.ojModule.ojViewDisconnected; + 'animationChanged': CustomEvent; + 'configChanged': CustomEvent; + } + interface ojModuleSettableProperties extends JetSettableProperties { + animation: object; + config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts new file mode 100644 index 0000000000..3cf1b7ee7e --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts @@ -0,0 +1,24 @@ +/// +declare namespace oj { + namespace ModuleBinding { + var defaults: {viewPath: string, viewSuffix: string, modelPath: string, initializeMethod: string, disposeMethod: string, activatedHandler: string, attachedHandler: string, detachedHandler: string, bindingsAppliedHandler: string, deactivatedHandler: string, transitionCompletedHandler: string}; + } + +} +declare namespace oj.ModuleBinding { + interface ConventionMethods { + dispose(info: {element: Node, valueAccessor: Function}): void; + handleActivated(info: {element: Node, valueAccessor: Function}): Promise|undefined; + handleAttached(info: {element: Node, valueAccessor: Function, fromCache: boolean}): void; + handleBindingsApplied(info: {element: Node, valueAccessor: Function}): void; + handleDeactivated(info: {element: Node, valueAccessor: Function}): void; + handleDetached(info: {element: Node, valueAccessor: Function, cachedNodes: Array}): void; + handleTransitionCompleted(info: {element: Node, valueAccessor: Function}): void; + initialize(info: {element: Node, valueAccessor: Function}): object|undefined; + } + +} +declare namespace ojModule { + var Options: {view: Promise|string|Array|DocumentFragment, viewModel: Promise|Function|object, name: string, viewName: string, require: Function|{instance: any, viewPath: string, modelPath: string}, viewModelFactory: object, params: object, createViewFunction: string, cacheKey: string, lifecycleListener: object, animation: object}; + } + diff --git a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts new file mode 100644 index 0000000000..6d0592dbea --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts @@ -0,0 +1,30 @@ +/// +declare namespace oj { + namespace ModuleAnimations { + var coverStart: oj.ModuleElementAnimation; + var coverUp: oj.ModuleElementAnimation; + var fade: oj.ModuleElementAnimation; + var navChild: oj.ModuleElementAnimation; + var navParent: oj.ModuleElementAnimation; + var navSiblingEarlier: oj.ModuleElementAnimation; + var navSiblingLater: oj.ModuleElementAnimation; + var pushEnd: oj.ModuleElementAnimation; + var pushStart: oj.ModuleElementAnimation; + var revealDown: oj.ModuleElementAnimation; + var revealEnd: oj.ModuleElementAnimation; + var zoomIn: oj.ModuleElementAnimation; + var zoomOut: oj.ModuleElementAnimation; + function createAnimation(oldViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewOnTop: boolean): oj.ModuleElementAnimation; + function switcher(callback: (param0: oj.ModuleAnimations.SwitcherCallBackParam) => oj.ModuleAnimations.Animations): oj.ModuleElementAnimation; + } + namespace ModuleAnimations { + type Animations = 'coverStart'|'coverUp'|'fade'|'navChild'|'navParent'|'navSiblingEarlier'|'navSiblingLater'|'pushEnd'|'pushStart'|'revealDown'|'revealEnd'|'zoomIn'|'zoomOut'; + } + namespace ModuleAnimations { + type SwitcherCallBackParam = + { + node: Element, valueAccessor: (()=> any), isInitial: boolean, oldViewModel: any, newViewModel: any + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts new file mode 100644 index 0000000000..9d1c348467 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts @@ -0,0 +1,253 @@ +/// +/// +/// +declare namespace oj { + class ojNavigationList extends baseComponent> { + as: string; + currentItem: K; + data: oj.DataProvider|null; + display: 'all'|'icons'; + drillMode: 'none'|'collapsible'|'sliding'; + edge: 'top'|'start'; + expanded: KeySet.KeySet; + hierarchyMenuThreshold: number; + item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + rootLabel: string|null; + selection: K; + translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onDrillModeChanged: (event: CustomEvent)=> any; + onEdgeChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHierarchyMenuThresholdChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onOverflowChanged: (event: CustomEvent)=> any; + onRootLabelChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojNavigationList.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojNavigationList.ojAnimateStart)=> any; + onOjBeforeCollapse: (event: oj.ojNavigationList.ojBeforeCollapse)=> any; + onOjBeforeCurrentItem: (event: oj.ojNavigationList.ojBeforeCurrentItem)=> any; + onOjBeforeExpand: (event: oj.ojNavigationList.ojBeforeExpand)=> any; + onOjBeforeSelect: (event: oj.ojNavigationList.ojBeforeSelect)=> any; + onOjCollapse: (event: oj.ojNavigationList.ojCollapse)=> any; + onOjExpand: (event: oj.ojNavigationList.ojExpand)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojNavigationList.NodeContext|null; + refresh(): void; + } + namespace ojNavigationList { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + } + interface ojNavigationListEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojNavigationList.ojAnimateEnd; + 'ojAnimateStart': oj.ojNavigationList.ojAnimateStart; + 'ojBeforeCollapse': oj.ojNavigationList.ojBeforeCollapse; + 'ojBeforeCurrentItem': oj.ojNavigationList.ojBeforeCurrentItem; + 'ojBeforeExpand': oj.ojNavigationList.ojBeforeExpand; + 'ojBeforeSelect': oj.ojNavigationList.ojBeforeSelect; + 'ojCollapse': oj.ojNavigationList.ojCollapse; + 'ojExpand': oj.ojNavigationList.ojExpand; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'drillModeChanged': CustomEvent; + 'edgeChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'hierarchyMenuThresholdChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'overflowChanged': CustomEvent; + 'rootLabelChanged': CustomEvent; + 'selectionChanged': CustomEvent; + } + interface ojNavigationListSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: oj.DataProvider|null; + display: 'all'|'icons'; + drillMode: 'none'|'collapsible'|'sliding'; + edge: 'top'|'start'; + expanded: KeySet.KeySet; + hierarchyMenuThreshold: number; + item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + rootLabel: string|null; + selection: K; + translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; + } + namespace ojNavigationList { + type ItemContext = + { + componentElement: Element, datasource?: oj.DataProvider, index: number, key: any, data: any, parentElement: Element + } + } + namespace ojNavigationList { + type NodeContext = + { + subId: string, index: number, key: K, group: boolean, parent?: Element + } + } + +} +declare namespace oj { + class ojTabBar extends baseComponent> { + as: string; + currentItem: any; + data: oj.DataProvider|null; + display: 'all'|'icons'; + edge: 'top'|'bottom'|'start'|'end'; + item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + reorderable: 'enabled'|'disabled'; + selection: any; + truncation: 'none'|'progressive'; + translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; + onAsChanged: (event: CustomEvent)=> any; + onCurrentItemChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onEdgeChanged: (event: CustomEvent)=> any; + onItemChanged: (event: CustomEvent)=> any; + onOverflowChanged: (event: CustomEvent)=> any; + onReorderableChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onTruncationChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTabBar.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTabBar.ojAnimateStart)=> any; + onOjBeforeCurrentItem: (event: oj.ojTabBar.ojBeforeCurrentItem)=> any; + onOjBeforeDeselect: (event: oj.ojTabBar.ojBeforeDeselect)=> any; + onOjBeforeRemove: (event: oj.ojTabBar.ojBeforeRemove)=> any; + onOjBeforeSelect: (event: oj.ojTabBar.ojBeforeSelect)=> any; + onOjDeselect: (event: oj.ojTabBar.ojDeselect)=> any; + onOjRemove: (event: oj.ojTabBar.ojRemove)=> any; + onOjReorder: (event: oj.ojTabBar.ojReorder)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTabBar.NodeContext|null; + refresh(): void; + } + namespace ojTabBar { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { + + } + + class ojBeforeDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { + + } + + class ojBeforeRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { + + } + + class ojDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { + + } + + class ojRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { + + } + + class ojReorder extends CustomEvent<{item: Element, position: 'before'|'after', reference: Element, [propName: string]: any}> { + + } + } + interface ojTabBarEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojTabBar.ojAnimateEnd; + 'ojAnimateStart': oj.ojTabBar.ojAnimateStart; + 'ojBeforeCurrentItem': oj.ojTabBar.ojBeforeCurrentItem; + 'ojBeforeDeselect': oj.ojTabBar.ojBeforeDeselect; + 'ojBeforeRemove': oj.ojTabBar.ojBeforeRemove; + 'ojBeforeSelect': oj.ojTabBar.ojBeforeSelect; + 'ojDeselect': oj.ojTabBar.ojDeselect; + 'ojRemove': oj.ojTabBar.ojRemove; + 'ojReorder': oj.ojTabBar.ojReorder; + 'asChanged': CustomEvent; + 'currentItemChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'edgeChanged': CustomEvent; + 'itemChanged': CustomEvent; + 'overflowChanged': CustomEvent; + 'reorderableChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'truncationChanged': CustomEvent; + } + interface ojTabBarSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: any; + data: oj.DataProvider|null; + display: 'all'|'icons'; + edge: 'top'|'bottom'|'start'|'end'; + item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; + overflow: 'popup'|'hidden'; + reorderable: 'enabled'|'disabled'; + selection: any; + truncation: 'none'|'progressive'; + translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; + } + namespace ojTabBar { + type ItemContext = + { + componentElement: Element, datasource?: oj.DataProvider, index: number, key: K, data: D, parentElement: Element + } + } + namespace ojTabBar { + type NodeContext = + { + subId: string, index: number, key: K + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts new file mode 100644 index 0000000000..454774c4bc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts @@ -0,0 +1,251 @@ +/// +/// +declare namespace oj { + class ojNBox extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + cellContent: 'counts'|'auto'; + cellMaximize: 'off'|'on'; + cells: Promise>|null; + columns: Promise>|null; + columnsTitle: string; + countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); + data: oj.DataProvider|null; + groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; + groupBehavior: 'acrossCells'|'none'|'withinCell'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + labelTruncation: 'ifRequired'|'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Promise>|null; + rowsTitle: string; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; + tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onCellContentChanged: (event: CustomEvent)=> any; + onCellMaximizeChanged: (event: CustomEvent)=> any; + onCellsChanged: (event: CustomEvent)=> any; + onColumnsChanged: (event: CustomEvent)=> any; + onColumnsTitleChanged: (event: CustomEvent)=> any; + onCountLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onGroupAttributesChanged: (event: CustomEvent)=> any; + onGroupBehaviorChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onLabelTruncationChanged: (event: CustomEvent)=> any; + onMaximizedColumnChanged: (event: CustomEvent)=> any; + onMaximizedRowChanged: (event: CustomEvent)=> any; + onOtherColorChanged: (event: CustomEvent)=> any; + onOtherThresholdChanged: (event: CustomEvent)=> any; + onRowsChanged: (event: CustomEvent)=> any; + onRowsTitleChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getCell(rowValue: string, columnValue: string): object|null; + getColumn(columnValue: string): object|null; + getColumnCount(): number; + getColumnsTitle(): string; + getContextByNode(node: Element): object|null; + getDialog(): object|null; + getGroupBehavior(): string; + getGroupNode(groupCategory: string): object|null; + getRow(rowValue: string): object|null; + getRowCount(): number; + getRowsTitle(): string; + } + interface ojNBoxEventMap extends oj.dvtBaseComponentEventMap { + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'cellContentChanged': CustomEvent; + 'cellMaximizeChanged': CustomEvent; + 'cellsChanged': CustomEvent; + 'columnsChanged': CustomEvent; + 'columnsTitleChanged': CustomEvent; + 'countLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'groupAttributesChanged': CustomEvent; + 'groupBehaviorChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'labelTruncationChanged': CustomEvent; + 'maximizedColumnChanged': CustomEvent; + 'maximizedRowChanged': CustomEvent; + 'otherColorChanged': CustomEvent; + 'otherThresholdChanged': CustomEvent; + 'rowsChanged': CustomEvent; + 'rowsTitleChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + cellContent: 'counts'|'auto'; + cellMaximize: 'off'|'on'; + cells: Array|Promise>|null; + columns: Array|Promise>|null; + columnsTitle: string; + countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); + data: oj.DataProvider|null; + groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; + groupBehavior: 'acrossCells'|'none'|'withinCell'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + labelTruncation: 'ifRequired'|'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Array|Promise>|null; + rowsTitle: string; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; + tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojNBox { + type Cell = + { + label?: string, column: string, labelHalign?: string, labelStyle?: object, svgClassName?: string, svgStyle?: object, maximizedSvgStyle?: object, maximizedSvgClassName?: string, minimizedSvgStyle?: object, minimizedSvgClassName?: string, row: string, showCount?: 'on'|'off'|'auto'|string, shortDesc?: string + } + } + namespace ojNBox { + type Column = + { + id: string, label?: string, labelStyle?: object + } + } + namespace ojNBox { + type CountLabelContext = + { + row: string, column: string, nodeCount: number, totalNodeCount: number, highlightedNodeCount: number + } + } + namespace ojNBox { + type Row = + { + id: string, label?: string, labelStyle?: object + } + } + namespace ojNBox { + type TooltipContext = + { + parentElement: Element, id: K, label: string, secondaryLabel: string, row: string, column: string, color: string, indicatorColor: string, componentElement: Element + } + } + +} +declare namespace oj { + class ojNBoxNode extends JetElement { + borderColor: string; + borderWidth: number; + categories: Array; + color?: string; + column: string; + groupCategory?: string; + icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; + indicatorColor?: string; + indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object|null; + xPercentage?: number|null; + yPercentage?: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onColumnChanged: (event: CustomEvent)=> any; + onGroupCategoryChanged: (event: CustomEvent)=> any; + onIconChanged: (event: CustomEvent)=> any; + onIndicatorColorChanged: (event: CustomEvent)=> any; + onIndicatorIconChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onRowChanged: (event: CustomEvent)=> any; + onSecondaryLabelChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onXPercentageChanged: (event: CustomEvent)=> any; + onYPercentageChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojNBoxNodeEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'columnChanged': CustomEvent; + 'groupCategoryChanged': CustomEvent; + 'iconChanged': CustomEvent; + 'indicatorColorChanged': CustomEvent; + 'indicatorIconChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'rowChanged': CustomEvent; + 'secondaryLabelChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'xPercentageChanged': CustomEvent; + 'yPercentageChanged': CustomEvent; + } + interface ojNBoxNodeSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: Array; + color?: string; + column: string; + groupCategory?: string; + icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; + indicatorColor?: string; + indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object|null; + xPercentage?: number|null; + yPercentage?: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts new file mode 100644 index 0000000000..eab2775d88 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts @@ -0,0 +1,13 @@ +declare namespace oj { + class OffcanvasUtils { + constructor(); + static close(offcanvas: {selector: string}): Promise; + static open(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; + static setupPanToReveal(offcanvas: {selector: string, edge?: string, size?: string}): void; + static setupResponsive(offcanvas: {selector: string, edge: string, query: string}): void; + static tearDownPanToReveal(offcanvas: {selector: string}): void; + static tearDownResponsive(offcanvas: {selector: string}): void; + static toggle(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts new file mode 100644 index 0000000000..335cee2990 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojOptgroup extends JetElement { + disabled: boolean; + label: string; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojOptgroupEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'labelChanged': CustomEvent; + } + interface ojOptgroupSettableProperties extends JetSettableProperties { + disabled: boolean; + label: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts new file mode 100644 index 0000000000..012cb7a4cc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts @@ -0,0 +1,25 @@ +declare namespace oj { + class ojOption extends JetElement { + disabled: boolean; + value: any; + onDisabledChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojOptionEventMap extends oj.JetElementEventMap { + 'disabledChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojOptionSettableProperties extends JetSettableProperties { + disabled: boolean; + value: any; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts new file mode 100644 index 0000000000..ec1496377f --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts @@ -0,0 +1,206 @@ +/// +/// +declare namespace oj { + class ojPictoChart extends dvtBaseComponent> { + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; + as: string; + columnCount: number|null; + columnWidth: number|null; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + layout: 'vertical'|'horizontal'; + layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; + rowCount: number|null; + rowHeight: number|null; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColumnCountChanged: (event: CustomEvent)=> any; + onColumnWidthChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onLayoutOriginChanged: (event: CustomEvent)=> any; + onRowCountChanged: (event: CustomEvent)=> any; + onRowHeightChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onOjDrill: (event: oj.ojPictoChart.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojPictoChart.NodeContext|null; + getItem(index: number): oj.ojPictoChart.ItemContext|null; + getItemCount(): number; + } + namespace ojPictoChart { + class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { + + } + } + interface ojPictoChartEventMap extends oj.dvtBaseComponentEventMap { + 'ojDrill': oj.ojPictoChart.ojDrill; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'columnCountChanged': CustomEvent; + 'columnWidthChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'layoutOriginChanged': CustomEvent; + 'rowCountChanged': CustomEvent; + 'rowHeightChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + } + interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration?: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; + as: string; + columnCount: number|null; + columnWidth: number|null; + data: oj.DataProvider|null; + drilling: 'on'|'off'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + layout: 'vertical'|'horizontal'; + layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; + rowCount: number|null; + rowHeight: number|null; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojPictoChart { + type ItemContext = + { + color: string, count: number, id: K, name: string, selected: boolean, tooltip: string + } + } + namespace ojPictoChart { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojPictoChart { + type TooltipContext = + { + parentElement: Element, id: K, name: string, count: number, color: string, componentElement: Element + } + } + +} +declare namespace oj { + class ojPictoChartItem extends JetElement { + borderColor: string; + borderWidth: number; + categories: Array; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit'|'off'|'on'; + name: string; + rowSpan: number; + shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onColumnSpanChanged: (event: CustomEvent)=> any; + onCountChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onNameChanged: (event: CustomEvent)=> any; + onRowSpanChanged: (event: CustomEvent)=> any; + onShapeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojPictoChartItemEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'columnSpanChanged': CustomEvent; + 'countChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'nameChanged': CustomEvent; + 'rowSpanChanged': CustomEvent; + 'shapeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + } + interface ojPictoChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: Array; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit'|'off'|'on'; + name: string; + rowSpan: number; + shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts new file mode 100644 index 0000000000..c0b076be88 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts @@ -0,0 +1,105 @@ +/// +declare namespace oj { + class ojPopup extends baseComponent { + autoDismiss: 'none'|'focusLoss'; + chrome: 'default'|'none'; + initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; + modality: 'modeless'|'modal'; + position: oj.ojPopup.Position; + tail: 'none'|'simple'; + translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; + onAutoDismissChanged: (event: CustomEvent)=> any; + onChromeChanged: (event: CustomEvent)=> any; + onInitialFocusChanged: (event: CustomEvent)=> any; + onModalityChanged: (event: CustomEvent)=> any; + onPositionChanged: (event: CustomEvent)=> any; + onTailChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojPopup.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojPopup.ojAnimateStart)=> any; + onOjBeforeClose: (event: oj.ojPopup.ojBeforeClose)=> any; + onOjBeforeOpen: (event: oj.ojPopup.ojBeforeOpen)=> any; + onOjClose: (event: oj.ojPopup.ojClose)=> any; + onOjFocus: (event: oj.ojPopup.ojFocus)=> any; + onOjOpen: (event: oj.ojPopup.ojOpen)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + close(): void; + isOpen(): boolean; + open(launcher: string|Element, position?: oj.ojPopup.Position): void; + refresh(): void; + } + namespace ojPopup { + class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeClose extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojClose extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojFocus extends CustomEvent<{ [propName: string]: any}> { + + } + + class ojOpen extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojPopupEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojPopup.ojAnimateEnd; + 'ojAnimateStart': oj.ojPopup.ojAnimateStart; + 'ojBeforeClose': oj.ojPopup.ojBeforeClose; + 'ojBeforeOpen': oj.ojPopup.ojBeforeOpen; + 'ojClose': oj.ojPopup.ojClose; + 'ojFocus': oj.ojPopup.ojFocus; + 'ojOpen': oj.ojPopup.ojOpen; + 'autoDismissChanged': CustomEvent; + 'chromeChanged': CustomEvent; + 'initialFocusChanged': CustomEvent; + 'modalityChanged': CustomEvent; + 'positionChanged': CustomEvent; + 'tailChanged': CustomEvent; + } + interface ojPopupSettableProperties extends baseComponentSettableProperties { + autoDismiss: 'none'|'focusLoss'; + chrome: 'default'|'none'; + initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; + modality: 'modeless'|'modal'; + position: oj.ojPopup.Position; + tail: 'none'|'simple'; + translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; + } + namespace ojPopup { + type Position = + { + my?: oj.ojPopup.PositionAlign, at?: oj.ojPopup.PositionAlign, offset?: oj.ojPopup.PositionPoint, of?: string|oj.ojPopup.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' + } + } + namespace ojPopup { + type PositionAlign = + { + vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' + } + } + namespace ojPopup { + type PositionPoint = + { + x?: number, y?: number + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts new file mode 100644 index 0000000000..66fec85056 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts @@ -0,0 +1,28 @@ +/// +declare namespace oj { + class ojProgress extends baseComponent { + max: number; + type: 'bar'|'circle'; + value: number; + translations: {ariaIndeterminateProgressText?: string}; + onMaxChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojProgressEventMap extends oj.baseComponentEventMap { + 'maxChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojProgressSettableProperties extends baseComponentSettableProperties { + max: number; + type: 'bar'|'circle'; + value: number; + translations: {ariaIndeterminateProgressText?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts new file mode 100644 index 0000000000..d3b9efbc83 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts @@ -0,0 +1,50 @@ +/// +/// +/// +declare namespace oj { + class ojProgressList extends JetElement { + data: oj.DataProvider|null; + onDataChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojProgressListEventMap extends oj.JetElementEventMap { + 'dataChanged': CustomEvent; + } + interface ojProgressListSettableProperties extends JetSettableProperties { + data: oj.DataProvider|null; + } + +} +declare namespace oj { + interface ProgressItem { + addEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; + removeEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; + } + namespace ProgressItem { + enum EventType { + LOADSTART = "loadstart", + PROGRESS = "progress", + ABORT = "abort", + ERROR = "error", + LOAD = "load", + TIMEOUT = "timeout", + LOADEND = "loadend", + } + enum Status { + QUEUED = "queued", + LOADSTARTED = "loadstarted", + ABORTED = "aborted", + ERRORED = "errored", + TIMEDOUT = "timedout", + LOADED = "loaded", + } + } + + +} diff --git a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts new file mode 100644 index 0000000000..7367c03bbd --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts @@ -0,0 +1,7 @@ +declare namespace oj { + class PullToRefreshUtils { + static setupPullToRefresh(element: Element, refreshFunc: (()=> Promise), options?: {threshold?: number, primaryText?: string, secondaryText?: string}): void; + static tearDownPullToRefresh(element: Element): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts new file mode 100644 index 0000000000..7657b0a18c --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts @@ -0,0 +1,47 @@ +/// +declare namespace oj { + class ojRadioset extends editableValue { + disabled: boolean|null; + labelledBy: string|null; + required: boolean; + value: any; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onDisabledChanged: (event: CustomEvent)=> any; + onLabelledByChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojRadioset.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojRadioset.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojRadioset { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojRadiosetEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojRadioset.ojAnimateEnd; + 'ojAnimateStart': oj.ojRadioset.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'labelledByChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojRadiosetSettableProperties extends editableValueSettableProperties { + disabled: boolean|null; + labelledBy: string|null; + required: boolean; + value: any; + translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts new file mode 100644 index 0000000000..5c2dee4c70 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts @@ -0,0 +1,30 @@ +/// +declare namespace oj { + class ojRefresher extends baseComponent { + refreshContent: (()=> Promise); + target: Element; + text: string; + threshold: number; + onRefreshContentChanged: (event: CustomEvent)=> any; + onTargetChanged: (event: CustomEvent)=> any; + onTextChanged: (event: CustomEvent)=> any; + onThresholdChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojRefresherEventMap extends oj.baseComponentEventMap { + 'refreshContentChanged': CustomEvent; + 'targetChanged': CustomEvent; + 'textChanged': CustomEvent; + 'thresholdChanged': CustomEvent; + } + interface ojRefresherSettableProperties extends baseComponentSettableProperties { + refreshContent: (()=> Promise); + target: Element; + text: string; + threshold: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts new file mode 100644 index 0000000000..44c23b8f5d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts @@ -0,0 +1,69 @@ +/// +declare namespace oj { + class Router { + readonly currentState: (()=> oj.RouterState|undefined); + readonly currentValue: (()=> string|undefined); + defaultStateId: string|undefined; + static defaults: {urlAdapter?: oj.Router.urlPathAdapter|oj.Router.urlParamAdapter, baseUrl?: string, rootInstanceName?: string}; + readonly direction: string|undefined; + readonly moduleConfig: {name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string}}, lifecycleListener: {attached: ((param0: string)=> void)}}; + readonly name: string; + readonly observableModuleConfig: KnockoutObservable; + readonly parent: oj.Router|undefined; + static readonly rootInstance: oj.Router; + readonly stateId: ((param0?: string)=> string); + readonly states: Array|null; + static readonly transitionedToState: object; + static sync(): Promise<{hasChanged: boolean}>; + configure(option: {[key:string]: oj.RouterState.ConfigOptions}|((id:string)=> oj.RouterState)): any; + createChildRouter(name: string, parentStateId?: string): oj.Router; + dispose(): undefined; + getChildRouter(name: string): oj.Router|undefined; + getCurrentChildRouter(): oj.Router|undefined; + getState(stateId: string): oj.RouterState|undefined; + go(stateIdPath?: string|Array, options?: {historyUpdate: string}): Promise<{hasChanged: boolean}>; + retrieve(): any; + store(data: object): undefined; + } + namespace Router { + type ModuleConfigType = + { + name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string, parameters: object}}, lifecycleListener: {attached: ((param0: object)=> void)} + } + } + namespace Router { + class urlParamAdapter { + constructor(); + } +class urlPathAdapter { + constructor(); + } + + + } + + +} +declare namespace oj { + class RouterState { + canEnter: (()=> boolean)|(()=> Promise); + canExit: (()=> boolean)|(()=> Promise); + enter: (()=> void)|(()=> Promise); + exit: (()=> void)|(()=> Promise); + readonly id: string; + label: string|undefined; + parameters: object; + title: string|(()=> string|undefined); + value: any; + constructor(id: string, options?: oj.RouterState.ConfigOptions, router?: oj.Router); + go(): Promise<{hasChanged: boolean}>; + isCurrent(): boolean; + } + namespace RouterState { + type ConfigOptions = + { + label?: string, value?: any, isDefault?: boolean, canEnter?: (()=> boolean)|(()=> Promise), enter?: (()=> void)|(()=> Promise), canExit?: (()=> boolean)|(()=> Promise), exit?: (()=> void)|(()=> Promise) + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts new file mode 100644 index 0000000000..d6c2cec4a5 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts @@ -0,0 +1,427 @@ +/// +declare namespace oj { + abstract class ojCombobox, SV=V, RV=V> extends editableValue { + onOjAnimateEnd: (event: oj.ojCombobox.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojCombobox.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojCombobox { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojComboboxEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojCombobox.ojAnimateEnd; + 'ojAnimateStart': oj.ojCombobox.ojAnimateStart; + } + interface ojComboboxSettableProperties extends editableValueSettableProperties { + } + namespace ojCombobox { + type Optgroup = + { + disabled?: boolean, label: string, children: Array<(oj.ojCombobox.Option|oj.ojCombobox.Optgroup)> + } + } + namespace ojCombobox { + type Option = + { + disabled?: boolean, label?: string, value: any + } + } + namespace ojCombobox { + type OptionContext = + { + component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element + } + } + namespace ojCombobox { + type OptionsKeys = + { + label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys + } + } + +} +declare namespace oj { + class ojComboboxMany extends ojCombobox, ojComboboxManySettableProperties, Array, string> { + asyncValidators: Array>>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array>|oj.Validation.RegisteredValidator>|null; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onMinLengthChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojComboboxMany.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojComboboxMany.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojComboboxMany { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojComboboxManyEventMap extends oj.ojComboboxEventMap { + 'ojAnimateEnd': oj.ojComboboxMany.ojAnimateEnd; + 'ojAnimateStart': oj.ojComboboxMany.ojAnimateStart; + 'asyncValidatorsChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'minLengthChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionsChanged': CustomEvent; + } + interface ojComboboxManySettableProperties extends ojComboboxSettableProperties, Array, string> { + asyncValidators: Array>>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array>|oj.Validation.RegisteredValidator>|null; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + class ojComboboxOne extends ojCombobox, any, string> { + asyncValidators: Array>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + filterOnOpen: 'none'|'rawValue'; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + onAsyncValidatorsChanged: (event: CustomEvent)=> any; + onConverterChanged: (event: CustomEvent)=> any; + onFilterOnOpenChanged: (event: CustomEvent)=> any; + onMinLengthChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRawValueChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValidatorsChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojComboboxOne.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojComboboxOne.ojAnimateStart)=> any; + onOjValueUpdated: (event: oj.ojComboboxOne.ojValueUpdated)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojComboboxOne { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojValueUpdated extends CustomEvent<{value: any, previousValue: any, [propName: string]: any}> { + + } + } + interface ojComboboxOneEventMap extends oj.ojComboboxEventMap { + 'ojAnimateEnd': oj.ojComboboxOne.ojAnimateEnd; + 'ojAnimateStart': oj.ojComboboxOne.ojAnimateStart; + 'ojValueUpdated': oj.ojComboboxOne.ojValueUpdated; + 'asyncValidatorsChanged': CustomEvent; + 'converterChanged': CustomEvent; + 'filterOnOpenChanged': CustomEvent; + 'minLengthChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'rawValueChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'validatorsChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionChanged': CustomEvent; + } + interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: oj.Converter|oj.Validation.RegisteredConverter|null; + filterOnOpen: 'none'|'rawValue'; + minLength: number; + optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + readonly rawValue: string|null; + required: boolean; + validators: Array|oj.Validation.RegisteredValidator>|null; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; + } + +} +declare namespace oj { + abstract class ojSelect, SV=V> extends editableValue { + onOjAnimateEnd: (event: oj.ojSelect.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelect.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + validate(): Promise; + } + namespace ojSelect { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSelect.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelect.ojAnimateStart; + } + interface ojSelectSettableProperties extends editableValueSettableProperties { + } + namespace ojSelect { + type Optgroup = + { + disabled?: boolean, label: string, children: Array<(oj.ojSelect.Option|oj.ojSelect.Optgroup)> + } + } + namespace ojSelect { + type Option = + { + disabled?: boolean, label?: string, value: any + } + } + namespace ojSelect { + type OptionContext = + { + component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element + } + } + namespace ojSelect { + type OptionsKeys = + { + label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys + } + } + +} +declare namespace oj { + class ojSelectMany extends ojSelect, ojSelectManySettableProperties> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionsChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSelectMany.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelectMany.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSelectMany { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectManyEventMap extends oj.ojSelectEventMap { + 'ojAnimateEnd': oj.ojSelectMany.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelectMany.ojAnimateStart; + 'minimumResultsForSearchChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionsChanged': CustomEvent; + } + interface ojSelectManySettableProperties extends ojSelectSettableProperties> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: Array|null; + valueOptions: Array<{value: any, label?: string}> | null; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + } + +} +declare namespace oj { + class ojSelectOne extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; + onOptionRendererChanged: (event: CustomEvent)=> any; + onOptionsChanged: (event: CustomEvent)=> any; + onOptionsKeysChanged: (event: CustomEvent)=> any; + onPickerAttributesChanged: (event: CustomEvent)=> any; + onPlaceholderChanged: (event: CustomEvent)=> any; + onRenderModeChanged: (event: CustomEvent)=> any; + onRequiredChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onValueOptionChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSelectOne.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSelectOne.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSelectOne { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSelectOneEventMap extends oj.ojSelectEventMap { + 'ojAnimateEnd': oj.ojSelectOne.ojAnimateEnd; + 'ojAnimateStart': oj.ojSelectOne.ojAnimateStart; + 'minimumResultsForSearchChanged': CustomEvent; + 'optionRendererChanged': CustomEvent; + 'optionsChanged': CustomEvent; + 'optionsKeysChanged': CustomEvent; + 'pickerAttributesChanged': CustomEvent; + 'placeholderChanged': CustomEvent; + 'renderModeChanged': CustomEvent; + 'requiredChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'valueOptionChanged': CustomEvent; + } + interface ojSelectOneSettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; + options: Array|oj.DataProvider|null; + optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; + pickerAttributes: {style?: string, class?: string}; + placeholder: string|null; + renderMode: 'jet'|'native'; + required: boolean; + value: any; + valueOption: {value: any, label?: string}; + translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; + } + +} +declare namespace oj { + interface Optgroup { + children: Array<(oj.Option|oj.Optgroup)>; + disabled?: boolean; + label: string; + } + +} +declare namespace oj { + interface Option { + disabled?: boolean; + label?: string; + value: object; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts new file mode 100644 index 0000000000..467073e274 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts @@ -0,0 +1,61 @@ +/// +declare namespace oj { + class ojSlider extends editableValue { + disabled: boolean|null; + max: number|null; + min: number|null; + orientation: 'horizontal'|'vertical'; + step: number|null; + readonly transientValue: number; + type: 'fromMin'|'fromMax'|'single'; + value: number|null; + translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; + onDisabledChanged: (event: CustomEvent)=> any; + onMaxChanged: (event: CustomEvent)=> any; + onMinChanged: (event: CustomEvent)=> any; + onOrientationChanged: (event: CustomEvent)=> any; + onStepChanged: (event: CustomEvent)=> any; + onTransientValueChanged: (event: CustomEvent)=> any; + onTypeChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSlider.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSlider.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSlider { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSliderEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSlider.ojAnimateEnd; + 'ojAnimateStart': oj.ojSlider.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'maxChanged': CustomEvent; + 'minChanged': CustomEvent; + 'orientationChanged': CustomEvent; + 'stepChanged': CustomEvent; + 'transientValueChanged': CustomEvent; + 'typeChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSliderSettableProperties extends editableValueSettableProperties { + disabled: boolean|null; + max: number|null; + min: number|null; + orientation: 'horizontal'|'vertical'; + step: number|null; + readonly transientValue: number; + type: 'fromMin'|'fromMax'|'single'; + value: number|null; + translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts new file mode 100644 index 0000000000..6ef93fd030 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts @@ -0,0 +1,270 @@ +/// +declare namespace oj { + class ojSunburst extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + expanded: KeySet.KeySet; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; + rootNode: any; + rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; + rotation: 'off'|'on'; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + startAngle: number; + tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAnimationUpdateColorChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColorLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayLevelsChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onExpandedChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onNodeDefaultsChanged: (event: CustomEvent)=> any; + onRootNodeChanged: (event: CustomEvent)=> any; + onRootNodeContentChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSizeLabelChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onStartAngleChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onOjBeforeCollapse: (event: oj.ojSunburst.ojBeforeCollapse)=> any; + onOjBeforeDrill: (event: oj.ojSunburst.ojBeforeDrill)=> any; + onOjBeforeExpand: (event: oj.ojSunburst.ojBeforeExpand)=> any; + onOjCollapse: (event: oj.ojSunburst.ojCollapse)=> any; + onOjDrill: (event: oj.ojSunburst.ojDrill)=> any; + onOjExpand: (event: oj.ojSunburst.ojExpand)=> any; + onOjRotateInput: (event: oj.ojSunburst.ojRotateInput)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojSunburst.NodeContext|null; + getNode(subIdPath: Array): oj.ojSunburst.DataContext|null; + } + namespace ojSunburst { + class ojBeforeCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojBeforeExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojRotateInput extends CustomEvent<{value: number, [propName: string]: any}> { + + } + } + interface ojSunburstEventMap extends oj.dvtBaseComponentEventMap { + 'ojBeforeCollapse': oj.ojSunburst.ojBeforeCollapse; + 'ojBeforeDrill': oj.ojSunburst.ojBeforeDrill; + 'ojBeforeExpand': oj.ojSunburst.ojBeforeExpand; + 'ojCollapse': oj.ojSunburst.ojCollapse; + 'ojDrill': oj.ojSunburst.ojDrill; + 'ojExpand': oj.ojSunburst.ojExpand; + 'ojRotateInput': oj.ojSunburst.ojRotateInput; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'animationUpdateColorChanged': CustomEvent; + 'asChanged': CustomEvent; + 'colorLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayLevelsChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'expandedChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'nodeDefaultsChanged': CustomEvent; + 'rootNodeChanged': CustomEvent; + 'rootNodeContentChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'sizeLabelChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'startAngleChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + expanded: KeySet.KeySet; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; + rootNode: any; + rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; + rotation: 'off'|'on'; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + startAngle: number; + tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; + } + namespace ojSunburst { + type DataContext = + { + color: string, label: string, selected: boolean, size: number, tooltip: string + } + } + namespace ojSunburst { + type NodeContext = + { + subId: string, indexPath: Array + } + } + namespace ojSunburst { + type RootNodeContext = + { + outerBounds: {x: number, y: number, width: number, height: number}, innerBounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element + } + } + namespace ojSunburst { + type TooltipContext = + { + parentElement: Element, id: K, label: string, value: number, radius: number, color: string, data: object, itemData: D, componentElement: Element + } + } + +} +declare namespace oj { + class ojSunburstNode extends JetElement { + borderColor?: string; + borderWidth?: number; + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + label?: string; + labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; + labelHalign?: 'inner'|'outer'|'center'; + labelStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + radius?: number; + selectable?: 'off'|'auto'; + shortDesc?: string; + showDisclosure?: 'on'|'off'|'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelHalignChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onRadiusChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onShowDisclosureChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojSunburstNodeEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelHalignChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'radiusChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'showDisclosureChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSunburstNodeSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + label?: string; + labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; + labelHalign?: 'inner'|'outer'|'center'; + labelStyle?: object; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + radius?: number; + selectable?: 'off'|'auto'; + shortDesc?: string; + showDisclosure?: 'on'|'off'|'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts new file mode 100644 index 0000000000..11ce95700d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts @@ -0,0 +1,24 @@ +/// +declare namespace oj { + class ojSwipeActions extends baseComponent { + translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; + onOjAction: (event: oj.ojSwipeActions.ojAction)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + namespace ojSwipeActions { + class ojAction extends CustomEvent<{ [propName: string]: any}> { + + } + } + interface ojSwipeActionsEventMap extends oj.baseComponentEventMap { + 'ojAction': oj.ojSwipeActions.ojAction; + } + interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { + translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts new file mode 100644 index 0000000000..da94a66d4b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts @@ -0,0 +1,7 @@ +declare namespace oj { + class SwipeToRevealUtils { + static setupSwipeActions(elem: Element, options?: {threshold?: number}): void; + static tearDownSwipeActions(elem: Element): void; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts new file mode 100644 index 0000000000..31f04cc1ee --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts @@ -0,0 +1,39 @@ +/// +declare namespace oj { + class ojSwitch extends editableValue { + disabled: boolean; + readonly: boolean; + value: boolean; + onDisabledChanged: (event: CustomEvent)=> any; + onReadonlyChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojSwitch.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojSwitch.ojAnimateStart)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + namespace ojSwitch { + class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + } + interface ojSwitchEventMap extends oj.editableValueEventMap { + 'ojAnimateEnd': oj.ojSwitch.ojAnimateEnd; + 'ojAnimateStart': oj.ojSwitch.ojAnimateStart; + 'disabledChanged': CustomEvent; + 'readonlyChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojSwitchSettableProperties extends editableValueSettableProperties { + disabled: boolean; + readonly: boolean; + value: boolean; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts new file mode 100644 index 0000000000..d99477edf8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts @@ -0,0 +1,21 @@ +declare namespace oj { + class ojSwitcher extends JetElement { + value: string; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getProperty(property: string): any; + refresh(): void; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + } + interface ojSwitcherEventMap extends oj.JetElementEventMap { + 'valueChanged': CustomEvent; + } + interface ojSwitcherSettableProperties extends JetSettableProperties { + value: string; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts new file mode 100644 index 0000000000..5ee54785bd --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts @@ -0,0 +1,197 @@ +/// +/// +declare namespace oj { + class ojTable extends baseComponent> { + accessibility: {rowHeader: string}; + as: string; + columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; + columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; + currentRow: oj.ojTable.CurrentRow | null; + data: oj.DataProvider; + display: 'list'|'grid'; + dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; + editMode: 'none'|'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto'|'enabled'|'disabled'; + rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize: number, maxCount: number}; + scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; + selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; + selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; + selectionRequired: boolean; + verticalGridVisible: 'auto'|'enabled'|'disabled'; + translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; + onAccessibilityChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColumnsChanged: (event: CustomEvent)=> any; + onColumnsDefaultChanged: (event: CustomEvent)=> any; + onCurrentRowChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayChanged: (event: CustomEvent)=> any; + onDndChanged: (event: CustomEvent)=> any; + onEditModeChanged: (event: CustomEvent)=> any; + onFirstSelectedRowChanged: (event: CustomEvent)=> any; + onHorizontalGridVisibleChanged: (event: CustomEvent)=> any; + onRowRendererChanged: (event: CustomEvent)=> any; + onScrollPolicyChanged: (event: CustomEvent)=> any; + onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; + onScrollPositionChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRequiredChanged: (event: CustomEvent)=> any; + onVerticalGridVisibleChanged: (event: CustomEvent)=> any; + onOjAnimateEnd: (event: oj.ojTable.ojAnimateEnd)=> any; + onOjAnimateStart: (event: oj.ojTable.ojAnimateStart)=> any; + onOjBeforeCurrentRow: (event: oj.ojTable.ojBeforeCurrentRow)=> any; + onOjBeforeRowEdit: (event: oj.ojTable.ojBeforeRowEdit)=> any; + onOjBeforeRowEditEnd: (event: oj.ojTable.ojBeforeRowEditEnd)=> any; + onOjSort: (event: oj.ojTable.ojSort)=> any; + + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): {subId: 'oj-table-cell', rowIndex: number, columnIndex: number, key:string} | {subId: 'oj-table-footer'|'oj-table-header',index: number}; + getDataForVisibleRow(rowIndex: number) : {data: D, index: number, key: K} | null + refresh(): void; + refreshRow(rowIdx: number): Promise; + } + namespace ojTable { + class ojAnimateEnd extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, [propName: string]: any}> { + + } + + class ojAnimateStart extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, endCallback: (()=> void), [propName: string]: any}> { + + } + + class ojBeforeCurrentRow extends CustomEvent<{currentRow: oj.ojTable.CurrentRow, previousCurrentRow: oj.ojTable.CurrentRow, [propName: string]: any}> { + + } + + class ojBeforeRowEdit extends CustomEvent<{rowContext: object, [propName: string]: any}> { + + } + + class ojBeforeRowEditEnd extends CustomEvent<{rowContext: object, cancelEdit: object, [propName: string]: any}> { + + } + + class ojSort extends CustomEvent<{header: Element, direction: 'ascending'|'descending', [propName: string]: any}> { + + } + } + interface ojTableEventMap extends oj.baseComponentEventMap { + 'ojAnimateEnd': oj.ojTable.ojAnimateEnd; + 'ojAnimateStart': oj.ojTable.ojAnimateStart; + 'ojBeforeCurrentRow': oj.ojTable.ojBeforeCurrentRow; + 'ojBeforeRowEdit': oj.ojTable.ojBeforeRowEdit; + 'ojBeforeRowEditEnd': oj.ojTable.ojBeforeRowEditEnd; + 'ojSort': oj.ojTable.ojSort; + 'accessibilityChanged': CustomEvent; + 'asChanged': CustomEvent; + 'columnsChanged': CustomEvent; + 'columnsDefaultChanged': CustomEvent; + 'currentRowChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayChanged': CustomEvent; + 'dndChanged': CustomEvent; + 'editModeChanged': CustomEvent; + 'firstSelectedRowChanged': CustomEvent; + 'horizontalGridVisibleChanged': CustomEvent; + 'rowRendererChanged': CustomEvent; + 'scrollPolicyChanged': CustomEvent; + 'scrollPolicyOptionsChanged': CustomEvent; + 'scrollPositionChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRequiredChanged': CustomEvent; + 'verticalGridVisibleChanged': CustomEvent; + } + interface ojTableSettableProperties extends baseComponentSettableProperties { + accessibility: {rowHeader: string}; + as: string; + columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; + columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; + currentRow: oj.ojTable.CurrentRow | null; + data: oj.DataProvider|null; + display: 'list'|'grid'; + dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; + editMode: 'none'|'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto'|'enabled'|'disabled'; + rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto'|'loadMoreOnScroll'; + scrollPolicyOptions: {fetchSize: number, maxCount: number}; + scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; + selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; + selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; + selectionRequired: boolean; + verticalGridVisible: 'auto'|'enabled'|'disabled'; + translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; + } + namespace ojTable { + type ColumnSelectionEnd = {endIndex:{column:number},endKey?:{column:K}}|{endIndex?:{column:number}, endKey:{column:K}}; + } + namespace ojTable { + type ColumnSelectionStart = {startIndex:{column:number}, startKey?:{column:K}}|{startIndex?:{column:number}, startKey:{column:K}}; + } + namespace ojTable { + type ColumnsRendererContext = + { + cellContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus}, columnIndex: number, componentElement: Element, data: D, parentElement: Element, row: {[name: string]: any} + } + } + namespace ojTable { + type ContextStatus = + { + rowIndex: number, rowKey: K, currentRow: oj.ojTable.CurrentRow + } + } + namespace ojTable { + type CurrentRow = {rowIndex: number, rowKey?: K}|{rowIndex?: number, rowKey: K}; + } + namespace ojTable { + type DragRowContext = + { + rows: Array<{data: D, index: number, key: K}> + } + } + namespace ojTable { + type DropColumnContext = + { + columnIndex: number + } + } + namespace ojTable { + type DropRowContext = + { + rowIndex: number + } + } + namespace ojTable { + type FooterRendererContext = + { + columnIndex: number, componentElement: Element, footerContext: {datasource: oj.DataProvider|null}, parentElement: Element + } + } + namespace ojTable { + type HeaderRendererContext = + { + columnIndex: number, columnHeaderDefaultRenderer: ((param0: object, param1: ((param0: object)=>void))=> void), columnHeaderSortableIconRenderer: ((param0: object, param1: ((param0: Object)=>void))=> void), componentElement: Element, data: string, headerContext: {datasource: oj.DataProvider|null}, parentElement: Element + } + } + namespace ojTable { + type RowRendererContext = + { + componentElement: Element, data: {[name: string]: any}, parentElement: Element, rowContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus} + } + } + namespace ojTable { + type RowSelectionEnd = {endIndex: {row: number}, endKey?: {row: K}}|{endIndex?:{row: number}, endKey:{row: K}}; + } + namespace ojTable { + type RowSelectionStart = {startIndex: {row: number}, startKey?:{row: K}}|{startIndex?: {row: number}, startKey:{row: K}}; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts new file mode 100644 index 0000000000..9400b980f7 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts @@ -0,0 +1,139 @@ +/// +/// +declare namespace oj { + class ojTagCloud extends dvtBaseComponent> { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + data: oj.DataProvider|null; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + layout: 'cloud'|'rectangular'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; + tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTagCloud.NodeContext|null; + getItem(index: number): oj.ojTagCloud.ItemContext|null; + getItemCount(): number; + } + interface ojTagCloudEventMap extends oj.dvtBaseComponentEventMap { + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'asChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + as: string; + data: oj.DataProvider|null; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + layout: 'cloud'|'rectangular'; + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; + tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojTagCloud { + type ItemContext = + { + color: string, label: string, selected: boolean, tooltip: string, value: number + } + } + namespace ojTagCloud { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojTagCloud { + type TooltipContext = + { + color: string, componentElement: Element, id: K, label: string, parentElement: Element, value: number + } + } + +} +declare namespace oj { + class ojTagCloudItem extends JetElement { + categories: Array; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number|null; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onUrlChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTagCloudItemEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'urlChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojTagCloudItemSettableProperties extends JetSettableProperties { + categories: Array; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts new file mode 100644 index 0000000000..81c012ce6d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts @@ -0,0 +1,376 @@ +/// +/// +declare namespace oj { + class ojThematicMap extends dvtBaseComponent> { + animationDuration: number; + animationOnDisplay: 'auto'|'none'; + areaData: oj.DataProvider|null; + as: string; + focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + initialZooming: 'auto'|'none'; + isolatedItem: K1; + labelDisplay: 'on'|'off'|'auto'; + labelType: 'long'|'short'; + linkData: oj.DataProvider|null; + mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; + markerData: oj.DataProvider|null; + markerZoomBehavior: 'zoom'|'fixed'; + maxZoom: number; + panning: 'auto'|'none'; + renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; + tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; + touchResponse: 'touchStart'|'auto'; + zooming: 'auto'|'none'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAreaDataChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onFocusRendererChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverRendererChanged: (event: CustomEvent)=> any; + onInitialZoomingChanged: (event: CustomEvent)=> any; + onIsolatedItemChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelTypeChanged: (event: CustomEvent)=> any; + onLinkDataChanged: (event: CustomEvent)=> any; + onMapProviderChanged: (event: CustomEvent)=> any; + onMarkerDataChanged: (event: CustomEvent)=> any; + onMarkerZoomBehaviorChanged: (event: CustomEvent)=> any; + onMaxZoomChanged: (event: CustomEvent)=> any; + onPanningChanged: (event: CustomEvent)=> any; + onRendererChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSelectionRendererChanged: (event: CustomEvent)=> any; + onStyleDefaultsChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTooltipDisplayChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onZoomingChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getArea(index: number): oj.ojThematicMap.DataContext|null; + getContextByNode(node: Element): oj.ojThematicMap.NodeContext|null; + getLink(index: number): oj.ojThematicMap.DataContext|null; + getMarker(index: number): oj.ojThematicMap.DataContext|null; + } + interface ojThematicMapEventMap extends oj.dvtBaseComponentEventMap { + 'animationDurationChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'areaDataChanged': CustomEvent; + 'asChanged': CustomEvent; + 'focusRendererChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverRendererChanged': CustomEvent; + 'initialZoomingChanged': CustomEvent; + 'isolatedItemChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelTypeChanged': CustomEvent; + 'linkDataChanged': CustomEvent; + 'mapProviderChanged': CustomEvent; + 'markerDataChanged': CustomEvent; + 'markerZoomBehaviorChanged': CustomEvent; + 'maxZoomChanged': CustomEvent; + 'panningChanged': CustomEvent; + 'rendererChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'selectionRendererChanged': CustomEvent; + 'styleDefaultsChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'tooltipDisplayChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + 'zoomingChanged': CustomEvent; + } + interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDisplay: 'auto'|'none'; + areaData: oj.DataProvider|null; + as: string; + focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + initialZooming: 'auto'|'none'; + isolatedItem: K1; + labelDisplay: 'on'|'off'|'auto'; + labelType: 'long'|'short'; + linkData: oj.DataProvider|null; + mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; + markerData: oj.DataProvider|null; + markerZoomBehavior: 'zoom'|'fixed'; + maxZoom: number; + panning: 'auto'|'none'; + renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + selection: Array; + selectionMode: 'single'|'multiple'|'none'; + selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); + styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; + tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; + touchResponse: 'touchStart'|'auto'; + zooming: 'auto'|'none'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojThematicMap { + type DataContext = + { + color: string, label: string, selected: boolean, tooltip: string + } + } + namespace ojThematicMap { + type NodeContext = + { + subId: string, index: number + } + } + namespace ojThematicMap { + type RendererContext = + { + color: string, componentElement: Element, data: object, id: K1|K2|K3, itemData: D1|D2|D3, label: string, location: string|null, parentElement: Element, previousState: {hovered: boolean, selected: boolean, focused: boolean}, renderDefaultFocus: (()=> void), renderDefaultHover: (()=> void), renderDefaultSelection: (()=> void), root: Element|null, state: {hovered: boolean, selected: boolean, focused: boolean}, x: number|null, y: number|null + } + } + namespace ojThematicMap { + type TooltipContext = + { + color: string|null, componentElement: Element, data: object|null, id: K1|K2|K3, itemData: D1|D2|D3, label: string|null, location: string|null, locationName: string|null, parentElement: Element, tooltip: string, x: number, y: number + } + } + +} +declare namespace oj { + class ojThematicMapArea extends JetElement { + categories: Array; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto'|'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLocationChanged: (event: CustomEvent)=> any; + onOpacityChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapAreaEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'locationChanged': CustomEvent; + 'opacityChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + } + interface ojThematicMapAreaSettableProperties extends JetSettableProperties { + categories: Array; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto'|'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + } + +} +declare namespace oj { + class ojThematicMapLink extends JetElement { + categories: Array; + color: string; + endLocation: {id?: any, location?: string, x?: number, y?: number}; + selectable: 'auto'|'off'; + shortDesc: string; + startLocation: {id?: any, location?: string, x?: number, y?: number}; + svgClassName: string; + svgStyle: object; + width: number; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onEndLocationChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onStartLocationChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onWidthChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapLinkEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'endLocationChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'startLocationChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'widthChanged': CustomEvent; + } + interface ojThematicMapLinkSettableProperties extends JetSettableProperties { + categories: Array; + color: string; + endLocation: {id?: any, location?: string, x?: number, y?: number}; + selectable: 'auto'|'off'; + shortDesc: string; + startLocation: {id?: any, location?: string, x?: number, y?: number}; + svgClassName: string; + svgStyle: object; + width: number; + } + +} +declare namespace oj { + class ojThematicMapMarker extends JetElement { + borderColor: string; + borderStyle: 'solid'|'none'; + borderWidth: number; + categories: Array; + color: string; + height: number; + label: string; + labelPosition: 'bottom'|'center'|'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto'|'off'; + shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number|null; + y: number|null; + onBorderColorChanged: (event: CustomEvent)=> any; + onBorderStyleChanged: (event: CustomEvent)=> any; + onBorderWidthChanged: (event: CustomEvent)=> any; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onHeightChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelPositionChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLocationChanged: (event: CustomEvent)=> any; + onOpacityChanged: (event: CustomEvent)=> any; + onRotationChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShapeChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSourceChanged: (event: CustomEvent)=> any; + onSourceHoverChanged: (event: CustomEvent)=> any; + onSourceHoverSelectedChanged: (event: CustomEvent)=> any; + onSourceSelectedChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + onWidthChanged: (event: CustomEvent)=> any; + onXChanged: (event: CustomEvent)=> any; + onYChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojThematicMapMarkerEventMap extends oj.JetElementEventMap { + 'borderColorChanged': CustomEvent; + 'borderStyleChanged': CustomEvent; + 'borderWidthChanged': CustomEvent; + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'heightChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelPositionChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'locationChanged': CustomEvent; + 'opacityChanged': CustomEvent; + 'rotationChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shapeChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'sourceChanged': CustomEvent; + 'sourceHoverChanged': CustomEvent; + 'sourceHoverSelectedChanged': CustomEvent; + 'sourceSelectedChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + 'widthChanged': CustomEvent; + 'xChanged': CustomEvent; + 'yChanged': CustomEvent; + } + interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { + borderColor: string; + borderStyle: 'solid'|'none'; + borderWidth: number; + categories: Array; + color: string; + height: number; + label: string; + labelPosition: 'bottom'|'center'|'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto'|'off'; + shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number|null; + y: number|null; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts new file mode 100644 index 0000000000..ba23106a05 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts @@ -0,0 +1,15 @@ +/// +/// +declare namespace oj { + abstract class dvtTimeComponent extends dvtBaseComponent { + + addEventListener(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface dvtTimeComponentEventMap extends oj.dvtBaseComponentEventMap { + } + interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts new file mode 100644 index 0000000000..1710eb655d --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts @@ -0,0 +1,40 @@ +/// +/// +/// +declare namespace oj { + class ojTimeAxis extends dvtBaseComponent { + converter: oj.ojTimeAxis.Converter|oj.Converter; + end: string; + scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; + start: string; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + onConverterChanged: (event: CustomEvent)=> any; + onEndChanged: (event: CustomEvent)=> any; + onScaleChanged: (event: CustomEvent)=> any; + onStartChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTimeAxisEventMap extends oj.dvtBaseComponentEventMap { + 'converterChanged': CustomEvent; + 'endChanged': CustomEvent; + 'scaleChanged': CustomEvent; + 'startChanged': CustomEvent; + } + interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { + converter: oj.ojTimeAxis.Converter|oj.Converter; + end: string; + scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; + start: string; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; + } + namespace ojTimeAxis { + type Converter = + { + default?: oj.Converter, seconds?: oj.Converter, minutes?: oj.Converter, hours?: oj.Converter, days?: oj.Converter, weeks?: oj.Converter, months?: oj.Converter, quarters?: oj.Converter, years?: oj.Converter + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts new file mode 100644 index 0000000000..9252a83ed8 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts @@ -0,0 +1,8 @@ +declare namespace oj { + class TimeUtils { + static getDate(pos: number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + static getLength(startTime: Date|string|number, endTime: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + static getPosition(time: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts new file mode 100644 index 0000000000..a8eec009ec --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts @@ -0,0 +1,19 @@ +/// +declare namespace oj { + class ojToolbar extends baseComponent { + chroming: 'full'|'half'|'outlined'; + onChromingChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + refresh(): void; + } + interface ojToolbarEventMap extends oj.baseComponentEventMap { + 'chromingChanged': CustomEvent; + } + interface ojToolbarSettableProperties extends baseComponentSettableProperties { + chroming: 'full'|'half'|'outlined'; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts new file mode 100644 index 0000000000..db6720b353 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts @@ -0,0 +1,58 @@ +/// +declare namespace oj { + class ojTrain extends baseComponent { + selectedStep: string; + steps: Array; + onSelectedStepChanged: (event: CustomEvent)=> any; + onStepsChanged: (event: CustomEvent)=> any; + onOjBeforeDeselect: (event: oj.ojTrain.ojBeforeDeselect)=> any; + onOjBeforeSelect: (event: oj.ojTrain.ojBeforeSelect)=> any; + onOjDeselect: (event: oj.ojTrain.ojDeselect)=> any; + onOjSelect: (event: oj.ojTrain.ojSelect)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getNextSelectableStep(): string|null; + getPreviousSelectableStep(): string|null; + getStep(id: string): oj.ojTrain.Step|null; + refresh(): void; + updateStep(id: string, stepProperties: {id?: string, label?: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning'}): void; + } + namespace ojTrain { + class ojBeforeDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojBeforeSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + + class ojSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { + + } + } + interface ojTrainEventMap extends oj.baseComponentEventMap { + 'ojBeforeDeselect': oj.ojTrain.ojBeforeDeselect; + 'ojBeforeSelect': oj.ojTrain.ojBeforeSelect; + 'ojDeselect': oj.ojTrain.ojDeselect; + 'ojSelect': oj.ojTrain.ojSelect; + 'selectedStepChanged': CustomEvent; + 'stepsChanged': CustomEvent; + } + interface ojTrainSettableProperties extends baseComponentSettableProperties { + selectedStep: string; + steps: Array; + } + namespace ojTrain { + type Step = + { + id: string, label: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning' + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts new file mode 100644 index 0000000000..333e0208ec --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts @@ -0,0 +1,7 @@ +/// +declare namespace oj { + interface TreeDataProvider extends DataProvider { + getChildDataProvider(any): TreeDataProvider + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts new file mode 100644 index 0000000000..96a1db2873 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts @@ -0,0 +1,241 @@ +/// +/// +declare namespace oj { + class ojTreemap extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + groupGaps: 'all'|'none'|'outer'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; + nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; + nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; + nodeSeparators: 'bevels'|'gaps'; + rootNode: any; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; + onAnimationDurationChanged: (event: CustomEvent)=> any; + onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; + onAnimationOnDisplayChanged: (event: CustomEvent)=> any; + onAnimationUpdateColorChanged: (event: CustomEvent)=> any; + onAsChanged: (event: CustomEvent)=> any; + onColorLabelChanged: (event: CustomEvent)=> any; + onDataChanged: (event: CustomEvent)=> any; + onDisplayLevelsChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupGapsChanged: (event: CustomEvent)=> any; + onHiddenCategoriesChanged: (event: CustomEvent)=> any; + onHighlightMatchChanged: (event: CustomEvent)=> any; + onHighlightedCategoriesChanged: (event: CustomEvent)=> any; + onHoverBehaviorChanged: (event: CustomEvent)=> any; + onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; + onIsolatedNodeChanged: (event: CustomEvent)=> any; + onLayoutChanged: (event: CustomEvent)=> any; + onNodeContentChanged: (event: CustomEvent)=> any; + onNodeDefaultsChanged: (event: CustomEvent)=> any; + onNodeSeparatorsChanged: (event: CustomEvent)=> any; + onRootNodeChanged: (event: CustomEvent)=> any; + onSelectionChanged: (event: CustomEvent)=> any; + onSelectionModeChanged: (event: CustomEvent)=> any; + onSizeLabelChanged: (event: CustomEvent)=> any; + onSortingChanged: (event: CustomEvent)=> any; + onTooltipChanged: (event: CustomEvent)=> any; + onTouchResponseChanged: (event: CustomEvent)=> any; + onOjBeforeDrill: (event: oj.ojTreemap.ojBeforeDrill)=> any; + onOjDrill: (event: oj.ojTreemap.ojDrill)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + getContextByNode(node: Element): oj.ojTreemap.NodeContext|null; + getNode(subIdPath: Array): oj.ojTreemap.DataContext|null; + } + namespace ojTreemap { + class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + + class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { + + } + } + interface ojTreemapEventMap extends oj.dvtBaseComponentEventMap { + 'ojBeforeDrill': oj.ojTreemap.ojBeforeDrill; + 'ojDrill': oj.ojTreemap.ojDrill; + 'animationDurationChanged': CustomEvent; + 'animationOnDataChangeChanged': CustomEvent; + 'animationOnDisplayChanged': CustomEvent; + 'animationUpdateColorChanged': CustomEvent; + 'asChanged': CustomEvent; + 'colorLabelChanged': CustomEvent; + 'dataChanged': CustomEvent; + 'displayLevelsChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupGapsChanged': CustomEvent; + 'hiddenCategoriesChanged': CustomEvent; + 'highlightMatchChanged': CustomEvent; + 'highlightedCategoriesChanged': CustomEvent; + 'hoverBehaviorChanged': CustomEvent; + 'hoverBehaviorDelayChanged': CustomEvent; + 'isolatedNodeChanged': CustomEvent; + 'layoutChanged': CustomEvent; + 'nodeContentChanged': CustomEvent; + 'nodeDefaultsChanged': CustomEvent; + 'nodeSeparatorsChanged': CustomEvent; + 'rootNodeChanged': CustomEvent; + 'selectionChanged': CustomEvent; + 'selectionModeChanged': CustomEvent; + 'sizeLabelChanged': CustomEvent; + 'sortingChanged': CustomEvent; + 'tooltipChanged': CustomEvent; + 'touchResponseChanged': CustomEvent; + } + interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto'|'none'; + animationOnDisplay: 'auto'|'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: oj.DataProvider|null; + displayLevels: number; + drilling: 'on'|'off'; + groupGaps: 'all'|'none'|'outer'; + hiddenCategories: Array; + highlightMatch: 'any'|'all'; + highlightedCategories: Array; + hoverBehavior: 'dim'|'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; + nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; + nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; + nodeSeparators: 'bevels'|'gaps'; + rootNode: any; + selection: Array; + selectionMode: 'none'|'single'|'multiple'; + sizeLabel: string; + sorting: 'on'|'off'; + tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; + touchResponse: 'touchStart'|'auto'; + translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; + } + namespace ojTreemap { + type DataContext = + { + color: string, label: string, selected: boolean, size: number, tooltip: string + } + } + namespace ojTreemap { + type NodeContentContext = + { + bounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element + } + } + namespace ojTreemap { + type NodeContext = + { + subId: string, indexPath: Array + } + } + namespace ojTreemap { + type TooltipContext = + { + parentElement: Element, id: K, label: string, value: number, color: string, data: object, itemData: D, componentElement: Element + } + } + +} +declare namespace oj { + class ojTreemapNode extends JetElement { + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupLabelDisplay?: 'node'|'off'|'header'; + header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; + label?: string; + labelDisplay?: 'off'|'node'; + labelHalign?: 'start'|'end'|'center'; + labelStyle?: object; + labelValign?: 'top'|'bottom'|'center'; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + selectable?: 'off'|'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + onCategoriesChanged: (event: CustomEvent)=> any; + onColorChanged: (event: CustomEvent)=> any; + onDrillingChanged: (event: CustomEvent)=> any; + onGroupLabelDisplayChanged: (event: CustomEvent)=> any; + onHeaderChanged: (event: CustomEvent)=> any; + onLabelChanged: (event: CustomEvent)=> any; + onLabelDisplayChanged: (event: CustomEvent)=> any; + onLabelHalignChanged: (event: CustomEvent)=> any; + onLabelStyleChanged: (event: CustomEvent)=> any; + onLabelValignChanged: (event: CustomEvent)=> any; + onPatternChanged: (event: CustomEvent)=> any; + onSelectableChanged: (event: CustomEvent)=> any; + onShortDescChanged: (event: CustomEvent)=> any; + onSvgClassNameChanged: (event: CustomEvent)=> any; + onSvgStyleChanged: (event: CustomEvent)=> any; + onValueChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + } + interface ojTreemapNodeEventMap extends oj.JetElementEventMap { + 'categoriesChanged': CustomEvent; + 'colorChanged': CustomEvent; + 'drillingChanged': CustomEvent; + 'groupLabelDisplayChanged': CustomEvent; + 'headerChanged': CustomEvent; + 'labelChanged': CustomEvent; + 'labelDisplayChanged': CustomEvent; + 'labelHalignChanged': CustomEvent; + 'labelStyleChanged': CustomEvent; + 'labelValignChanged': CustomEvent; + 'patternChanged': CustomEvent; + 'selectableChanged': CustomEvent; + 'shortDescChanged': CustomEvent; + 'svgClassNameChanged': CustomEvent; + 'svgStyleChanged': CustomEvent; + 'valueChanged': CustomEvent; + } + interface ojTreemapNodeSettableProperties extends JetSettableProperties { + categories?: Array; + color?: string; + drilling?: 'on'|'off'|'inherit'; + groupLabelDisplay?: 'node'|'off'|'header'; + header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; + label?: string; + labelDisplay?: 'off'|'node'; + labelHalign?: 'start'|'end'|'center'; + labelStyle?: object; + labelValign?: 'top'|'bottom'|'center'; + pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; + selectable?: 'off'|'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts new file mode 100644 index 0000000000..01a6280ff9 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts @@ -0,0 +1,188 @@ +/// +/// +declare namespace oj { + interface AsyncValidator { + hint: Promise; + validate(value: V): Promise + } + +} +declare namespace oj { + class ColorConverter extends Converter { + constructor(options?: oj.ColorConverter.ConverterOptions); + format(color: oj.Color): string|null; + getHint(): string; + parse(value: string): oj.Color; + resolvedOptions(): oj.ColorConverter.ConverterOptions; + } + namespace ColorConverter { + type ConverterOptions = + { + format?: 'rgb'|'hsl'|'hsv'|'hex'|'hex3' + } + } + +} +declare namespace oj { + class ColorConverterFactory { + createConverter(options?: oj.ColorConverter.ConverterOptions): oj.ColorConverter; + } + +} +declare namespace oj { + class Converter { + format(value: V): string|null; + getHint?(): string|null + getOptions?(): object + parse(value: string): V; + resolvedOptions?(): object + } + +} +declare namespace oj { + class ConverterError { + constructor(summary: string, detail: string); + getMessage(): oj.Message; + } + +} +declare namespace oj { + class ConverterFactory { + static CONVERTER_TYPE_COLOR: string; + static CONVERTER_TYPE_DATETIME: string; + static CONVERTER_TYPE_NUMBER: string; + createConverter(options: object|null): oj.Converter; + } + +} +declare namespace oj { + class IntlConverterUtils { + static dateToLocalIso(date: Date): string; + static getConverterInstance(converterOption: string|oj.Validation.RegisteredConverter|oj.Converter): oj.Converter|null + static getInitials(firstName?: string, lastName?: string): string|undefined; + static getLocalTimeZoneOffset(): string; + static isoToDate(isoString: string): Date; + static isoToLocalDate(isoString: string): Date; + } + +} +declare namespace oj { + class LengthValidator extends Validator { + static defaults: {countBy: string}; + constructor(options?: oj.LengthValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace LengthValidator { + type ValidatorOptions = + { + countBy?: 'codeUnit'|'codePoint', min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {tooLong?: string, tooShort?: string}, messageSummary?: {tooLong?: string, tooShort?: string} + } + } + +} +declare namespace oj { + class LengthValidatorFactory { + createValidator(options?: oj.LengthValidator.ValidatorOptions): oj.LengthValidator; + } + +} +declare namespace oj { + class LocaleData { + static getDayNames(type?: 'abbreviated'|'narrow'|'wide'): Array; + static getFirstDayOfWeek(): number; + static getMonthNames(type?: 'abbreviated'|'narrow'|'wide'): Array; + static getWeekendEnd(): number; + static getWeekendStart(): number; + static isMonthPriorToYear(): boolean; + static setBundle(bundle: object): void; + } + +} +declare namespace oj { + class RegExpValidator extends Validator { + constructor(options?: oj.RegExpValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace RegExpValidator { + type ValidatorOptions = + { + pattern?: string, hint?: string, messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class RegExpValidatorFactory { + createValidator(options: oj.RegExpValidator.ValidatorOptions): oj.RegExpValidator; + } + +} +declare namespace oj { + class RequiredValidator extends Validator { + constructor(options?: oj.RequiredValidator.ValidatorOptions); + getHint(): string|null; + validate(value: object|string|number): void; + } + namespace RequiredValidator { + type ValidatorOptions = + { + hint?: string, messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class RequiredValidatorFactory { + createValidator(options?: oj.RequiredValidator.ValidatorOptions): oj.RequiredValidator; + } + +} +declare namespace oj { + class Validation { + static converterFactory>(type:'number'|'color'|'datetime'|string, instance?:CF): CF|null + static getDefaultConverterFactory(type: 'number'|'color'|'datetime'): oj.ConverterFactory|null + static getDefaultValidatorFactory(type: 'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'): oj.ValidatorFactory|null + static validatorFactory>(type:'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'|string, instance?:VF): VF|null + } + namespace Validation { + type RegisteredConverter = + { + type: string, options?: object + } + } + namespace Validation { + type RegisteredValidator = + { + type: string, options?: object + } + } + +} +declare namespace oj { + class Validator { + getHint?(): string|null + validate(value: V): void; + } + +} +declare namespace oj { + class ValidatorError { + constructor(summary: string, detail: string); + getMessage(): oj.Message; + } + +} +declare namespace oj { + class ValidatorFactory { + static VALIDATOR_TYPE_DATERESTRICTION: string; + static VALIDATOR_TYPE_DATETIMERANGE: string; + static VALIDATOR_TYPE_LENGTH: string; + static VALIDATOR_TYPE_NUMBERRANGE: string; + static VALIDATOR_TYPE_REGEXP: string; + static VALIDATOR_TYPE_REQUIRED: string; + createValidator(options: object|null): oj.Validator; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts new file mode 100644 index 0000000000..f4ab6b312b --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts @@ -0,0 +1,108 @@ +/// +declare namespace oj { + class DateRestrictionValidator extends Validator { + constructor(options?: oj.DateRestrictionValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string): void; + } + namespace DateRestrictionValidator { + type DayFormatterInput = + { + fullYear: number, month: number, date: number + } + } + namespace DateRestrictionValidator { + type DayFormatterOutput = + { + disabled?: boolean, className?: string, tooltip?: string + } + } + namespace DateRestrictionValidator { + type ValidatorOptions = + { + dayFormatter?: ((param0: oj.DateRestrictionValidator.DayFormatterInput)=> oj.DateRestrictionValidator.DayFormatterOutput|null|'all'), messageSummary?: string, messageDetail?: string + } + } + +} +declare namespace oj { + class DateRestrictionValidatorFactory { + createValidator(options?: oj.DateRestrictionValidator.ValidatorOptions): oj.DateRestrictionValidator; + } + +} +declare namespace oj { + abstract class DateTimeConverter extends Converter { + abstract calculateWeek(value: string): number|undefined; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string|null; + getAvailableTimeZones(): Array; + abstract isDayNameSet():boolean + abstract isDaySet():boolean + abstract isHourInAMPMSet():boolean + abstract isHourInDaySet():boolean + abstract isMilliSecondSet():boolean + abstract isMinuteSet():boolean + abstract isMonthSet():boolean + abstract isSecondSet():boolean + abstract isYearSet():boolean + parse(value: string): string; + } + +} +declare namespace oj { + class DateTimeConverterFactory { + createConverter(options?: oj.IntlDateTimeConverter.ConverterOptions): oj.IntlDateTimeConverter; + } + +} +declare namespace oj { + class DateTimeRangeValidator extends Validator { + constructor(options?: oj.DateTimeRangeValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string): void; + } + namespace DateTimeRangeValidator { + type ValidatorOptions = + { + converter: oj.DateTimeConverter, min?: string, max?: string, hint?: {max?: string, min?: string, inRange?: string}, translationKey?: string, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} + } + } + +} +declare namespace oj { + class DateTimeRangeValidatorFactory { + createValidator(options?: oj.DateTimeRangeValidator.ValidatorOptions): oj.DateTimeRangeValidator; + } + +} +declare namespace oj { + class IntlDateTimeConverter extends DateTimeConverter { + constructor(options?: oj.IntlDateTimeConverter.ConverterOptions); + calculateWeek(value: string): number; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string|null; + formatRelative(value: string, relativeOptions?: {formatUsing?: string, dateField?: string, relativeTime?: string, dateOnly?: boolean, timeZone?: string}): string|null; + getAvailableTimeZones(): Array; + getHint(): null; + getOptions(): oj.IntlDateTimeConverter.ConverterOptions; + isDayNameSet(): boolean; + isDaySet(): boolean; + isHourInAMPMSet(): boolean; + isHourInDaySet(): boolean; + isMilliSecondSet(): boolean; + isMinuteSet(): boolean; + isMonthSet(): boolean; + isSecondSet(): boolean; + isYearSet(): boolean; + parse(value: string): string|null; + resolvedOptions(): oj.IntlDateTimeConverter.ConverterOptions; + } + namespace IntlDateTimeConverter { + type ConverterOptions = + { + year?: '2-digit'|'numeric', 'two-digit-year-start'?: number, month?: '2-digit'|'numeric'|'narrow'|'short'|'long', day?: '2-digit'|'numeric', hour?: '2-digit'|'numeric', minute?: '2-digit'|'numeric', second?: '2-digit'|'numeric', millisecond?: 'numeric', weekday?: 'narrow'|'short'|'long', era?: 'narrow'|'short'|'long', timeZoneName?: 'short'|'long', timeZone?: string, isoStrFormat?: 'offset'|'zulu'|'local'|'auto', dst?: boolean, hour12?: boolean, pattern?: string, formatType?: 'date'|'time'|'datetime', dateFormat?: 'short'|'medium'|'long'|'full', timeFormat?: 'short'|'medium'|'long'|'full', lenientParse?: 'full'|'none' + } + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts new file mode 100644 index 0000000000..d53b2b8258 --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts @@ -0,0 +1,51 @@ +/// +declare namespace oj { + class IntlNumberConverter extends NumberConverter { + constructor(options?: oj.IntlNumberConverter.ConverterOptions); + format(value: number): string; + getHint(): null; + getOptions(): oj.IntlNumberConverter.ConverterOptions; + parse(value: string): number|null; + resolvedOptions(): oj.IntlNumberConverter.ConverterOptions; + } + namespace IntlNumberConverter { + type ConverterOptions = + { + style?: 'decimal'|'currency'|'percent'|'unit', currency?: string, unit?: 'byte'|'bit', currencyDisplay?: 'code'|'symbol'|'name', decimalFormat?: 'standard'|'short'|'long', currencyFormat?: 'standard'|'short'|'long', minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean, pattern?: string, roundingMode?: 'HALF_UP'|'HALF_DOWN'|'HALF_EVEN', roundDuringParse?: boolean, separators?: object, lenientParse?: 'full'|'none' + } + } + +} +declare namespace oj { + class NumberConverter extends Converter { + format(value: number): string|null; + parse(value: string): number; + } + +} +declare namespace oj { + class NumberConverterFactory { + createConverter(options?: oj.IntlNumberConverter.ConverterOptions): oj.IntlNumberConverter; + } + +} +declare namespace oj { + class NumberRangeValidator extends Validator { + constructor(options?: oj.NumberRangeValidator.ValidatorOptions); + getHint(): string|null; + validate(value: string|number): void; + } + namespace NumberRangeValidator { + type ValidatorOptions = + { + converter?: oj.NumberConverter, min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string, exact?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} + } + } + +} +declare namespace oj { + class NumberRangeValidatorFactory { + createValidator(options?: oj.NumberRangeValidator.ValidatorOptions): oj.NumberRangeValidator; + } + +} diff --git a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts new file mode 100644 index 0000000000..c714ed9ecc --- /dev/null +++ b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts @@ -0,0 +1,22 @@ +declare namespace oj { + class ojValidationGroup extends JetElement { + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + onValidChanged: (event: CustomEvent)=> any; + + addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + + focusOn(key?: '@firstInvalidShown'): void; + getProperty(property: string): any; + setProperties(properties: object): void; + setProperty(property: string, value: any): void; + showMessages(): void; + } + interface ojValidationGroupEventMap extends oj.JetElementEventMap { + 'validChanged': CustomEvent; + } + interface ojValidationGroupSettableProperties extends JetSettableProperties { + readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; + } + +} diff --git a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts new file mode 100644 index 0000000000..9fc8ff4951 --- /dev/null +++ b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. + * The Universal Permissive License (UPL), Version 1.0 + */ +import "ojs/ojcore"; +import "ojs/ojinputtext"; +import "ojs/ojinputnumber"; + +/** + * @public + * @export + */ +class Test { + value: string; + + constructor() { + let self = this; + self.value = "Good Morning"; + + let textInput = document.getElementById('text-input') as oj.ojInputText; + //test a custom API of the component + let rawVal: string = textInput.rawValue; + } +} + +export = Test; \ No newline at end of file diff --git a/types/@oracle/tsconfig.json b/types/@oracle/tsconfig.json new file mode 100644 index 0000000000..812f56815d --- /dev/null +++ b/types/@oracle/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "module": "amd", + "lib": ["dom","es5","scripthost", "es2015.core","es2015.collection","es2015","esnext.asynciterable"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "types": ["knockout"], + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "target": "es5", + "typeRoots": ["../","./oraclejet/","./oraclejet/ojs/"] + }, + "include": [ + "/tests/oraclejet/@oraclejet-tests.ts", + "./oraclejet/**/*" + ] +} \ No newline at end of file diff --git a/types/@oracle/tslint.json b/types/@oracle/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/@oracle/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6814f8fa911ee85bd2170d6603129a1292fb5571 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 18:36:48 -0700 Subject: [PATCH 0013/2268] Update to latest version --- types/@oracle/index.d.ts | 0 types/@oracle/oraclejet/index.d.ts | 0 types/@oracle/oraclejet/ojs/index.d.ts | 23 - .../oraclejet/ojs/ojaccordion/index.d.ts | 49 - .../oraclejet/ojs/ojanimation/index.d.ts | 19 - .../ojs/ojarraydataprovider/index.d.ts | 22 - .../ojs/ojarraytreedataprovider/index.d.ts | 18 - .../@oracle/oraclejet/ojs/ojavatar/index.d.ts | 28 - .../@oracle/oraclejet/ojs/ojbutton/index.d.ts | 144 -- .../@oracle/oraclejet/ojs/ojchart/index.d.ts | 822 ------- .../oraclejet/ojs/ojcheckboxset/index.d.ts | 47 - .../oraclejet/ojs/ojcollapsible/index.d.ts | 52 - .../ojs/ojcollectiondataprovider/index.d.ts | 17 - .../@oracle/oraclejet/ojs/ojcolor/index.d.ts | 179 -- .../oraclejet/ojs/ojcolorpalette/index.d.ts | 56 - .../oraclejet/ojs/ojcolorspectrum/index.d.ts | 44 - .../oraclejet/ojs/ojcomponentcore/index.d.ts | 31 - .../oraclejet/ojs/ojcomposite/index.d.ts | 31 - .../oraclejet/ojs/ojconveyorbelt/index.d.ts | 23 - types/@oracle/oraclejet/ojs/ojcore/index.d.ts | 123 - .../oraclejet/ojs/ojdataprovider/index.d.ts | 254 -- .../oraclejet/ojs/ojdatetimepicker/index.d.ts | 308 --- .../@oracle/oraclejet/ojs/ojdefer/index.d.ts | 13 - .../ojs/ojdeferreddataprovider/index.d.ts | 17 - .../@oracle/oraclejet/ojs/ojdialog/index.d.ts | 127 - .../oraclejet/ojs/ojdvt-base/index.d.ts | 20 - .../oraclejet/ojs/ojeditablevalue/index.d.ts | 67 - .../oraclejet/ojs/ojfilepicker/index.d.ts | 44 - .../oraclejet/ojs/ojfilmstrip/index.d.ts | 42 - .../oraclejet/ojs/ojformlayout/index.d.ts | 37 - .../@oracle/oraclejet/ojs/ojgantt/index.d.ts | 286 --- .../@oracle/oraclejet/ojs/ojgauge/index.d.ts | 347 --- .../oraclejet/ojs/ojindexer/index.d.ts | 13 - .../oraclejet/ojs/ojinputnumber/index.d.ts | 95 - .../oraclejet/ojs/ojinputtext/index.d.ts | 178 -- .../@oracle/oraclejet/ojs/ojkeyset/index.d.ts | 32 - .../ojs/ojknockout-keyset/index.d.ts | 9 - .../oraclejet/ojs/ojknockout-model/index.d.ts | 7 - .../oraclejet/ojs/ojknockout/index.d.ts | 14 - .../@oracle/oraclejet/ojs/ojlabel/index.d.ts | 33 - .../oraclejet/ojs/ojlabelvalue/index.d.ts | 25 - .../@oracle/oraclejet/ojs/ojlegend/index.d.ts | 230 -- .../ojs/ojlistdataproviderview/index.d.ts | 21 - .../oraclejet/ojs/ojlistview/index.d.ts | 167 -- .../oraclejet/ojs/ojmasonrylayout/index.d.ts | 85 - types/@oracle/oraclejet/ojs/ojmenu/index.d.ts | 87 - .../oraclejet/ojs/ojmenuselectmany/index.d.ts | 36 - .../oraclejet/ojs/ojmessage/index.d.ts | 51 - .../oraclejet/ojs/ojmessages/index.d.ts | 55 - .../oraclejet/ojs/ojmessaging/index.d.ts | 30 - .../@oracle/oraclejet/ojs/ojmodel/index.d.ts | 169 -- .../ojs/ojmodule-element-utils/index.d.ts | 3 - .../oraclejet/ojs/ojmodule-element/index.d.ts | 54 - .../@oracle/oraclejet/ojs/ojmodule/index.d.ts | 24 - .../ojs/ojmoduleanimations/index.d.ts | 30 - .../oraclejet/ojs/ojnavigationlist/index.d.ts | 253 -- types/@oracle/oraclejet/ojs/ojnbox/index.d.ts | 251 -- .../oraclejet/ojs/ojoffcanvas/index.d.ts | 13 - .../oraclejet/ojs/ojoptgroup/index.d.ts | 25 - .../@oracle/oraclejet/ojs/ojoption/index.d.ts | 25 - .../oraclejet/ojs/ojpictochart/index.d.ts | 206 -- .../@oracle/oraclejet/ojs/ojpopup/index.d.ts | 105 - .../oraclejet/ojs/ojprogress/index.d.ts | 28 - .../oraclejet/ojs/ojprogresslist/index.d.ts | 50 - .../oraclejet/ojs/ojpulltorefresh/index.d.ts | 7 - .../oraclejet/ojs/ojradioset/index.d.ts | 47 - .../oraclejet/ojs/ojrefresher/index.d.ts | 30 - .../@oracle/oraclejet/ojs/ojrouter/index.d.ts | 69 - .../oraclejet/ojs/ojselectcombobox/index.d.ts | 427 ---- .../@oracle/oraclejet/ojs/ojslider/index.d.ts | 61 - .../oraclejet/ojs/ojsunburst/index.d.ts | 270 --- .../oraclejet/ojs/ojswipeactions/index.d.ts | 24 - .../oraclejet/ojs/ojswipetoreveal/index.d.ts | 7 - .../@oracle/oraclejet/ojs/ojswitch/index.d.ts | 39 - .../oraclejet/ojs/ojswitcher/index.d.ts | 21 - .../@oracle/oraclejet/ojs/ojtable/index.d.ts | 197 -- .../oraclejet/ojs/ojtagcloud/index.d.ts | 139 -- .../oraclejet/ojs/ojthematicmap/index.d.ts | 376 --- .../oraclejet/ojs/ojtime-base/index.d.ts | 15 - .../oraclejet/ojs/ojtimeaxis/index.d.ts | 40 - .../oraclejet/ojs/ojtimeutils/index.d.ts | 8 - .../oraclejet/ojs/ojtoolbar/index.d.ts | 19 - .../@oracle/oraclejet/ojs/ojtrain/index.d.ts | 58 - .../ojs/ojtreedataprovider/index.d.ts | 7 - .../oraclejet/ojs/ojtreemap/index.d.ts | 241 -- .../ojs/ojvalidation-base/index.d.ts | 188 -- .../ojs/ojvalidation-datetime/index.d.ts | 108 - .../ojs/ojvalidation-number/index.d.ts | 51 - .../ojs/ojvalidationgroup/index.d.ts | 22 - .../tests/oraclejet/@oraclejet-tests.ts | 26 - types/@oracle/tslint.json | 1 - types/oraclejet/index.d.ts | 60 + types/oraclejet/ojaccordion/index.d.ts | 66 + types/oraclejet/ojanimation/index.d.ts | 111 + .../oraclejet/ojarraydataprovider/index.d.ts | 27 + .../ojarraytreedataprovider/index.d.ts | 25 + .../ojattributegrouphandler/index.d.ts | 23 + types/oraclejet/ojavatar/index.d.ts | 29 + types/oraclejet/ojbutton/index.d.ts | 165 ++ types/oraclejet/ojchart/index.d.ts | 2104 +++++++++++++++++ types/oraclejet/ojcheckboxset/index.d.ts | 69 + types/oraclejet/ojcollapsible/index.d.ts | 64 + .../ojcollectiondataprovider/index.d.ts | 16 + types/oraclejet/ojcolor/index.d.ts | 182 ++ types/oraclejet/ojcolorpalette/index.d.ts | 74 + types/oraclejet/ojcolorspectrum/index.d.ts | 62 + types/oraclejet/ojcomponentcore/index.d.ts | 6 + types/oraclejet/ojcomposite/index.d.ts | 45 + types/oraclejet/ojconfig/index.d.ts | 9 + types/oraclejet/ojcontext/index.d.ts | 39 + types/oraclejet/ojconveyorbelt/index.d.ts | 26 + types/oraclejet/ojdatagrid/index.d.ts | 520 ++++ types/oraclejet/ojdataprovider/index.d.ts | 111 + types/oraclejet/ojdatetimepicker/index.d.ts | 639 +++++ types/oraclejet/ojdefer/index.d.ts | 21 + .../ojdeferreddataprovider/index.d.ts | 16 + types/oraclejet/ojdiagram/index.d.ts | 790 +++++++ types/oraclejet/ojdialog/index.d.ts | 148 ++ types/oraclejet/ojdvt-base/index.d.ts | 57 + types/oraclejet/ojeditablevalue/index.d.ts | 96 + types/oraclejet/ojexpressionutils/index.d.ts | 5 + types/oraclejet/ojfilepicker/index.d.ts | 43 + types/oraclejet/ojfilmstrip/index.d.ts | 63 + types/oraclejet/ojformlayout/index.d.ts | 38 + types/oraclejet/ojgantt/index.d.ts | 679 ++++++ types/oraclejet/ojganttutils/index.d.ts | 4 + types/oraclejet/ojgauge/index.d.ts | 574 +++++ types/oraclejet/ojinputnumber/index.d.ts | 150 ++ types/oraclejet/ojinputtext/index.d.ts | 249 ++ types/oraclejet/ojkeyset/index.d.ts | 28 + types/oraclejet/ojknockout-keyset/index.d.ts | 8 + types/oraclejet/ojknockout-model/index.d.ts | 3 + .../ojknockouttemplateutils/index.d.ts | 1 + types/oraclejet/ojlabel/index.d.ts | 48 + types/oraclejet/ojlabelvalue/index.d.ts | 26 + types/oraclejet/ojlegend/index.d.ts | 286 +++ .../ojlistdataproviderview/index.d.ts | 25 + types/oraclejet/ojlistview/index.d.ts | 335 +++ types/oraclejet/ojlocaledata/index.d.ts | 7 + types/oraclejet/ojlogger/index.d.ts | 10 + types/oraclejet/ojmasonrylayout/index.d.ts | 119 + types/oraclejet/ojmenu/index.d.ts | 105 + types/oraclejet/ojmenuselectmany/index.d.ts | 39 + types/oraclejet/ojmessage/index.d.ts | 80 + types/oraclejet/ojmessages/index.d.ts | 73 + types/oraclejet/ojmessaging/index.d.ts | 15 + types/oraclejet/ojmodel/index.d.ts | 280 +++ .../ojmodule-element-utils/index.d.ts | 8 + types/oraclejet/ojmodule-element/index.d.ts | 89 + types/oraclejet/ojmoduleanimations/index.d.ts | 34 + types/oraclejet/ojnavigationlist/index.d.ts | 360 +++ types/oraclejet/ojnbox/index.d.ts | 490 ++++ types/oraclejet/ojoptgroup/index.d.ts | 26 + types/oraclejet/ojoption/index.d.ts | 26 + types/oraclejet/ojpictochart/index.d.ts | 268 +++ types/oraclejet/ojpopup/index.d.ts | 128 + types/oraclejet/ojprogress/index.d.ts | 35 + types/oraclejet/ojprogresslist/index.d.ts | 30 + types/oraclejet/ojpulltorefresh/index.d.ts | 6 + types/oraclejet/ojradioset/index.d.ts | 69 + types/oraclejet/ojrefresher/index.d.ts | 33 + .../ojresponsiveknockoututils/index.d.ts | 4 + types/oraclejet/ojresponsiveutils/index.d.ts | 4 + types/oraclejet/ojrouter/index.d.ts | 131 + types/oraclejet/ojselectcombobox/index.d.ts | 714 ++++++ types/oraclejet/ojslider/index.d.ts | 83 + types/oraclejet/ojsunburst/index.d.ts | 407 ++++ types/oraclejet/ojswipeactions/index.d.ts | 36 + types/oraclejet/ojswipetoreveal/index.d.ts | 4 + types/oraclejet/ojswitch/index.d.ts | 49 + types/oraclejet/ojswitcher/index.d.ts | 22 + types/oraclejet/ojtable/index.d.ts | 595 +++++ types/oraclejet/ojtagcloud/index.d.ts | 208 ++ types/oraclejet/ojthematicmap/index.d.ts | 576 +++++ types/oraclejet/ojthemeutils/index.d.ts | 4 + types/oraclejet/ojtime-base/index.d.ts | 22 + types/oraclejet/ojtimeaxis/index.d.ts | 87 + types/oraclejet/ojtimeutils/index.d.ts | 3 + types/oraclejet/ojtoolbar/index.d.ts | 22 + types/oraclejet/ojtrain/index.d.ts | 78 + types/oraclejet/ojtranslation/index.d.ts | 5 + types/oraclejet/ojtreedataprovider/index.d.ts | 5 + types/oraclejet/ojtreemap/index.d.ts | 392 +++ types/oraclejet/ojvalidation-base/index.d.ts | 144 ++ .../ojvalidation-datetime/index.d.ts | 130 + .../oraclejet/ojvalidation-number/index.d.ts | 67 + types/oraclejet/ojvalidationgroup/index.d.ts | 23 + types/oraclejet/test.ts | 113 + types/{@oracle => oraclejet}/tsconfig.json | 13 +- types/oraclejet/tslint.json | 3 + 190 files changed, 14434 insertions(+), 8197 deletions(-) delete mode 100644 types/@oracle/index.d.ts delete mode 100644 types/@oracle/oraclejet/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojanimation/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojavatar/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojbutton/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojchart/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolor/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojcore/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdefer/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdialog/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojgantt/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojgauge/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojindexer/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojknockout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlabel/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlegend/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojlistview/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmenu/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessage/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessages/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodel/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmodule/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojnbox/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojoption/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpopup/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojprogress/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojradioset/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojrouter/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojslider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswitch/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtable/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtrain/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts delete mode 100644 types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts delete mode 100644 types/@oracle/tests/oraclejet/@oraclejet-tests.ts delete mode 100644 types/@oracle/tslint.json create mode 100644 types/oraclejet/index.d.ts create mode 100644 types/oraclejet/ojaccordion/index.d.ts create mode 100644 types/oraclejet/ojanimation/index.d.ts create mode 100644 types/oraclejet/ojarraydataprovider/index.d.ts create mode 100644 types/oraclejet/ojarraytreedataprovider/index.d.ts create mode 100644 types/oraclejet/ojattributegrouphandler/index.d.ts create mode 100644 types/oraclejet/ojavatar/index.d.ts create mode 100644 types/oraclejet/ojbutton/index.d.ts create mode 100644 types/oraclejet/ojchart/index.d.ts create mode 100644 types/oraclejet/ojcheckboxset/index.d.ts create mode 100644 types/oraclejet/ojcollapsible/index.d.ts create mode 100644 types/oraclejet/ojcollectiondataprovider/index.d.ts create mode 100644 types/oraclejet/ojcolor/index.d.ts create mode 100644 types/oraclejet/ojcolorpalette/index.d.ts create mode 100644 types/oraclejet/ojcolorspectrum/index.d.ts create mode 100644 types/oraclejet/ojcomponentcore/index.d.ts create mode 100644 types/oraclejet/ojcomposite/index.d.ts create mode 100644 types/oraclejet/ojconfig/index.d.ts create mode 100644 types/oraclejet/ojcontext/index.d.ts create mode 100644 types/oraclejet/ojconveyorbelt/index.d.ts create mode 100644 types/oraclejet/ojdatagrid/index.d.ts create mode 100644 types/oraclejet/ojdataprovider/index.d.ts create mode 100644 types/oraclejet/ojdatetimepicker/index.d.ts create mode 100644 types/oraclejet/ojdefer/index.d.ts create mode 100644 types/oraclejet/ojdeferreddataprovider/index.d.ts create mode 100644 types/oraclejet/ojdiagram/index.d.ts create mode 100644 types/oraclejet/ojdialog/index.d.ts create mode 100644 types/oraclejet/ojdvt-base/index.d.ts create mode 100644 types/oraclejet/ojeditablevalue/index.d.ts create mode 100644 types/oraclejet/ojexpressionutils/index.d.ts create mode 100644 types/oraclejet/ojfilepicker/index.d.ts create mode 100644 types/oraclejet/ojfilmstrip/index.d.ts create mode 100644 types/oraclejet/ojformlayout/index.d.ts create mode 100644 types/oraclejet/ojgantt/index.d.ts create mode 100644 types/oraclejet/ojganttutils/index.d.ts create mode 100644 types/oraclejet/ojgauge/index.d.ts create mode 100644 types/oraclejet/ojinputnumber/index.d.ts create mode 100644 types/oraclejet/ojinputtext/index.d.ts create mode 100644 types/oraclejet/ojkeyset/index.d.ts create mode 100644 types/oraclejet/ojknockout-keyset/index.d.ts create mode 100644 types/oraclejet/ojknockout-model/index.d.ts create mode 100644 types/oraclejet/ojknockouttemplateutils/index.d.ts create mode 100644 types/oraclejet/ojlabel/index.d.ts create mode 100644 types/oraclejet/ojlabelvalue/index.d.ts create mode 100644 types/oraclejet/ojlegend/index.d.ts create mode 100644 types/oraclejet/ojlistdataproviderview/index.d.ts create mode 100644 types/oraclejet/ojlistview/index.d.ts create mode 100644 types/oraclejet/ojlocaledata/index.d.ts create mode 100644 types/oraclejet/ojlogger/index.d.ts create mode 100644 types/oraclejet/ojmasonrylayout/index.d.ts create mode 100644 types/oraclejet/ojmenu/index.d.ts create mode 100644 types/oraclejet/ojmenuselectmany/index.d.ts create mode 100644 types/oraclejet/ojmessage/index.d.ts create mode 100644 types/oraclejet/ojmessages/index.d.ts create mode 100644 types/oraclejet/ojmessaging/index.d.ts create mode 100644 types/oraclejet/ojmodel/index.d.ts create mode 100644 types/oraclejet/ojmodule-element-utils/index.d.ts create mode 100644 types/oraclejet/ojmodule-element/index.d.ts create mode 100644 types/oraclejet/ojmoduleanimations/index.d.ts create mode 100644 types/oraclejet/ojnavigationlist/index.d.ts create mode 100644 types/oraclejet/ojnbox/index.d.ts create mode 100644 types/oraclejet/ojoptgroup/index.d.ts create mode 100644 types/oraclejet/ojoption/index.d.ts create mode 100644 types/oraclejet/ojpictochart/index.d.ts create mode 100644 types/oraclejet/ojpopup/index.d.ts create mode 100644 types/oraclejet/ojprogress/index.d.ts create mode 100644 types/oraclejet/ojprogresslist/index.d.ts create mode 100644 types/oraclejet/ojpulltorefresh/index.d.ts create mode 100644 types/oraclejet/ojradioset/index.d.ts create mode 100644 types/oraclejet/ojrefresher/index.d.ts create mode 100644 types/oraclejet/ojresponsiveknockoututils/index.d.ts create mode 100644 types/oraclejet/ojresponsiveutils/index.d.ts create mode 100644 types/oraclejet/ojrouter/index.d.ts create mode 100644 types/oraclejet/ojselectcombobox/index.d.ts create mode 100644 types/oraclejet/ojslider/index.d.ts create mode 100644 types/oraclejet/ojsunburst/index.d.ts create mode 100644 types/oraclejet/ojswipeactions/index.d.ts create mode 100644 types/oraclejet/ojswipetoreveal/index.d.ts create mode 100644 types/oraclejet/ojswitch/index.d.ts create mode 100644 types/oraclejet/ojswitcher/index.d.ts create mode 100644 types/oraclejet/ojtable/index.d.ts create mode 100644 types/oraclejet/ojtagcloud/index.d.ts create mode 100644 types/oraclejet/ojthematicmap/index.d.ts create mode 100644 types/oraclejet/ojthemeutils/index.d.ts create mode 100644 types/oraclejet/ojtime-base/index.d.ts create mode 100644 types/oraclejet/ojtimeaxis/index.d.ts create mode 100644 types/oraclejet/ojtimeutils/index.d.ts create mode 100644 types/oraclejet/ojtoolbar/index.d.ts create mode 100644 types/oraclejet/ojtrain/index.d.ts create mode 100644 types/oraclejet/ojtranslation/index.d.ts create mode 100644 types/oraclejet/ojtreedataprovider/index.d.ts create mode 100644 types/oraclejet/ojtreemap/index.d.ts create mode 100644 types/oraclejet/ojvalidation-base/index.d.ts create mode 100644 types/oraclejet/ojvalidation-datetime/index.d.ts create mode 100644 types/oraclejet/ojvalidation-number/index.d.ts create mode 100644 types/oraclejet/ojvalidationgroup/index.d.ts create mode 100644 types/oraclejet/test.ts rename types/{@oracle => oraclejet}/tsconfig.json (68%) create mode 100644 types/oraclejet/tslint.json diff --git a/types/@oracle/index.d.ts b/types/@oracle/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/@oracle/oraclejet/index.d.ts b/types/@oracle/oraclejet/index.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/@oracle/oraclejet/ojs/index.d.ts b/types/@oracle/oraclejet/ojs/index.d.ts deleted file mode 100644 index 90fb69208a..0000000000 --- a/types/@oracle/oraclejet/ojs/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -declare namespace oj { - - var revision: string; - var version: string; - function ajax(settings?: object): object; - function sync(method: string, model: oj.Model|oj.Collection, options?: object): object; - -} -declare namespace oj { - interface JetSettableProperties { - } - interface GenericSetter { - set(propertyName: K, propertyValue: SP[K]): void; - unset(propertyName: K): void; - } - abstract class JetElement extends HTMLElement implements GenericSetter { - set(propertyName: K, propertyValue: SP[K]): void; - unset(propertyName: K): void; - } - interface JetElementEventMap extends HTMLElementEventMap { - } -} \ No newline at end of file diff --git a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts b/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts deleted file mode 100644 index 427ee7ecaa..0000000000 --- a/types/@oracle/oraclejet/ojs/ojaccordion/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/// -/// -declare namespace oj { - class ojAccordion extends baseComponent { - expanded: Array<{id?: string, index?: number}>|null; - multiple: boolean; - onExpandedChanged: (event: CustomEvent)=> any; - onMultipleChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojAccordion.ojBeforeCollapse)=> any; - onOjBeforeExpand: (event: oj.ojAccordion.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojAccordion.ojCollapse)=> any; - onOjExpand: (event: oj.ojAccordion.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojAccordion { - class ojBeforeCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{toCollapsible: Element, fromCollapsible: Element, [propName: string]: any}> { - - } - } - interface ojAccordionEventMap extends oj.baseComponentEventMap { - 'ojBeforeCollapse': oj.ojAccordion.ojBeforeCollapse; - 'ojBeforeExpand': oj.ojAccordion.ojBeforeExpand; - 'ojCollapse': oj.ojAccordion.ojCollapse; - 'ojExpand': oj.ojAccordion.ojExpand; - 'expandedChanged': CustomEvent; - 'multipleChanged': CustomEvent; - } - interface ojAccordionSettableProperties extends baseComponentSettableProperties { - expanded: Array|Array|Array<{id?: string, index?: number}>|null; - multiple: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts b/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts deleted file mode 100644 index bd4b77f2c6..0000000000 --- a/types/@oracle/oraclejet/ojs/ojanimation/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -declare namespace oj { - namespace AnimationUtils { - function collapse(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; - function expand(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, startMaxHeight?: string, endMaxHeight?: string, startMaxWidth?: string, endMaxWidth?: string}): Promise; - function fadeIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; - function fadeOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, startOpacity?: number, endOpacity?: number}): Promise; - function flipIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; - function flipOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, startAngle?: string, endAngle?: string, backfaceVisibility?: string, perspective?: string, transformOrigin?: string, flipTarget?: string}): Promise; - function ripple(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, offsetX?: string, offsetY?: string, color?: string, diameter?: string, startOpacity?: number, endOpacity?: number}): Promise; - function slideIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; - function slideOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, direction?: string, offsetX?: string, offsetY?: string}): Promise; - function zoomIn(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; - function zoomOut(element: Element, options?: {delay?: string, duration?: string, timingFunction?: string, persist?: string, axis?: string, transformOrigin?: string}): Promise; - } - namespace AnimationUtils { - type AnimationMethods = 'collapse'|'expand'|'fadeIn'|'fadeOut'|'flipIn'|'flipOut'|'ripple'|'slideIn'|'slideOut'|'zoomIn'|'zoomOut'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts deleted file mode 100644 index dddaf2290a..0000000000 --- a/types/@oracle/oraclejet/ojs/ojarraydataprovider/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -declare namespace oj { - class ArrayDataProvider implements DataProvider { - constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keys?: Array|(()=> Array), idAttribute?: string|Array, keyAttributes?: string|Array}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} -declare namespace oj { - interface SortComparators { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts deleted file mode 100644 index dbb445c36f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojarraytreedataprovider/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// -declare namespace oj { - class ArrayTreeDataProvider implements TreeDataProvider { - constructor(data: Array|(()=> Array), options?: {sortComparators?: SortComparators, implicitSort?: SortCriterion[], keyAttributes?: string|Array, keyAttributesScope?: 'global'|'siblings', childrenAttribute?: string}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getChildDataProvider(any): ArrayTreeDataProvider - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts b/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts deleted file mode 100644 index bfdda53359..0000000000 --- a/types/@oracle/oraclejet/ojs/ojavatar/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -declare namespace oj { - class ojAvatar extends JetElement { - initials: string; - size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; - src: string; - onInitialsChanged: (event: CustomEvent)=> any; - onSizeChanged: (event: CustomEvent)=> any; - onSrcChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojAvatarEventMap extends oj.JetElementEventMap { - 'initialsChanged': CustomEvent; - 'sizeChanged': CustomEvent; - 'srcChanged': CustomEvent; - } - interface ojAvatarSettableProperties extends JetSettableProperties { - initials: string; - size: 'xxs'|'xs'|'sm'|'md'|'lg'|'xl'|'xxl'; - src: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts b/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts deleted file mode 100644 index 22df674702..0000000000 --- a/types/@oracle/oraclejet/ojs/ojbutton/index.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/// -declare namespace oj { - class ojButton extends baseComponent { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojButton.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojButton { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojButtonEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojButton.ojAction; - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - } - interface ojButtonSettableProperties extends baseComponentSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - } - -} -declare namespace oj { - abstract class ojButtonset extends baseComponent { - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetEventMap extends oj.baseComponentEventMap { - } - interface ojButtonsetSettableProperties extends baseComponentSettableProperties { - } - -} -declare namespace oj { - class ojButtonsetMany extends ojButtonset { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: Array|null; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onFocusManagementChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetManyEventMap extends oj.ojButtonsetEventMap { - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'focusManagementChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: Array|null; - } - -} -declare namespace oj { - class ojButtonsetOne extends ojButtonset { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: any; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onFocusManagementChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojButtonsetOneEventMap extends oj.ojButtonsetEventMap { - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'focusManagementChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - focusManagement: 'oneTabstop'|'none'; - value: any; - } - -} -declare namespace oj { - class ojMenuButton extends ojButton { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - onChromingChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojMenuButton.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojMenuButton { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojMenuButtonEventMap extends oj.ojButtonEventMap { - 'ojAction': oj.ojMenuButton.ojAction; - 'chromingChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayChanged': CustomEvent; - } - interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { - chroming: 'full'|'half'|'outlined'; - disabled: boolean; - display: 'all'|'icons'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts b/types/@oracle/oraclejet/ojs/ojchart/index.d.ts deleted file mode 100644 index f2e3354441..0000000000 --- a/types/@oracle/oraclejet/ojs/ojchart/index.d.ts +++ /dev/null @@ -1,822 +0,0 @@ -/// -/// -declare namespace oj { - class ojChart extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; - animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; - as: string; - coordinateSystem: 'polar'|'cartesian'; - data: oj.DataProvider|null; - dataCursor: 'off'|'on'|'auto'; - dataCursorBehavior: 'smooth'|'snap'|'auto'; - dataCursorPosition: {x: number|string, y: number, y2: number}; - dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); - dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; - dragMode: 'pan'|'zoom'|'select'|'off'|'user'; - drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; - groupComparator: ((param0: object, param1: Object)=> number)|null; - hiddenCategories: Array; - hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - initialZooming: 'first'|'last'|'none'; - legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; - orientation: 'horizontal'|'vertical'; - otherThreshold: number; - overview: {content: object, height: string, rendered: 'on'|'off'}; - pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; - plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; - polarGridShape: 'polygon'|'circle'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - seriesComparator: ((param0: object, param1: Object)=> number)|null; - sorting: 'ascending'|'descending'|'off'; - splitDualY: 'on'|'off'|'auto'; - splitterPosition: number; - stack: 'on'|'off'; - stackLabel: 'on'|'off'; - styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; - timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; - tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; - valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; - xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; - y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; - yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; - zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; - zoomDirection: 'x'|'y'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onCoordinateSystemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDataCursorChanged: (event: CustomEvent)=> any; - onDataCursorBehaviorChanged: (event: CustomEvent)=> any; - onDataCursorPositionChanged: (event: CustomEvent)=> any; - onDataLabelChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onDragModeChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupComparatorChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onInitialZoomingChanged: (event: CustomEvent)=> any; - onLegendChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onOtherThresholdChanged: (event: CustomEvent)=> any; - onOverviewChanged: (event: CustomEvent)=> any; - onPieCenterChanged: (event: CustomEvent)=> any; - onPlotAreaChanged: (event: CustomEvent)=> any; - onPolarGridShapeChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSeriesComparatorChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onSplitDualYChanged: (event: CustomEvent)=> any; - onSplitterPositionChanged: (event: CustomEvent)=> any; - onStackChanged: (event: CustomEvent)=> any; - onStackLabelChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTimeAxisTypeChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueFormatsChanged: (event: CustomEvent)=> any; - onXAxisChanged: (event: CustomEvent)=> any; - onY2AxisChanged: (event: CustomEvent)=> any; - onYAxisChanged: (event: CustomEvent)=> any; - onZoomAndScrollChanged: (event: CustomEvent)=> any; - onZoomDirectionChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojChart.ojDrill)=> any; - onOjSelectInput: (event: oj.ojChart.ojSelectInput)=> any; - onOjViewportChange: (event: oj.ojChart.ojViewportChange)=> any; - onOjViewportChangeInput: (event: oj.ojChart.ojViewportChangeInput)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojChart.PieCenterLabelContext|oj.ojChart.LegendItemContext|oj.ojChart.ReferenceObject|oj.ojChart.GroupContext|oj.ojChart.AxisTitleContext|oj.ojChart.ItemContext|oj.ojChart.SeriesContext; - getDataItem(seriesIndex: number, groupIndex: number): object|null; - getGroup(groupIndex: string): string; - getGroupCount(): number; - getLegend(): object; - getPlotArea(): object; - getSeries(seriesIndex: string): string; - getSeriesCount(): number; - getValuesAt(x: number, y: number): object; - getXAxis(): object; - getY2Axis(): object; - getYAxis(): object; - } - namespace ojChart { - class ojDrill extends CustomEvent<{id: string, series: string, group: string, data: object, itemData: object, seriesData: object, groupData: Array, [propName: string]: any}> { - - } - - class ojSelectInput extends CustomEvent<{items: Array, selectionData: Array<{data: object, itemData: object, groupData: Array, seriesData: object}>, endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - - class ojViewportChange extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - - class ojViewportChangeInput extends CustomEvent<{endGroup: string, startGroup: string, xMax: number, xMin: number, yMax: number, yMin: number, [propName: string]: any}> { - - } - } - interface ojChartEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojChart.ojDrill; - 'ojSelectInput': oj.ojChart.ojSelectInput; - 'ojViewportChange': oj.ojChart.ojViewportChange; - 'ojViewportChangeInput': oj.ojChart.ojViewportChangeInput; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'coordinateSystemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'dataCursorChanged': CustomEvent; - 'dataCursorBehaviorChanged': CustomEvent; - 'dataCursorPositionChanged': CustomEvent; - 'dataLabelChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'dragModeChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupComparatorChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'hideAndShowBehaviorChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'initialZoomingChanged': CustomEvent; - 'legendChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'otherThresholdChanged': CustomEvent; - 'overviewChanged': CustomEvent; - 'pieCenterChanged': CustomEvent; - 'plotAreaChanged': CustomEvent; - 'polarGridShapeChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'seriesComparatorChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'splitDualYChanged': CustomEvent; - 'splitterPositionChanged': CustomEvent; - 'stackChanged': CustomEvent; - 'stackLabelChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'timeAxisTypeChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueFormatsChanged': CustomEvent; - 'xAxisChanged': CustomEvent; - 'y2AxisChanged': CustomEvent; - 'yAxisChanged': CustomEvent; - 'zoomAndScrollChanged': CustomEvent; - 'zoomDirectionChanged': CustomEvent; - } - interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'slideToLeft'|'slideToRight'|'none'; - animationOnDisplay: 'auto'|'alphaFade'|'zoom'|'none'; - as: string; - coordinateSystem: 'polar'|'cartesian'; - data: oj.DataProvider|null; - dataCursor: 'off'|'on'|'auto'; - dataCursorBehavior: 'smooth'|'snap'|'auto'; - dataCursorPosition: {x: number|string, y: number, y2: number}; - dataLabel: ((context: oj.ojChart.DataLabelContext) => ({insert: Element|string}|{preventDefault: boolean})); - dnd: {drag: {groups: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, items: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}, series: {dataTypes: string|Array, drag: ((param0: Event)=> void), dragEnd: ((param0: Event)=> void), dragStart: ((param0: Event, param1: object)=> void)}}, drop: {legend: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, plotArea: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, xAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, y2Axis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}, yAxis: {dataTypes: string|Array, dragEnter: ((param0: Event, param1: object)=> void), dragLeave: ((param0: Event, param1: object)=> void), dragOver: ((param0: Event, param1: object)=> void), drop: ((param0: Event, param1: object)=> void)}}}; - dragMode: 'pan'|'zoom'|'select'|'off'|'user'; - drilling: 'on'|'seriesOnly'|'groupsOnly'|'off'; - groupComparator: ((param0: object, param1: Object)=> number)|null; - hiddenCategories: Array; - hideAndShowBehavior: 'withRescale'|'withoutRescale'|'none'; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - initialZooming: 'first'|'last'|'none'; - legend: {backgroundColor: string, borderColor: string, maxSize: string, position: 'start'|'end'|'bottom'|'top'|'auto', referenceObjectSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, rendered: 'on'|'off'|'auto', scrolling: 'off'|'asNeeded', sections: Array<{items: Array<{borderColor: string, categories: Array, categoryVisibility: 'hidden'|'visible', color: string, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerShape?: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shortDesc: string, source: string, symbolType: 'line'|'lineWithMarker'|'image'|'marker', text: string}>, sections: Array, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}>, seriesSection: {title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}, size: string, symbolHeight: number, symbolWidth: number, textStyle: object, title: string, titleHalign: 'center'|'end'|'start', titleStyle: object}; - orientation: 'horizontal'|'vertical'; - otherThreshold: number; - overview: {content: object, height: string, rendered: 'on'|'off'}; - pieCenter: {converter: object, label: string, labelStyle: object, renderer: ((context: oj.ojChart.PieCenterContext) => ({insert: Element|string}|{preventDefault: boolean})), scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}; - plotArea: {backgroundColor: string, borderColor: string, borderWidth: number, rendered: 'off'|'on'}; - polarGridShape: 'polygon'|'circle'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - seriesComparator: ((param0: object, param1: Object)=> number)|null; - sorting: 'ascending'|'descending'|'off'; - splitDualY: 'on'|'off'|'auto'; - splitterPosition: number; - stack: 'on'|'off'; - stackLabel: 'on'|'off'; - styleDefaults: {animationDownColor: string, animationDuration: number, animationIndicators: 'none'|'all', animationUpColor: string, barGapRatio: number, borderColor: string, borderWidth: number, boxPlot: {medianSvgClassName: string, medianSvgStyle: object, whiskerEndLength: string, whiskerEndSvgClassName: string, whiskerEndSvgStyle: object, whiskerSvgClassName: string, whiskerSvgStyle: object}, colors: Array, dataCursor: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, markerColor: string, markerDisplayed: 'off'|'on', markerSize: number}, dataItemGaps: string, dataLabelPosition: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto', dataLabelStyle: object|Array, funnelBackgroundColor: string, groupSeparators: {color: string, rendered: 'off'|'auto'}, hoverBehaviorDelay: number, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto', lineWidth: number, markerColor: string, markerDisplayed: 'on'|'off'|'auto', markerShape?: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|string, markerSize: number, marqueeBorderColor: string, marqueeColor: string, maxBarWidth: number, otherColor: string, patterns: Array, pieFeelerColor: string, pieInnerRadius: number, selectionEffect: 'explode'|'highlightAndExplode'|'highlight', seriesEffect: 'color'|'pattern'|'gradient', shapes: Array, stackLabelStyle: object, stockFallingColor: string, stockRangeColor: string, stockRisingColor: string, stockVolumeColor: string, threeDEffect: 'on'|'off', tooltipLabelStyle: object, tooltipValueStyle: object}; - timeAxisType: 'enabled'|'mixedFrequency'|'skipGaps'|'disabled'|'auto'; - tooltip: {renderer: ((context: oj.ojChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - type: 'line'|'area'|'lineWithArea'|'stock'|'boxPlot'|'combo'|'pie'|'scatter'|'bubble'|'funnel'|'pyramid'|'bar'; - valueFormats: {close: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, group: {tooltipDisplay: 'off'|'auto', tooltipLabel: string|Array}, high: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, label: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto'}, low: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, open: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q1: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, q3: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, series: {tooltipDisplay: 'off'|'auto', tooltipLabel: string}, targetValue: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, value: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, volume: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, x: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, y2: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}, z: {converter: object, scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', tooltipDisplay: 'off'|'auto', tooltipLabel: string}}; - xAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'off'|'on'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number|string, maxSize: string, min: number|string, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, rendered: 'off'|'on', rotation: 'none'|'auto', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportEndGroup: number|string, viewportMax: number|string, viewportMin: number|string, viewportStartGroup: number|string}; - y2Axis: {alignTickMarks: 'off'|'on', axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object}; - yAxis: {axisLine: {lineColor: string, lineWidth: number, rendered: 'on'|'off'|'auto'}, baselineScaling: 'min'|'zero', dataMax: number, dataMin: number, majorTick: {baselineColor: 'inherit'|'auto', baselineStyle: 'dotted'|'dashed'|'solid', baselineWidth: number, lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, max: number, maxSize: string, min: number, minStep: number, minorStep: number, minorTick: {lineColor: string, lineStyle: 'dotted'|'dashed'|'solid', lineWidth: number, rendered: 'on'|'off'|'auto'}, position: 'start'|'end'|'top'|'bottom'|'auto', referenceObjects: Array<{categories: Array, color: string, displayInLegend: 'on'|'off', high: number, id: string, items: Array<{high: number, low: number, value: number, x: number|string}>, lineStyle: 'dotted'|'dashed'|'solid', lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'straight', lineWidth: number, location: 'front'|'back', low: number, shortDesc: string, svgClassName: string, svgStyle: object, text: string, type: 'area'|'line', value: number}>, rendered: 'off'|'on', scale: 'log'|'linear', size: string, step: number, tickLabel: {converter: object, position: 'inside'|'outside', rendered: 'off'|'on', scaling: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style: object}, title: string, titleStyle: object, viewportMax: number, viewportMin: number}; - zoomAndScroll: 'delayedScrollOnly'|'liveScrollOnly'|'delayed'|'live'|'off'; - zoomDirection: 'x'|'y'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelClose?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelDefaultGroupName?: string, labelGroup?: string, labelHigh?: string, labelInvalidData?: string, labelLow?: string, labelNoData?: string, labelOpen?: string, labelOther?: string, labelPercentage?: string, labelQ1?: string, labelQ2?: string, labelQ3?: string, labelSeries?: string, labelTargetValue?: string, labelValue?: string, labelVolume?: string, labelX?: string, labelY?: string, labelZ?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipPan?: string, tooltipSelect?: string, tooltipZoom?: string}; - } - namespace ojChart { - type AxisTitleContext = - { - axis: 'xAxis'|'yAxis'|'y2Axis', subId: string - } - } - namespace ojChart { - type DataLabelContext = - { - id: any, series: string, group: string|Array, value: number, targetValue: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, label: string, totalValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element - } - } - namespace ojChart { - type GroupContext = - { - indexPath: Array, subId: string - } - } - namespace ojChart { - type ItemContext = - { - seriesIndex: number, itemIndex: number, subId: string - } - } - namespace ojChart { - type LegendItemContext = - { - sectionIndexPath: Array, itemIndex: number, subId: string - } - } - namespace ojChart { - type PieCenterContext = - { - outerBounds: object, innerBounds: object, label: string, componentElement: Element - } - } - namespace ojChart { - type PieCenterLabelContext = - { - subId: string - } - } - namespace ojChart { - type ReferenceObject = - { - axis: 'xAxis'|'yAxis'|'y2Axis', index: number, subId: string - } - } - namespace ojChart { - type SeriesContext = - { - itemIndex: number, subId: string - } - } - namespace ojChart { - type TooltipContext = - { - parentElement: Element, id: any, series: string, group: string|Array, label: string, value: number, x: number|string, y: number, z: number, low: number, high: number, open: number, close: number, volume: number, targetValue: number, data: object|null, itemData: object|null, seriesData: object|null, groupData: object|null, componentElement: Element, color: string - } - } - -} -declare namespace oj { - class ojChartGroup extends JetElement { - drilling?: 'on'|'off'|'inherit'; - labelStyle?: object; - name?: string; - shortDesc?: string; - onDrillingChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartGroupEventMap extends oj.JetElementEventMap { - 'drillingChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - } - interface ojChartGroupSettableProperties extends JetSettableProperties { - drilling?: 'on'|'off'|'inherit'; - labelStyle?: object; - name?: string; - shortDesc?: string; - } - -} -declare namespace oj { - class ojChartItem extends JetElement { - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - close?: number; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupId: Array; - high?: number; - items?: Array|Array; - label?: string|Array; - labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; - labelStyle?: object|Array; - low?: number; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - open?: number; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - q1?: number; - q2?: number; - q3?: number; - seriesId: string; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - svgClassName?: string; - svgStyle?: object; - targetValue?: number; - value?: number; - volume?: number; - x?: number|string; - y?: number; - z?: number; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onBoxPlotChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onCloseChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupIdChanged: (event: CustomEvent)=> any; - onHighChanged: (event: CustomEvent)=> any; - onItemsChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLowChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onOpenChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onQ1Changed: (event: CustomEvent)=> any; - onQ2Changed: (event: CustomEvent)=> any; - onQ3Changed: (event: CustomEvent)=> any; - onSeriesIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTargetValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVolumeChanged: (event: CustomEvent)=> any; - onXChanged: (event: CustomEvent)=> any; - onYChanged: (event: CustomEvent)=> any; - onZChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'boxPlotChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'closeChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupIdChanged': CustomEvent; - 'highChanged': CustomEvent; - 'itemsChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'lowChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'openChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'q1Changed': CustomEvent; - 'q2Changed': CustomEvent; - 'q3Changed': CustomEvent; - 'seriesIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'targetValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'volumeChanged': CustomEvent; - 'xChanged': CustomEvent; - 'yChanged': CustomEvent; - 'zChanged': CustomEvent; - } - interface ojChartItemSettableProperties extends JetSettableProperties { - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - close?: number; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupId: Array; - high?: number; - items?: Array|Array; - label?: string|Array; - labelPosition?: 'center'|'outsideSlice'|'aboveMarker'|'belowMarker'|'beforeMarker'|'afterMarker'|'insideBarEdge'|'outsideBarEdge'|'none'|'auto'; - labelStyle?: object|Array; - low?: number; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - open?: number; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - q1?: number; - q2?: number; - q3?: number; - seriesId: string; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - svgClassName?: string; - svgStyle?: object; - targetValue?: number; - value?: number; - volume?: number; - x?: number|string; - y?: number; - z?: number; - } - -} -declare namespace oj { - class ojChartSeries extends JetElement { - areaColor?: string; - areaSvgClassName?: string; - areaSvgStyle?: object; - assignedToY2?: 'on'|'off'; - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - color?: string; - displayInLegend?: 'on'|'off'|'auto'; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; - lineWidth?: number; - markerColor?: string; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - markerSvgClassName?: string; - markerSvgStyle?: object; - name?: string; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - pieSliceExplode?: number; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - stackCategory?: string; - svgClassName?: string; - svgStyle?: object; - type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; - onAreaColorChanged: (event: CustomEvent)=> any; - onAreaSvgClassNameChanged: (event: CustomEvent)=> any; - onAreaSvgStyleChanged: (event: CustomEvent)=> any; - onAssignedToY2Changed: (event: CustomEvent)=> any; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onBoxPlotChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDisplayInLegendChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineTypeChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onMarkerColorChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; - onMarkerSvgStyleChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onPieSliceExplodeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onStackCategoryChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojChartSeriesEventMap extends oj.JetElementEventMap { - 'areaColorChanged': CustomEvent; - 'areaSvgClassNameChanged': CustomEvent; - 'areaSvgStyleChanged': CustomEvent; - 'assignedToY2Changed': CustomEvent; - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'boxPlotChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'displayInLegendChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineTypeChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'markerColorChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'markerSvgClassNameChanged': CustomEvent; - 'markerSvgStyleChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'pieSliceExplodeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'stackCategoryChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojChartSeriesSettableProperties extends JetSettableProperties { - areaColor?: string; - areaSvgClassName?: string; - areaSvgStyle?: object; - assignedToY2?: 'on'|'off'; - borderColor?: string; - borderWidth?: number; - boxPlot?: {medianSvgClassName?: string, medianSvgStyle?: object, q2Color?: string, q2SvgClassName?: string, q2SvgStyle?: object, q3Color?: string, q3SvgClassName?: string, q3SvgStyle?: object, whiskerEndLength?: string, whiskerEndSvgClassName?: string, whiskerEndSvgStyle?: object, whiskerSvgClassName?: string, whiskerSvgStyle?: object}; - categories?: Array; - color?: string; - displayInLegend?: 'on'|'off'|'auto'; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineType?: 'straight'|'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'auto'; - lineWidth?: number; - markerColor?: string; - markerDisplayed?: 'on'|'off'|'auto'; - markerShape?: 'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'|'auto'|string; - markerSize?: number; - markerSvgClassName?: string; - markerSvgStyle?: object; - name?: string; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'auto'; - pieSliceExplode?: number; - shortDesc?: string; - source?: string; - sourceHover?: string; - sourceHoverSelected?: string; - sourceSelected?: string; - stackCategory?: string; - svgClassName?: string; - svgStyle?: object; - type?: 'bar'|'line'|'area'|'lineWithArea'|'candlestick'|'boxPlot'|'auto'; - } - -} -declare namespace oj { - class ojSparkChart extends dvtBaseComponent> { - animationDuration: number|null; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - areaColor: string; - areaSvgClassName: string; - areaSvgStyle: object; - as: string; - barGapRatio: number; - baselineScaling: 'zero'|'min'; - color: string; - data: oj.DataProvider|null; - firstColor: string; - highColor: string; - lastColor: string; - lineStyle: 'dotted'|'dashed'|'solid'; - lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; - lineWidth: number; - lowColor: string; - markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; - markerSize: number; - referenceObjects: Array; - svgClassName: string; - svgStyle: object; - tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - type: 'area'|'lineWithArea'|'bar'|'line'; - visualEffects: 'none'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAreaColorChanged: (event: CustomEvent)=> any; - onAreaSvgClassNameChanged: (event: CustomEvent)=> any; - onAreaSvgStyleChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onBarGapRatioChanged: (event: CustomEvent)=> any; - onBaselineScalingChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onFirstColorChanged: (event: CustomEvent)=> any; - onHighColorChanged: (event: CustomEvent)=> any; - onLastColorChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineTypeChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onLowColorChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onReferenceObjectsChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getDataItem(itemIndex: number): oj.ojSparkChart.ItemContext|null; - } - interface ojSparkChartEventMap extends oj.dvtBaseComponentEventMap { - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'areaColorChanged': CustomEvent; - 'areaSvgClassNameChanged': CustomEvent; - 'areaSvgStyleChanged': CustomEvent; - 'asChanged': CustomEvent; - 'barGapRatioChanged': CustomEvent; - 'baselineScalingChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'firstColorChanged': CustomEvent; - 'highColorChanged': CustomEvent; - 'lastColorChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineTypeChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'lowColorChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'referenceObjectsChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number|null; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - areaColor: string; - areaSvgClassName: string; - areaSvgStyle: object; - as: string; - barGapRatio: number; - baselineScaling: 'zero'|'min'; - color: string; - data: oj.DataProvider|null; - firstColor: string; - highColor: string; - lastColor: string; - lineStyle: 'dotted'|'dashed'|'solid'; - lineType: 'curved'|'stepped'|'centeredStepped'|'segmented'|'centeredSegmented'|'none'|'straight'; - lineWidth: number; - lowColor: string; - markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'; - markerSize: number; - referenceObjects: Array; - svgClassName: string; - svgStyle: object; - tooltip: {renderer: ((context: oj.ojSparkChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - type: 'area'|'lineWithArea'|'bar'|'line'; - visualEffects: 'none'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojSparkChart { - type Item = - { - borderColor: string, color: string, date: Date, high: number, low: number, markerDisplayed: 'on'|'off', markerShape: 'square'|'circle'|'diamond'|'plus'|'triangleDown'|'triangleUp'|'human'|'star'|'auto'|string, markerSize: number, svgClassName: string, svgStyle: object, value: number - } - } - namespace ojSparkChart { - type ItemContext = - { - borderColor: string, color: string, date: Date, high: number, low: number, value: number - } - } - namespace ojSparkChart { - type ReferenceObject = - { - color?: string, high?: number, lineWidth?: number, lineStyle: 'dotted'|'dashed'|'solid', location: 'front'|'back', low?: number, svgClassName?: string, svgStyle?: object, type: 'area'|'line', value?: number - } - } - namespace ojSparkChart { - type TooltipContext = - { - color: string, componentElement: Element, parentElement: Element - } - } - -} -declare namespace oj { - class ojSparkChartItem extends JetElement { - borderColor: string; - color: string; - date: string; - high: number|null; - low: number|null; - markerDisplayed: 'off'|'on'; - markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; - markerSize: number; - svgClassName: string; - svgStyle: object; - value: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDateChanged: (event: CustomEvent)=> any; - onHighChanged: (event: CustomEvent)=> any; - onLowChanged: (event: CustomEvent)=> any; - onMarkerDisplayedChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSizeChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojSparkChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'dateChanged': CustomEvent; - 'highChanged': CustomEvent; - 'lowChanged': CustomEvent; - 'markerDisplayedChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSizeChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSparkChartItemSettableProperties extends JetSettableProperties { - borderColor: string; - color: string; - date: string; - high: number|null; - low: number|null; - markerDisplayed: 'off'|'on'; - markerShape: 'auto'|'circle'|'diamond'|'human'|'plus'|'square'|'star'|'triangleDown'|'triangleUp'; - markerSize: number; - svgClassName: string; - svgStyle: object; - value: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts b/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts deleted file mode 100644 index 6972efe009..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcheckboxset/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// -declare namespace oj { - class ojCheckboxset extends editableValue, ojCheckboxsetSettableProperties> { - disabled: boolean; - labelledBy: string|null; - required: boolean; - value: Array; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojCheckboxset.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojCheckboxset.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojCheckboxset { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojCheckboxsetEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojCheckboxset.ojAnimateEnd; - 'ojAnimateStart': oj.ojCheckboxset.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojCheckboxsetSettableProperties extends editableValueSettableProperties> { - disabled: boolean; - labelledBy: string|null; - required: boolean; - value: Array; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts deleted file mode 100644 index 4784d83c1c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcollapsible/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/// -declare namespace oj { - class ojCollapsible extends baseComponent { - disabled: boolean; - expandArea: 'header'|'disclosureIcon'; - expanded: boolean; - onDisabledChanged: (event: CustomEvent)=> any; - onExpandAreaChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojCollapsible.ojBeforeCollapse)=> any; - onOjBeforeExpand: (event: oj.ojCollapsible.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojCollapsible.ojCollapse)=> any; - onOjExpand: (event: oj.ojCollapsible.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojCollapsible { - class ojBeforeCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{header: Element, content: Element, [propName: string]: any}> { - - } - } - interface ojCollapsibleEventMap extends oj.baseComponentEventMap { - 'ojBeforeCollapse': oj.ojCollapsible.ojBeforeCollapse; - 'ojBeforeExpand': oj.ojCollapsible.ojBeforeExpand; - 'ojCollapse': oj.ojCollapsible.ojCollapse; - 'ojExpand': oj.ojCollapsible.ojExpand; - 'disabledChanged': CustomEvent; - 'expandAreaChanged': CustomEvent; - 'expandedChanged': CustomEvent; - } - interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { - disabled: boolean; - expandArea: 'header'|'disclosureIcon'; - expanded: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts deleted file mode 100644 index 08bd5b25c8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcollectiondataprovider/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -declare namespace oj { - class CollectionDataProvider implements DataProvider { - constructor(collection: oj.Collection); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName?: string): any - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts deleted file mode 100644 index 0c8397621c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolor/index.d.ts +++ /dev/null @@ -1,179 +0,0 @@ -declare namespace oj { - class Color { - static ALICEBLUE: oj.Color; - static ANTIQUEWHITE: oj.Color; - static AQUA: oj.Color; - static AQUAMARINE: oj.Color; - static AZURE: oj.Color; - static BEIGE: oj.Color; - static BISQUE: oj.Color; - static BLACK: oj.Color; - static BLANCHEDALMOND: oj.Color; - static BLUE: oj.Color; - static BLUEVIOLET: oj.Color; - static BROWN: oj.Color; - static BURLYWOOD: oj.Color; - static CADETBLUE: oj.Color; - static CHARTREUSE: oj.Color; - static CHOCOLATE: oj.Color; - static CORAL: oj.Color; - static CORNFLOWERBLUE: oj.Color; - static CORNSILK: oj.Color; - static CRIMSON: oj.Color; - static CYAN: oj.Color; - static DARKBLUE: oj.Color; - static DARKCYAN: oj.Color; - static DARKGOLDENROD: oj.Color; - static DARKGRAY: oj.Color; - static DARKGREEN: oj.Color; - static DARKGREY: oj.Color; - static DARKKHAKI: oj.Color; - static DARKMAGENTA: oj.Color; - static DARKOLIVEGREEN: oj.Color; - static DARKORANGE: oj.Color; - static DARKORCHID: oj.Color; - static DARKRED: oj.Color; - static DARKSALMON: oj.Color; - static DARKSEAGREEN: oj.Color; - static DARKSLATEBLUE: oj.Color; - static DARKSLATEGRAY: oj.Color; - static DARKSLATEGREY: oj.Color; - static DARKTURQUOISE: oj.Color; - static DARKVIOLET: oj.Color; - static DEEPPINK: oj.Color; - static DEEPSKYBLUE: oj.Color; - static DIMGRAY: oj.Color; - static DIMGREY: oj.Color; - static DODGERBLUE: oj.Color; - static FIREBRICK: oj.Color; - static FLORALWHITE: oj.Color; - static FORESTGREEN: oj.Color; - static FUCHSIA: oj.Color; - static GAINSBORO: oj.Color; - static GHOSTWHITE: oj.Color; - static GOLD: oj.Color; - static GOLDENROD: oj.Color; - static GRAY: oj.Color; - static GREEN: oj.Color; - static GREENYELLOW: oj.Color; - static GREY: oj.Color; - static HONEYDEW: oj.Color; - static HOTPINK: oj.Color; - static INDIANRED: oj.Color; - static INDIGO: oj.Color; - static IVORY: oj.Color; - static KHAKI: oj.Color; - static LAVENDER: oj.Color; - static LAVENDERBLUSH: oj.Color; - static LAWNGREEN: oj.Color; - static LEMONCHIFFON: oj.Color; - static LIGHTBLUE: oj.Color; - static LIGHTCORAL: oj.Color; - static LIGHTCYAN: oj.Color; - static LIGHTGOLDENRODYELLOW: oj.Color; - static LIGHTGRAY: oj.Color; - static LIGHTGREEN: oj.Color; - static LIGHTGREY: oj.Color; - static LIGHTPINK: oj.Color; - static LIGHTSALMON: oj.Color; - static LIGHTSEAGREEN: oj.Color; - static LIGHTSKYBLUE: oj.Color; - static LIGHTSLATEGRAY: oj.Color; - static LIGHTSLATEGREY: oj.Color; - static LIGHTSTEELBLUE: oj.Color; - static LIGHTYELLOW: oj.Color; - static LIME: oj.Color; - static LIMEGREEN: oj.Color; - static LINEN: oj.Color; - static MAGENTA: oj.Color; - static MAROON: oj.Color; - static MEDIUMAQUAMARINE: oj.Color; - static MEDIUMBLUE: oj.Color; - static MEDIUMORCHID: oj.Color; - static MEDIUMPURPLE: oj.Color; - static MEDIUMSEAGREEN: oj.Color; - static MEDIUMSLATEBLUE: oj.Color; - static MEDIUMSPRINGGREEN: oj.Color; - static MEDIUMTURQUOISE: oj.Color; - static MEDIUMVIOLETRED: oj.Color; - static MIDNIGHTBLUE: oj.Color; - static MINTCREAM: oj.Color; - static MISTYROSE: oj.Color; - static MOCCASIN: oj.Color; - static NAVAJOWHITE: oj.Color; - static NAVY: oj.Color; - static OLDLACE: oj.Color; - static OLIVE: oj.Color; - static OLIVEDRAB: oj.Color; - static ORANGE: oj.Color; - static ORANGERED: oj.Color; - static ORCHID: oj.Color; - static PALEGOLDENROD: oj.Color; - static PALEGREEN: oj.Color; - static PALETURQUOISE: oj.Color; - static PALEVIOLETRED: oj.Color; - static PAPAYAWHIP: oj.Color; - static PEACHPUFF: oj.Color; - static PERU: oj.Color; - static PINK: oj.Color; - static PLUM: oj.Color; - static POWDERBLUE: oj.Color; - static PURPLE: oj.Color; - static REBECCAPURPLE: oj.Color; - static RED: oj.Color; - static ROSYBROWN: oj.Color; - static ROYALBLUE: oj.Color; - static SADDLEBROWN: oj.Color; - static SALMON: oj.Color; - static SANDYBROWN: oj.Color; - static SEAGREEN: oj.Color; - static SEASHELL: oj.Color; - static SIENNA: oj.Color; - static SILVER: oj.Color; - static SKYBLUE: oj.Color; - static SLATEBLUE: oj.Color; - static SLATEGRAY: oj.Color; - static SLATEGREY: oj.Color; - static SNOW: oj.Color; - static SPRINGGREEN: oj.Color; - static STEELBLUE: oj.Color; - static TAN: oj.Color; - static TEAL: oj.Color; - static THISTLE: oj.Color; - static TOMATO: oj.Color; - static TRANSPARENT: oj.Color; - static TURQUOISE: oj.Color; - static VIOLET: oj.Color; - static WHEAT: oj.Color; - static WHITE: oj.Color; - static WHITESMOKE: oj.Color; - static YELLOW: oj.Color; - static YELLOWGREEN: oj.Color; - constructor(color: string|oj.Color.RGBA|oj.Color.HSLA|oj.Color.HSVA); - getAlpha(): number; - getBlue(doNotRound?: boolean): number; - getGreen(doNotRound?: boolean): number; - getRed(doNotRound?: boolean): number; - isEqual(color: oj.Color): boolean; - toString(): string; - } - namespace Color { - type HSLA = - { - h: number, s: number, l: number, a?: number - } - } - namespace Color { - type HSVA = - { - h: number, s: number, v: number, a?: number - } - } - namespace Color { - type RGBA = - { - r: number, g: number, b: number, a?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts deleted file mode 100644 index 34aaa0e23e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolorpalette/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/// -declare namespace oj { - class ojColorPalette extends editableValue { - labelDisplay: 'auto'|'off'; - labelledBy: string|null; - layout: 'grid'|'list'; - palette: Array<{color: oj.Color, label?: string}>; - swatchSize: 'xs'|'sm'|'lg'; - value: oj.Color; - translations: {labelNone?: string}; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onPaletteChanged: (event: CustomEvent)=> any; - onSwatchSizeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojColorPalette.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojColorPalette.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): any; - setProperty(property: string, value: any): any; - } - namespace ojColorPalette { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojColorPaletteEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojColorPalette.ojAnimateEnd; - 'ojAnimateStart': oj.ojColorPalette.ojAnimateStart; - 'labelDisplayChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'paletteChanged': CustomEvent; - 'swatchSizeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojColorPaletteSettableProperties extends editableValueSettableProperties { - labelDisplay: 'auto'|'off'; - labelledBy: string|null; - layout: 'grid'|'list'; - palette: Array<{color: oj.Color, label?: string}>; - swatchSize: 'xs'|'sm'|'lg'; - value: oj.Color; - translations: {labelNone?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts b/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts deleted file mode 100644 index f5e8308c9c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcolorspectrum/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -declare namespace oj { - class ojColorSpectrum extends editableValue { - labelledBy: string|null; - readonly transientValue: oj.Color; - value: oj.Color; - translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; - onLabelledByChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojColorSpectrum.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojColorSpectrum.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): any; - setProperty(property: string, value: any): any; - } - namespace ojColorSpectrum { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojColorSpectrumEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojColorSpectrum.ojAnimateEnd; - 'ojAnimateStart': oj.ojColorSpectrum.ojAnimateStart; - 'labelledByChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { - labelledBy: string|null; - readonly transientValue: oj.Color; - value: oj.Color; - translations: {labelHue?: string, labelOpacity?: string, labelSatLum?: string, labelThumbDesc?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts deleted file mode 100644 index 0bb4197939..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcomponentcore/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare namespace oj { - abstract class baseComponent extends JetElement { - translations: object|null; - - onTranslationsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface baseComponentEventMap extends oj.JetElementEventMap { - 'translationsChanged': CustomEvent; - } - interface baseComponentSettableProperties extends JetSettableProperties { - translations: object|null; - } - -} -declare namespace oj { - class Components { - static subtreeAttached(node: Element): void; - static subtreeDetached(node: Element): void; - static subtreeHidden(node: Element): void; - static subtreeShown(node: Element, options?: {initialRender: boolean}): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts b/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts deleted file mode 100644 index aeb13c443b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcomposite/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -declare namespace oj { - namespace Composite { - function getComponentMetadata(name: string): oj.Composite.Metadata|null; - function register(name: string, descriptor: {metadata: oj.Composite.Metadata, view: string, viewModel: ((param0: oj.Composite.ViewModelContext)=> void|object), parseFunction: ((value: string, name: string, meta: Object, defaultParseFunction: (value: string)=> any)=>any)}): void; - } - namespace Composite { - type Metadata = - { - name: string, version: string, jetVersion: string, properties?: object, methods?: object, events?: object, slots?: object - } - } - namespace Composite { - type PropertyChangedContext = - { - property: string, value: any, previousValue: any, updatedFrom: 'external'|'internal', subproperty?: {path: string, value: any, previousValue: any} - } - } - namespace Composite { - type ViewModel = - { - activated: ((param0: oj.Composite.ViewModelContext)=> Promise|void), connected: ((param0: oj.Composite.ViewModelContext)=> void), bindingsApplied: ((param0: oj.Composite.ViewModelContext)=> void), propertyChanged: ((param0: oj.Composite.PropertyChangedContext)=> void), disconnected: ((param0: Element)=> void) - } - } - namespace Composite { - type ViewModelContext = - { - element: Element, properties: object, slotCounts: object, unique: string, uniqueId: string - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts b/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts deleted file mode 100644 index f7463f449e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojconveyorbelt/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -declare namespace oj { - class ojConveyorBelt extends baseComponent { - contentParent: string|null; - orientation: 'horizontal'|'vertical'; - onContentParentChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojConveyorBeltEventMap extends oj.baseComponentEventMap { - 'contentParentChanged': CustomEvent; - 'orientationChanged': CustomEvent; - } - interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { - contentParent: string|null; - orientation: 'horizontal'|'vertical'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts b/types/@oracle/oraclejet/ojs/ojcore/index.d.ts deleted file mode 100644 index 2d23485157..0000000000 --- a/types/@oracle/oraclejet/ojs/ojcore/index.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -declare namespace oj { - class BusyContext { - static applicationBootstrapComplete(): undefined; - static setDefaultTimeout(timeout: number): undefined; - addBusyState(options: {description: object|(()=> string)}): (()=> void); - clear(): undefined; - dump(message?: string): undefined; - getBusyStates(): Array<{id:string, description:string}>; - isReady(): boolean; - toString(): string; - whenReady(timeout?: number): Promise<(boolean|Error)>; - } - -} -declare namespace oj { - class Config { - static getAutomationMode(): string; - static getDeviceType(): 'phone'|'tablet'|'others'; - static getLocale(): string; - static getResourceUrl(relativePath: string): string; - static getVersionInfo(): string; - static logVersionInfo(): undefined; - static setAutomationMode(mode: string): undefined; - static setLocale(locale: string, callback?: (()=> void)): undefined; - static setResourceBaseUrl(baseUrl: string): undefined; - } - -} -declare namespace oj { - class Context { - static getContext(node: Element): oj.Context; - static getPageContext(): oj.Context; - getBusyContext(): oj.BusyContext; - } - -} -declare namespace oj { - class Logger { - static readonly LEVEL_ERROR: number; - static readonly LEVEL_INFO: number; - static readonly LEVEL_LOG: number; - static readonly LEVEL_NONE: number; - static readonly LEVEL_WARN: number; - static error(...args: (object|string|number)[]): void; - static info(...args: (object|string|number)[]): void; - static log(...args: (object|string|number)[]): void; - static option(key?: object|string, value?: any): any; - static warn(...args: (object|string|number)[]): void; - } - -} -declare namespace oj { - class Object { - constructor(); - static compareValues(obj1: any, obj2: any): boolean; - static copyPropertiesForClass(targetClass: object, source: object): void; - static createCallback(obj: object, func: object): ()=>any; - static createSubclass(extendingClass: object, baseClass: object, typeName?: string): void; - static ensureClassInitialization(clazz: object): void; - static getTypeName(): string; - static isEmpty(): boolean; - clone(): object; - equals(object: object): boolean; - getClass(otherInstance?: object): object; - getTypeName(clazz: object|null): string; - Init(): void; - toDebugString(): string; - toString(): string; - } - -} -declare namespace oj { - class ResponsiveUtils { - static compare(size1: oj.ResponsiveUtils.SCREEN_RANGE, size2: oj.ResponsiveUtils.SCREEN_RANGE): number; - static getFrameworkQuery(frameworkQueryKey: oj.ResponsiveUtils.FRAMEWORK_QUERY_KEY): string|null; - } - namespace ResponsiveUtils { - enum FRAMEWORK_QUERY_KEY { - SM_UP = "sm-up", - MD_UP = "md-up", - LG_UP = "lg-up", - XL_UP = "xl-up", - XXL_UP = "xxl-up", - SM_ONLY = "sm-only", - MD_ONLY = "md-only", - LG_ONLY = "lg-only", - XL_ONLY = "xl-only", - MD_DOWN = "md-down", - LG_DOWN = "lg-down", - XL_DOWN = "xl-down", - HIGH_RESOLUTION = "high-resolution", - } - enum SCREEN_RANGE { - SM = "sm", - MD = "md", - LG = "lg", - XL = "xl", - XXL = "xxl", - } - } - - -} -declare namespace oj { - class ThemeUtils { - constructor(); - static clearCache(): void; - static getThemeName(): string|null; - static getThemeTargetPlatform(): string|null; - static parseJSONFromFontFamily(selector: string): any; - } - -} -declare namespace oj { - class Translations { - static applyParameters(pattern: string, parameters: object|Array): string|null; - static getComponentTranslations(componentName: string): object; - static getResource(key: string): object|string|null; - static getTranslatedString(key: string, ...var_args: (string|object|Array)[]): string; - static setBundle(bundle: object): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts deleted file mode 100644 index 45cd10f459..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdataprovider/index.d.ts +++ /dev/null @@ -1,254 +0,0 @@ -declare namespace oj { - interface AttributeFilterOperator { - attribute: string; - op: oj.AttributeFilterOperator.AttributeOperator; - value: any; - } - namespace AttributeFilterOperator { - enum AttributeOperator { - $co, - $eq, - $ew, - $pr, - $gt, - $ge, - $lt, - $le, - $ne, - $regex, - $sw, - } - } - - -} -declare namespace oj { - interface CompoundFilterOperator { - criteria: FilterOperator[]; - op: oj.CompoundFilterOperator.CompoundOperator; - } - namespace CompoundFilterOperator { - enum CompoundOperator { - $and, - $or, - } - } - - -} -declare namespace oj { - interface ContainsKeysResults { - containsParameters: FetchByKeysParameters; - results: Set; - } - -} -declare namespace oj { - interface DataMapping { - mapFields: (item: Item) => Item; - mapFilterCriterion?: (filterCriterion: FilterOperator[]) => FilterOperator[]; - mapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; - unmapSortCriteria?: (sortCriteria: SortCriterion[]) => SortCriterion[]; - } - -} -declare namespace oj { - interface DataProvider extends EventTarget { - containsKeys(parameters : FetchByKeysParameters) : Promise> - fetchByKeys(parameters : FetchByKeysParameters) : Promise> - fetchByOffset(parameters: FetchByOffsetParameters): Promise> - fetchFirst(FetchListParameters?): AsyncIterable> - getCapability(capabilityName: string): any - getTotalSize(): Promise; - isEmpty(): 'yes' | 'no' | 'unknown' - } - -} -declare namespace oj { - interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { - afterKeys?: Set; - } - -} -declare namespace oj { - class DataProviderMutationEvent implements Event { - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; - NONE: number; - bubbles: boolean; - cancelBubble: boolean; - cancelable: boolean; - composed: boolean; - currentTarget: EventTarget; - deepPath: () => EventTarget[]; - defaultPrevented: boolean; - detail: DataProviderMutationEventDetail; - eventPhase: number; - initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; - isTrusted: boolean; - preventDefault: () => void; - returnValue: boolean; - scoped: boolean; - srcElement: Element|null; - stopImmediatePropagation: () => void; - stopPropagation: () => void; - target: EventTarget; - timeStamp: number; - type: string; - constructor(detail: DataProviderMutationEventDetail); - } - -} -declare namespace oj { - interface DataProviderMutationEventDetail { - add?: DataProviderAddOperationEventDetail; - remove?: DataProviderOperationEventDetail; - update?: DataProviderOperationEventDetail; - } - -} -declare namespace oj { - interface DataProviderOperationEventDetail { - data?: D[]; - indexes?: number[]; - keys: Set; - metadata?: ItemMetadata[]; - } - -} -declare namespace oj { - class DataProviderRefreshEvent implements Event { - AT_TARGET: number; - BUBBLING_PHASE: number; - CAPTURING_PHASE: number; - NONE: number; - bubbles: boolean; - cancelBubble: boolean; - cancelable: boolean; - composed: boolean; - currentTarget: EventTarget; - deepPath: () => EventTarget[]; - defaultPrevented: boolean; - eventPhase: number; - initEvent: (eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean) => void; - isTrusted: boolean; - preventDefault: () => void; - returnValue: boolean; - scoped: boolean; - srcElement: Element|null; - stopImmediatePropagation: () => void; - stopPropagation: () => void; - target: EventTarget; - timeStamp: number; - type: string; - constructor(); - } - -} -declare namespace oj { - interface FetchByKeysCapability { - implementation: 'iteration'|'lookup'; - } - -} -declare namespace oj { - class FetchByKeysMixin { - static applyMixin(derivedCtor: Function): any; - } - -} -declare namespace oj { - interface FetchByKeysParameters { - keys: Set; - } - -} -declare namespace oj { - interface FetchByKeysResults { - fetchParameters: FetchByKeysParameters; - results: Map>; - } - -} -declare namespace oj { - interface FetchByOffsetCapability { - implementation: 'iteration'|'randomAccess'; - } - -} -declare namespace oj { - class FetchByOffsetMixin { - static applyMixin(derivedCtor: Function): any; - } - -} -declare namespace oj { - interface FetchByOffsetParameters extends FetchListParameters { - offset: number; - } - -} -declare namespace oj { - interface FetchByOffsetResults { - done: boolean; - fetchParameters: FetchByOffsetParameters; - results: Array>; - } - -} -declare namespace oj { - interface FetchListParameters { - filterCriterion?: FilterOperator; - size: number; - sortCriteria?: SortCriterion[]; - } - -} -declare namespace oj { - interface FetchListResult { - data: D[]; - fetchParameters: FetchListParameters; - metadata: ItemMetadata[]; - } - -} -declare namespace oj { - interface FilterCapability { - operators: Array; - } - -} -declare namespace oj { - interface FilterOperator { - op: oj.AttributeFilterOperator.AttributeOperator|oj.CompoundFilterOperator.CompoundOperator; - filter(data: Array): Array; - } - -} -declare namespace oj { - interface Item { - data: D; - metadata: ItemMetadata; - } - -} -declare namespace oj { - interface ItemMetadata { - key: K; - } - -} -declare namespace oj { - interface SortCapability { - attributes: 'none'|'single'|'multiple'; - } - -} -declare namespace oj { - interface SortCriterion { - attribute: keyof D; - direction: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts deleted file mode 100644 index 707a963de7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdatetimepicker/index.d.ts +++ /dev/null @@ -1,308 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojDatePicker extends ojInputDate { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDatePicker.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDatePicker.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojDatePicker { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojDatePickerEventMap extends oj.ojInputDateEventMap { - 'ojAnimateEnd': oj.ojDatePicker.ojAnimateEnd; - 'ojAnimateStart': oj.ojDatePicker.ojAnimateStart; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - } - -} -declare namespace oj { - class ojDateTimePicker extends ojInputDateTime { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDateTimePicker.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDateTimePicker.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojDateTimePicker { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojDateTimePickerEventMap extends oj.ojInputDateTimeEventMap { - 'ojAnimateEnd': oj.ojDateTimePicker.ojAnimateEnd; - 'ojAnimateStart': oj.ojDateTimePicker.ojAnimateStart; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { - keyboardEdit: 'disabled'; - max: string|null; - min: string|null; - renderMode: 'jet'; - value: string; - } - -} -declare namespace oj { - class ojInputDate extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter; - datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; - dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); - dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onDatePickerChanged: (event: CustomEvent)=> any; - onDayFormatterChanged: (event: CustomEvent)=> any; - onDayMetaDataChanged: (event: CustomEvent)=> any; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputDate.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputDate.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hide(): void; - refresh(): void; - show(): void; - } - namespace ojInputDate { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputDateEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputDate.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputDate.ojAnimateStart; - 'converterChanged': CustomEvent; - 'datePickerChanged': CustomEvent; - 'dayFormatterChanged': CustomEvent; - 'dayMetaDataChanged': CustomEvent; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputDateSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - datePicker: {changeMonth: 'select'|'none', changeYear: 'select'|'none', currentMonthPos: number, daysOutsideMonth: 'hidden'|'visible'|'selectable', footerLayout: ''|'today', numberOfMonths: number, showOn: 'focus'|'image', stepBigMonths: number, stepMonths: 'numberOfMonths'|number, weekDisplay: 'number'|'none', yearRange: string}; - dayFormatter: (param: oj.ojInputDate.DayFormatterInput)=> (null|'all'|oj.ojInputDate.DayFormatterOutput); - dayMetaData: {[key:string]: {[key:string]: {[key:string]: {disabled?: boolean, className?: string, tooltip?: string}}}}; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - } - namespace ojInputDate { - type DayFormatterInput = - { - fullYear: number, month: number, date: number - } - } - namespace ojInputDate { - type DayFormatterOutput = - { - disabled?: boolean, className?: string, tooltip?: string - } - } - -} -declare namespace oj { - class ojInputDateTime extends ojInputDate { - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: string|null; - min: string|null; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onTimePickerChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputDateTime.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputDateTime.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hideTimePicker(): void; - show(): void; - showTimePicker(): void; - } - namespace ojInputDateTime { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputDateTimeEventMap extends oj.ojInputDateEventMap { - 'ojAnimateEnd': oj.ojInputDateTime.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputDateTime.ojAnimateStart; - 'converterChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'timePickerChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: string|null; - min: string|null; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {cancel?: string, currentText?: string, dateRestriction?: {hint?: string, messageDetail?: string, messageSummary?: string}, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, done?: string, nextText?: string, prevText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipCalendar?: string, tooltipCalendarDisabled?: string, tooltipCalendarTime?: string, tooltipCalendarTimeDisabled?: string, weekHeader?: string}; - } - -} -declare namespace oj { - class ojInputTime extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onKeyboardEditChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onTimePickerChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputTime.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputTime.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - hide(): void; - refresh(): void; - show(): void; - } - namespace ojInputTime { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputTimeEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputTime.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputTime.ojAnimateStart; - 'converterChanged': CustomEvent; - 'keyboardEditChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'timePickerChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojInputTimeSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter; - keyboardEdit: 'enabled'|'disabled'; - max: string|null; - min: string|null; - pickerAttributes: {style?: string, class?: string}; - renderMode: 'jet'|'native'; - timePicker: {footerLayout: ''|'now', showOn: 'focus'|'image', timeIncrement: string}; - validators: Array|oj.Validation.RegisteredValidator>; - value: string; - translations: {ampmWheelLabel?: string, cancelText?: string, currentTimeText?: string, dateTimeRange?: {hint?: {inRange?: string, max?: string, min?: string}, messageDetail?: {rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, hourWheelLabel?: string, minuteWheelLabel?: string, okText?: string, regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipTime?: string, tooltipTimeDisabled?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts b/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts deleted file mode 100644 index 7672ac8a35..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdefer/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - class ojDefer extends JetElement { - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojDeferEventMap extends oj.JetElementEventMap { - } - interface ojDeferSettableProperties extends JetSettableProperties { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts deleted file mode 100644 index 0df017ec3c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdeferreddataprovider/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -declare namespace oj { - class DeferredDataProvider implements DataProvider { - constructor(dataProvider: Promise>[], capabilityFunc: Function); - addEventListener(eventType: string, listener: EventListener): any; - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean; - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName: string): object; - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): any; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts b/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts deleted file mode 100644 index 85ea4be39c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdialog/index.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -/// -declare namespace oj { - class ojDialog extends baseComponent { - cancelBehavior: 'icon'|'escape'|'none'; - dragAffordance: 'title-bar'|'none'; - initialVisibility: 'hide'|'show'; - modality: 'modal'|'modeless'; - position: oj.ojDialog.Position; - resizeBehavior: 'resizable'|'none'; - role: string; - translations: {labelCloseIcon?: string}; - onCancelBehaviorChanged: (event: CustomEvent)=> any; - onDragAffordanceChanged: (event: CustomEvent)=> any; - onInitialVisibilityChanged: (event: CustomEvent)=> any; - onModalityChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - onResizeBehaviorChanged: (event: CustomEvent)=> any; - onRoleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojDialog.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojDialog.ojAnimateStart)=> any; - onOjBeforeClose: (event: oj.ojDialog.ojBeforeClose)=> any; - onOjBeforeOpen: (event: oj.ojDialog.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojDialog.ojClose)=> any; - onOjFocus: (event: oj.ojDialog.ojFocus)=> any; - onOjOpen: (event: oj.ojDialog.ojOpen)=> any; - onOjResize: (event: oj.ojDialog.ojResize)=> any; - onOjResizeStart: (event: oj.ojDialog.ojResizeStart)=> any; - onOjResizeStop: (event: oj.ojDialog.ojResizeStop)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - isOpen(): boolean; - open(): void; - refresh(): void; - } - namespace ojDialog { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojFocus extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResize extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResizeStart extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojResizeStop extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - } - interface ojDialogEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojDialog.ojAnimateEnd; - 'ojAnimateStart': oj.ojDialog.ojAnimateStart; - 'ojBeforeClose': oj.ojDialog.ojBeforeClose; - 'ojBeforeOpen': oj.ojDialog.ojBeforeOpen; - 'ojClose': oj.ojDialog.ojClose; - 'ojFocus': oj.ojDialog.ojFocus; - 'ojOpen': oj.ojDialog.ojOpen; - 'ojResize': oj.ojDialog.ojResize; - 'ojResizeStart': oj.ojDialog.ojResizeStart; - 'ojResizeStop': oj.ojDialog.ojResizeStop; - 'cancelBehaviorChanged': CustomEvent; - 'dragAffordanceChanged': CustomEvent; - 'initialVisibilityChanged': CustomEvent; - 'modalityChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'resizeBehaviorChanged': CustomEvent; - 'roleChanged': CustomEvent; - } - interface ojDialogSettableProperties extends baseComponentSettableProperties { - cancelBehavior: 'icon'|'escape'|'none'; - dragAffordance: 'title-bar'|'none'; - initialVisibility: 'hide'|'show'; - modality: 'modal'|'modeless'; - position: oj.ojDialog.Position; - resizeBehavior: 'resizable'|'none'; - role: string; - translations: {labelCloseIcon?: string}; - } - namespace ojDialog { - type Position = - { - my?: oj.ojDialog.PositionAlign, at?: oj.ojDialog.PositionAlign, offset?: oj.ojDialog.PositionPoint, of?: string|oj.ojDialog.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' - } - } - namespace ojDialog { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojDialog { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts deleted file mode 100644 index 9624749ed1..0000000000 --- a/types/@oracle/oraclejet/ojs/ojdvt-base/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// -declare namespace oj { - abstract class dvtBaseComponent extends baseComponent { - trackResize: 'on'|'off'; - translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onTrackResizeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtBaseComponentEventMap extends oj.baseComponentEventMap { - 'trackResizeChanged': CustomEvent; - } - interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { - trackResize: 'on'|'off'; - translations: {labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts deleted file mode 100644 index 63176945d9..0000000000 --- a/types/@oracle/oraclejet/ojs/ojeditablevalue/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/// -/// -declare namespace oj { - abstract class editableValue, SV= V, RV= V> extends baseComponent { - describedBy: string|null; - disabled: boolean; - displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; - help: {instruction?: string}; - helpHints: {definition?: string, source?: string}; - labelHint: string; - messagesCustom: Array; - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - value: V; - onDescribedByChanged: (event: CustomEvent)=> any; - onDisabledChanged: (event: CustomEvent)=> any; - onDisplayOptionsChanged: (event: CustomEvent)=> any; - onHelpChanged: (event: CustomEvent)=> any; - onHelpHintsChanged: (event: CustomEvent)=> any; - onLabelHintChanged: (event: CustomEvent)=> any; - onMessagesCustomChanged: (event: CustomEvent)=> any; - onValidChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.editableValue.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.editableValue.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - reset(): void; - showMessages(): void; - } - namespace editableValue { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface editableValueEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.editableValue.ojAnimateEnd; - 'ojAnimateStart': oj.editableValue.ojAnimateStart; - 'describedByChanged': CustomEvent; - 'disabledChanged': CustomEvent; - 'displayOptionsChanged': CustomEvent; - 'helpChanged': CustomEvent; - 'helpHintsChanged': CustomEvent; - 'labelHintChanged': CustomEvent; - 'messagesCustomChanged': CustomEvent; - 'validChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface editableValueSettableProperties extends baseComponentSettableProperties { - describedBy: string|null; - disabled: boolean; - displayOptions: {converterHint: Array<'placeholder'|'notewindow'|'none'>|'placeholder'|'notewindow'|'none', helpInstruction: Array<'notewindow'|'none'>|'notewindow'|'none', messages: Array<'inline'|'notewindow'|'none'>|'inline'|'notewindow'|'none', validatorHint: Array<'notewindow'|'none'>|'notewindow'|'none'}; - help: {instruction?: string}; - helpHints: {definition?: string, source?: string}; - labelHint: string; - messagesCustom: Array; - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - value: SV; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts deleted file mode 100644 index dbcfec3632..0000000000 --- a/types/@oracle/oraclejet/ojs/ojfilepicker/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -/// -declare namespace oj { - interface FileUploadTransport { - flush(): void; - queue(fileList: FileList): Array; - } - -} -declare namespace oj { - class ojFilePicker extends JetElement { - accept: Array|null; - selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; - selectionMode: 'multiple'|'single'; - onAcceptChanged: (event: CustomEvent)=> any; - onSelectOnChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onOjSelect: (event: oj.ojFilePicker.ojSelect)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - namespace ojFilePicker { - class ojSelect extends CustomEvent<{files: FileList, [propName: string]: any}> { - - } - } - interface ojFilePickerEventMap extends oj.JetElementEventMap { - 'ojSelect': oj.ojFilePicker.ojSelect; - 'acceptChanged': CustomEvent; - 'selectOnChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - } - interface ojFilePickerSettableProperties extends JetSettableProperties { - accept: Array|null; - selectOn: 'auto'|'click'|'drop'|'clickAndDrop'; - selectionMode: 'multiple'|'single'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts b/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts deleted file mode 100644 index 5287e1be53..0000000000 --- a/types/@oracle/oraclejet/ojs/ojfilmstrip/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/// -declare namespace oj { - class ojFilmStrip extends baseComponent { - arrowPlacement: 'adjacent'|'overlay'; - arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; - currentItem: {id?: string, index?: number}; - looping: 'off'|'page'; - maxItemsPerPage: number; - orientation: 'horizontal'|'vertical'; - translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; - onArrowPlacementChanged: (event: CustomEvent)=> any; - onArrowVisibilityChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onLoopingChanged: (event: CustomEvent)=> any; - onMaxItemsPerPageChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getItemsPerPage(): number; - refresh(): void; - } - interface ojFilmStripEventMap extends oj.baseComponentEventMap { - 'arrowPlacementChanged': CustomEvent; - 'arrowVisibilityChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'loopingChanged': CustomEvent; - 'maxItemsPerPageChanged': CustomEvent; - 'orientationChanged': CustomEvent; - } - interface ojFilmStripSettableProperties extends baseComponentSettableProperties { - arrowPlacement: 'adjacent'|'overlay'; - arrowVisibility: 'visible'|'hidden'|'hover'|'auto'; - currentItem: {id?: string, index?: number}; - looping: 'off'|'page'; - maxItemsPerPage: number; - orientation: 'horizontal'|'vertical'; - translations: {labelAccArrowNextPage?: string, labelAccArrowPreviousPage?: string, labelAccFilmStrip?: string, tipArrowNextPage?: string, tipArrowPreviousPage?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts deleted file mode 100644 index 4487a1baa7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojformlayout/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace oj { - class ojFormLayout extends JetElement { - direction: 'column'|'row'; - labelEdge: 'start'|'top'; - labelWidth: string; - labelWrapping: 'truncate'|'wrap'; - maxColumns: number; - onDirectionChanged: (event: CustomEvent)=> any; - onLabelEdgeChanged: (event: CustomEvent)=> any; - onLabelWidthChanged: (event: CustomEvent)=> any; - onLabelWrappingChanged: (event: CustomEvent)=> any; - onMaxColumnsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojFormLayoutEventMap extends oj.JetElementEventMap { - 'directionChanged': CustomEvent; - 'labelEdgeChanged': CustomEvent; - 'labelWidthChanged': CustomEvent; - 'labelWrappingChanged': CustomEvent; - 'maxColumnsChanged': CustomEvent; - } - interface ojFormLayoutSettableProperties extends JetSettableProperties { - direction: 'column'|'row'; - labelEdge: 'start'|'top'; - labelWidth: string; - labelWrapping: 'truncate'|'wrap'; - maxColumns: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts b/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts deleted file mode 100644 index 86b2f26147..0000000000 --- a/types/@oracle/oraclejet/ojs/ojgantt/index.d.ts +++ /dev/null @@ -1,286 +0,0 @@ -/// -/// -declare namespace oj { - class ojGantt extends dvtTimeComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - axisPosition: 'bottom'|'top'; - dependencyData?: (oj.DataProvider); - dnd: {move?: {tasks?: 'disabled'|'enabled'}}; - end: string; - gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; - majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - referenceObjects: Array; - rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; - rowDefaults: {height?: number}; - scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - start: string; - taskData?: (oj.DataProvider); - taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; - tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; - viewportEnd: string; - viewportStart: string; - translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onAxisPositionChanged: (event: CustomEvent)=> any; - onDependencyDataChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onGridlinesChanged: (event: CustomEvent)=> any; - onMajorAxisChanged: (event: CustomEvent)=> any; - onMinorAxisChanged: (event: CustomEvent)=> any; - onReferenceObjectsChanged: (event: CustomEvent)=> any; - onRowAxisChanged: (event: CustomEvent)=> any; - onRowDefaultsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - onTaskDataChanged: (event: CustomEvent)=> any; - onTaskDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onValueFormatsChanged: (event: CustomEvent)=> any; - onViewportEndChanged: (event: CustomEvent)=> any; - onViewportStartChanged: (event: CustomEvent)=> any; - onOjMove: (event: oj.ojGantt.ojMove)=> any; - onOjViewportChange: (event: oj.ojGantt.ojViewportChange)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): {subId: 'oj-gantt-row-label', index: number} | {subId: 'oj-gantt-taskbar', rowIndex: number, index: number} | null; - } - namespace ojGantt { - class ojMove extends CustomEvent<{taskContexts: Array<{data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2|null, color: string}>, value: string, start: string, end: string, baselineStart: string, baselineEnd: string, rowContext: {rowData: oj.ojGantt.Row, componentElement: Element}, [propName: string]: any}> { - - } - - class ojViewportChange extends CustomEvent<{viewportStart: string, viewportEnd: string, majorAxisScale: string, minorAxisScale: string, [propName: string]: any}> { - - } - } - interface ojGanttEventMap extends oj.dvtTimeComponentEventMap { - 'ojMove': oj.ojGantt.ojMove; - 'ojViewportChange': oj.ojGantt.ojViewportChange; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'axisPositionChanged': CustomEvent; - 'dependencyDataChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'endChanged': CustomEvent; - 'gridlinesChanged': CustomEvent; - 'majorAxisChanged': CustomEvent; - 'minorAxisChanged': CustomEvent; - 'referenceObjectsChanged': CustomEvent; - 'rowAxisChanged': CustomEvent; - 'rowDefaultsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'startChanged': CustomEvent; - 'taskDataChanged': CustomEvent; - 'taskDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'valueFormatsChanged': CustomEvent; - 'viewportEndChanged': CustomEvent; - 'viewportStartChanged': CustomEvent; - } - interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - axisPosition: 'bottom'|'top'; - dependencyData?: (oj.DataProvider); - dnd: {move?: {tasks?: 'disabled'|'enabled'}}; - end: string; - gridlines: {horizontal?: 'hidden'|'visible'|'auto', vertical?: 'hidden'|'visible'|'auto'}; - majorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - minorAxis: {converter?: (oj.ojTimeAxis.Converter|oj.Converter), height?: number, scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years', zoomOrder?: Array}; - referenceObjects: Array; - rowAxis: {label?: {renderer: ((context: oj.ojGantt.RowAxisLabelRendererContext) => ({insert: Element}))}, maxWidth?: string, rendered?: 'on'|'off', width?: string}; - rowDefaults: {height?: number}; - scrollPosition: {offsetY?: number, rowIndex?: number, y?: number}; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - start: string; - taskData?: (oj.DataProvider); - taskDefaults: {baseline?: {borderRadius?: string, height?: number, svgClassName?: string, svgStyle?: object}, borderRadius?: string, height?: number, labelPosition?: (string|Array), progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object}, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto'}; - tooltip: {renderer: ((context: oj.ojGantt.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - valueFormats: {baselineDate?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineEnd?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, baselineStart?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, date?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, end?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, label?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, progress?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, row?: {tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}, start?: {converter?: (oj.Converter), tooltipDisplay?: 'off'|'auto', tooltipLabel?: string}}; - viewportEnd: string; - viewportStart: string; - translations: {accessibleDependencyInfo?: string, accessiblePredecessorInfo?: string, accessibleSuccessorInfo?: string, accessibleTaskTypeMilestone?: string, accessibleTaskTypeSummary?: string, componentName?: string, finishFinishDependencyAriaDesc?: string, finishStartDependencyAriaDesc?: string, labelAndValue?: string, labelBaselineDate?: string, labelBaselineEnd?: string, labelBaselineStart?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelDate?: string, labelEnd?: string, labelInvalidData?: string, labelLabel?: string, labelMoveBy?: string, labelNoData?: string, labelProgress?: string, labelRow?: string, labelStart?: string, startFinishDependencyAriaDesc?: string, startStartDependencyAriaDesc?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, taskMoveCancelled?: string, taskMoveFinalized?: string, taskMoveInitiated?: string, taskMoveInitiatedInstruction?: string, taskMoveSelectionInfo?: string, tooltipZoomIn?: string, tooltipZoomOut?: string}; - } - namespace ojGantt { - type Dependency = - { - id: K1, predecessorTaskId: K2, shortDesc?: string, successorTaskId: K2, svgClassName?: string, svgStyle?: object, type?: 'startStart'|'startFinish'|'finishFinish'|'finishStart' - } - } - namespace ojGantt { - type ReferenceObject = - { - svgClassName?: string, svgStyle?: object, value?: string - } - } - namespace ojGantt { - type Row = - { - id?: any, label?: string, labelStyle?: object, tasks?: Array> - } - } - namespace ojGantt { - type RowAxisLabelRendererContext = - { - parentElement: Element, rowData: oj.ojGantt.Row, itemData: Array, componentElement: Element, maxWidth: number, maxHeight: number - } - } - namespace ojGantt { - type RowTask = - { - borderRadius?: string, end?: string, height?: number, id: K2, label?: string, labelPosition?: string|Array, labelStyle?: object, start?: string, shortDesc?: string, svgClassName?: string, svgStyle?: object, type?: 'normal'|'milestone'|'summary'|'auto', progress?: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}, baseline?: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object} - } - } - namespace ojGantt { - type TooltipContext = - { - parentElement: Element, data: oj.ojGantt.RowTask, rowData: oj.ojGantt.Row, itemData: D2, componentElement: Element, color: string - } - } - -} -declare namespace oj { - class ojGanttDependency extends JetElement { - predecessorTaskId: any; - shortDesc: string|null; - successorTaskId: any; - svgClassName: string; - svgStyle: object; - type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; - onPredecessorTaskIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSuccessorTaskIdChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttDependencyEventMap extends oj.JetElementEventMap { - 'predecessorTaskIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'successorTaskIdChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojGanttDependencySettableProperties extends JetSettableProperties { - predecessorTaskId: any; - shortDesc: string|null; - successorTaskId: any; - svgClassName: string; - svgStyle: object; - type: 'finishStart'|'finishFinish'|'startStart'|'startFinish'; - } - -} -declare namespace oj { - class ojGanttRow extends JetElement { - label: string; - labelStyle: object; - onLabelChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttRowEventMap extends oj.JetElementEventMap { - 'labelChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - } - interface ojGanttRowSettableProperties extends JetSettableProperties { - label: string; - labelStyle: object; - } - -} -declare namespace oj { - class ojGanttTask extends JetElement { - baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; - borderRadius: string; - end: string; - height: number|null; - label: string; - labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; - labelStyle: object; - progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; - rowId?: any; - shortDesc: string|null; - start: string; - svgClassName: string; - svgStyle: object; - type: 'normal'|'milestone'|'summary'|'auto'; - onBaselineChanged: (event: CustomEvent)=> any; - onBorderRadiusChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onHeightChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onProgressChanged: (event: CustomEvent)=> any; - onRowIdChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojGanttTaskEventMap extends oj.JetElementEventMap { - 'baselineChanged': CustomEvent; - 'borderRadiusChanged': CustomEvent; - 'endChanged': CustomEvent; - 'heightChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'progressChanged': CustomEvent; - 'rowIdChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'startChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'typeChanged': CustomEvent; - } - interface ojGanttTaskSettableProperties extends JetSettableProperties { - baseline: {borderRadius?: string, end?: string, height?: number, start?: string, svgClassName?: string, svgStyle?: object}; - borderRadius: string; - end: string; - height: number|null; - label: string; - labelPosition: 'start'|'innerCenter'|'innerStart'|'innerEnd'|'end'|'none'; - labelStyle: object; - progress: {borderRadius?: string, height?: string, svgClassName?: string, svgStyle?: object, value?: number}; - rowId?: any; - shortDesc: string|null; - start: string; - svgClassName: string; - svgStyle: object; - type: 'normal'|'milestone'|'summary'|'auto'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts b/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts deleted file mode 100644 index 0c3efab804..0000000000 --- a/types/@oracle/oraclejet/ojs/ojgauge/index.d.ts +++ /dev/null @@ -1,347 +0,0 @@ -/// -declare namespace oj { - abstract class dvtBaseGauge extends dvtBaseComponent { - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtBaseGaugeEventMap extends oj.dvtBaseComponentEventMap { - } - interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - -} -declare namespace oj { - class ojLedGauge extends dvtBaseGauge { - borderColor: string; - color: string; - label: {style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - rotation: 90|180|270|0; - size: number; - svgClassName: string; - svgStyle: object; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; - value: number|null; - visualEffects: 'none'|'auto'; - onBorderColorChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMetricLabelChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSizeChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getMetricLabel(): string; - } - interface ojLedGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'borderColorChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'metricLabelChanged': CustomEvent; - 'minChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'sizeChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - borderColor: string; - color: string; - label: {style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, rendered?: 'on'|'off', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - rotation: 90|180|270|0; - size: number; - svgClassName: string; - svgStyle: object; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojLedGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - type: 'arrow'|'diamond'|'square'|'rectangle'|'triangle'|'star'|'human'|'circle'; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojLedGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojLedGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} -declare namespace oj { - class ojRatingGauge extends dvtBaseGauge { - changed: boolean; - changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - max: number; - min: number; - orientation: 'vertical'|'horizontal'; - preserveAspectRatio: 'none'|'meet'; - readonly: boolean; - selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - step: 0.5|1; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - value: number|null; - visualEffects: 'none'|'auto'; - onChangedChanged: (event: CustomEvent)=> any; - onChangedStateChanged: (event: CustomEvent)=> any; - onHoverStateChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onPreserveAspectRatioChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onSelectedStateChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onUnselectedStateChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojRatingGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'changedChanged': CustomEvent; - 'changedStateChanged': CustomEvent; - 'hoverStateChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'preserveAspectRatioChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'selectedStateChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'unselectedStateChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - changed: boolean; - changedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - hoverState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - max: number; - min: number; - orientation: 'vertical'|'horizontal'; - preserveAspectRatio: 'none'|'meet'; - readonly: boolean; - selectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - step: 0.5|1; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojRatingGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - unselectedState: {borderColor?: string, color?: string, shape?: 'circle'|'diamond'|'human'|'square'|'star'|'triangle'|string, source?: string, svgClassName?: string, svgStyle?: object}; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojRatingGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojRatingGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} -declare namespace oj { - class ojStatusMeterGauge extends dvtBaseGauge { - angleExtent: number; - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - borderColor: string; - borderRadius: string; - center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - color: string; - indicatorSize: number; - innerRadius: number; - label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - orientation: 'circular'|'vertical'|'horizontal'; - plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; - readonly: boolean; - referenceLines: Array; - startAngle: number; - step: number|null; - svgClassName: string; - svgStyle: object; - thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - value: number|null; - visualEffects: 'none'|'auto'; - onAngleExtentChanged: (event: CustomEvent)=> any; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderRadiusChanged: (event: CustomEvent)=> any; - onCenterChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onIndicatorSizeChanged: (event: CustomEvent)=> any; - onInnerRadiusChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMetricLabelChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onPlotAreaChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onReferenceLinesChanged: (event: CustomEvent)=> any; - onStartAngleChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onThresholdDisplayChanged: (event: CustomEvent)=> any; - onThresholdsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVisualEffectsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getMetricLabel(): string; - } - interface ojStatusMeterGaugeEventMap extends oj.dvtBaseGaugeEventMap { - 'angleExtentChanged': CustomEvent; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'borderColorChanged': CustomEvent; - 'borderRadiusChanged': CustomEvent; - 'centerChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'indicatorSizeChanged': CustomEvent; - 'innerRadiusChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'metricLabelChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'plotAreaChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'referenceLinesChanged': CustomEvent; - 'startAngleChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'thresholdDisplayChanged': CustomEvent; - 'thresholdsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'visualEffectsChanged': CustomEvent; - } - interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { - angleExtent: number; - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - borderColor: string; - borderRadius: string; - center: {renderer: ((context: oj.ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - color: string; - indicatorSize: number; - innerRadius: number; - label: {position?: 'center'|'start'|'auto', style?: object, text?: string}; - max: number; - metricLabel: {converter?: Converter, position?: 'center'|'insideIndicatorEdge'|'outsideIndicatorEdge'|'outsidePlotArea'|'withLabel'|'auto', rendered?: 'on'|'off'|'auto', scaling?: 'none'|'thousand'|'million'|'billion'|'trillion'|'quadrillion'|'auto', style?: object, text?: string, textType?: 'percent'|'number'}; - min: number; - orientation: 'circular'|'vertical'|'horizontal'; - plotArea: {borderColor?: string, borderRadius?: string, color?: string, rendered?: 'on'|'off'|'auto', svgClassName?: string, svgStyle?: object}; - readonly: boolean; - referenceLines: Array; - startAngle: number; - step: number|null; - svgClassName: string; - svgStyle: object; - thresholdDisplay: 'currentOnly'|'all'|'onIndicator'; - thresholds: Array; - tooltip: {renderer: ((context: oj.ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - readonly transientValue: number|null; - value: number|null; - visualEffects: 'none'|'auto'; - } - namespace ojStatusMeterGauge { - type Bounds = - { - x: number, y: number, width: number, height: number - } - } - namespace ojStatusMeterGauge { - type CenterContext = - { - componentElement: Element, innerBounds: oj.ojStatusMeterGauge.Bounds, metricLabel: string, outerBounds: oj.ojStatusMeterGauge.Bounds - } - } - namespace ojStatusMeterGauge { - type ReferenceLine = - { - color?: string, value?: number - } - } - namespace ojStatusMeterGauge { - type Threshold = - { - borderColor?: string, color?: string, max?: number, shortDesc?: string - } - } - namespace ojStatusMeterGauge { - type TooltipContext = - { - color: string, componentElement: Element, label: string, parentElement: Element - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts b/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts deleted file mode 100644 index 49b10e2bfa..0000000000 --- a/types/@oracle/oraclejet/ojs/ojindexer/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - interface IndexerModel { - getIndexableSections(): Array|Array; - getMissingSections(): Array|Array; - setSection(section: string|object): Promise|Promise; - } - var IndexerModel: { - prototype: IndexerModel; - - SECTION_OTHERS: {id: string, label: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts deleted file mode 100644 index ea03d4c8d3..0000000000 --- a/types/@oracle/oraclejet/ojs/ojinputnumber/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojInputNumber extends editableValue { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: number|null; - min: number|null; - name: string; - placeholder: string|null; - readonly rawValue: string; - readonly: boolean|null; - required: boolean; - step: number|null; - validators: Array|oj.Validation.RegisteredValidator>; - value: number|null; - virtualKeyboard: 'auto'|'number'|'text'; - translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onAutocompleteChanged: (event: CustomEvent)=> any; - onAutofocusChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onVirtualKeyboardChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputNumber.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputNumber.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - stepDown(steps?: number): void; - stepUp(steps?: number): void; - validate(): Promise; - } - namespace ojInputNumber { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputNumberEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojInputNumber.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputNumber.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'autocompleteChanged': CustomEvent; - 'autofocusChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'virtualKeyboardChanged': CustomEvent; - } - interface ojInputNumberSettableProperties extends editableValueSettableProperties { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - converter: oj.Converter|oj.Validation.RegisteredConverter; - max: number|null; - min: number|null; - name: string; - placeholder: string|null; - readonly rawValue: string; - readonly: boolean|null; - required: boolean; - step: number|null; - validators: Array|oj.Validation.RegisteredValidator>; - value: number|null; - virtualKeyboard: 'auto'|'number'|'text'; - translations: {numberRange?: {hint?: {exact?: string, inRange?: string, max?: string, min?: string}, messageDetail?: {exact?: string, rangeOverflow?: string, rangeUnderflow?: string}, messageSummary?: {rangeOverflow?: string, rangeUnderflow?: string}}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, tooltipDecrement?: string, tooltipIncrement?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts b/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts deleted file mode 100644 index 248bf14f58..0000000000 --- a/types/@oracle/oraclejet/ojs/ojinputtext/index.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -/// -/// -/// -/// -declare namespace oj { - abstract class inputBase, SV= V, RV= V> extends editableValue { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - name: string; - placeholder: string; - readonly rawValue: RV; - readonly: boolean; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onAutocompleteChanged: (event: CustomEvent)=> any; - onAutofocusChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.inputBase.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.inputBase.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise<'valid'|'invalid'>; - } - namespace inputBase { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface inputBaseEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.inputBase.ojAnimateEnd; - 'ojAnimateStart': oj.inputBase.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'autocompleteChanged': CustomEvent; - 'autofocusChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - } - interface inputBaseSettableProperties extends editableValueSettableProperties { - asyncValidators: Array>; - autocomplete: 'on'|'off'|string; - autofocus: boolean; - name: string; - placeholder: string; - readonly rawValue: RV; - readonly: boolean; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojInputPassword extends inputBase { - value: string|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputPassword.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputPassword.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojInputPassword { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputPasswordEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputPassword.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputPassword.ojAnimateStart; - 'valueChanged': CustomEvent; - } - interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { - value: string|null; - translations: {regexp?: {messageDetail?: string, messageSummary?: string}, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojInputText extends inputBase { - clearIcon: 'never'|'always'|'conditional'; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - list: string; - virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; - onClearIconChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onListChanged: (event: CustomEvent)=> any; - onVirtualKeyboardChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojInputText.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojInputText.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojInputText { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojInputTextEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojInputText.ojAnimateEnd; - 'ojAnimateStart': oj.ojInputText.ojAnimateStart; - 'clearIconChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'listChanged': CustomEvent; - 'virtualKeyboardChanged': CustomEvent; - } - interface ojInputTextSettableProperties extends inputBaseSettableProperties { - clearIcon: 'never'|'always'|'conditional'; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - list: string; - virtualKeyboard: 'auto'|'email'|'number'|'search'|'tel'|'text'|'url'; - } - -} -declare namespace oj { - class ojTextArea extends inputBase { - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - rows: number; - onConverterChanged: (event: CustomEvent)=> any; - onRowsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTextArea.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTextArea.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojTextArea { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojTextAreaEventMap extends oj.inputBaseEventMap { - 'ojAnimateEnd': oj.ojTextArea.ojAnimateEnd; - 'ojAnimateStart': oj.ojTextArea.ojAnimateStart; - 'converterChanged': CustomEvent; - 'rowsChanged': CustomEvent; - } - interface ojTextAreaSettableProperties extends inputBaseSettableProperties { - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - rows: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts deleted file mode 100644 index f6608c7f7d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojkeyset/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export class ExpandAllKeySet extends KeySet { - constructor(); - add(keys: Set|Array): ExpandAllKeySet - addAll(): ExpandAllKeySet - clear(): ExpandedKeySet - delete(keys: Set|Array): ExpandAllKeySet - deletedValues(): Set; - has(): ExpandAllKeySet - isAddAll(): boolean; - } - -export class ExpandedKeySet extends KeySet { - constructor(keys?: Set|Array); - add(keys: Set|Array): ExpandedKeySet - addAll(): ExpandAllKeySet - clear(): ExpandedKeySet - delete(keys: Set|Array): ExpandedKeySet - has(key: K): boolean; - isAddAll(): boolean; - values(): Set; - } - -export abstract class KeySet { - abstract add>(keys: Set|Array): KS - abstract addAll>(): KS - abstract clear>(): KS - abstract delete>(keys: Set|Array): KS - abstract has(key: K): boolean; - abstract isAddAll(): boolean; - } - - export as namespace KeySet; diff --git a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts deleted file mode 100644 index 71d1945a6c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout-keyset/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -export class ObservableExpandedKeySet { - constructor(initialValue?: KeySet.ExpandedKeySet|KeySet.ExpandAllKeySet); - add(keys: Set|Array): ObservableExpandedKeySet; - addAll(): ObservableExpandedKeySet; - clear(): ObservableExpandedKeySet; - delete(keys: Set|Array): ObservableExpandedKeySet; - } - diff --git a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts deleted file mode 100644 index 21bf95f0dc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout-model/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -declare namespace oj { - class KnockoutUtils { - static map(m: object, callback?: ((param0: object)=> void), array?: boolean): Array>|KnockoutObservableArray; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts b/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts deleted file mode 100644 index f388d46c92..0000000000 --- a/types/@oracle/oraclejet/ojs/ojknockout/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -declare namespace oj { - namespace KnockoutTemplateUtils { - function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object)=> void); - } - -} -declare namespace oj { - class ResponsiveKnockoutUtils { - static createMediaQueryObservable(queryString: string): KnockoutObservable; - static createScreenRangeObservable(): KnockoutObservable; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts deleted file mode 100644 index c10e0daf17..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlabel/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// -declare namespace oj { - class ojLabel extends baseComponent { - for: string|null; - help: {definition?: string|null, source?: string|null}; - labelId: string|null; - showRequired: boolean|null; - translations: {tooltipHelp?: string, tooltipRequired?: string}; - onForChanged: (event: CustomEvent)=> any; - onHelpChanged: (event: CustomEvent)=> any; - onLabelIdChanged: (event: CustomEvent)=> any; - onShowRequiredChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojLabelEventMap extends oj.baseComponentEventMap { - 'forChanged': CustomEvent; - 'helpChanged': CustomEvent; - 'labelIdChanged': CustomEvent; - 'showRequiredChanged': CustomEvent; - } - interface ojLabelSettableProperties extends baseComponentSettableProperties { - for: string|null; - help: {definition?: string|null, source?: string|null}; - labelId: string|null; - showRequired: boolean|null; - translations: {tooltipHelp?: string, tooltipRequired?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts b/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts deleted file mode 100644 index c1649bedd7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlabelvalue/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojLabelValue extends JetElement { - labelEdge: 'start'|'top'|'inherit'; - labelWidth: string; - onLabelEdgeChanged: (event: CustomEvent)=> any; - onLabelWidthChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojLabelValueEventMap extends oj.JetElementEventMap { - 'labelEdgeChanged': CustomEvent; - 'labelWidthChanged': CustomEvent; - } - interface ojLabelValueSettableProperties extends JetSettableProperties { - labelEdge: 'start'|'top'|'inherit'; - labelWidth: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts b/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts deleted file mode 100644 index 36f940f25c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlegend/index.d.ts +++ /dev/null @@ -1,230 +0,0 @@ -/// -/// -declare namespace oj { - class ojLegend extends dvtBaseComponent> { - as: string; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - expanded: KeySet.KeySet|null; - halign: 'center'|'end'|'start'; - hiddenCategories: Array; - hideAndShowBehavior: 'on'|'off'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - orientation: 'horizontal'|'vertical'; - scrolling: 'off'|'asNeeded'; - symbolHeight: number; - symbolWidth: number; - textStyle?: object; - valign: 'middle'|'bottom'|'top'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAsChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHalignChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHideAndShowBehaviorChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onScrollingChanged: (event: CustomEvent)=> any; - onSymbolHeightChanged: (event: CustomEvent)=> any; - onSymbolWidthChanged: (event: CustomEvent)=> any; - onTextStyleChanged: (event: CustomEvent)=> any; - onValignChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojLegend.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojLegend.NodeContext|null; - getItem(subIdPath: Array): oj.ojLegend.ItemContext|null; - getPreferredSize(): oj.ojLegend.PreferredSize|null; - getSection(subIdPath: Array): oj.ojLegend.SectionContext|null; - } - namespace ojLegend { - class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { - - } - } - interface ojLegendEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojLegend.ojDrill; - 'asChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'halignChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'hideAndShowBehaviorChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'scrollingChanged': CustomEvent; - 'symbolHeightChanged': CustomEvent; - 'symbolWidthChanged': CustomEvent; - 'textStyleChanged': CustomEvent; - 'valignChanged': CustomEvent; - } - interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { - as: string; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - expanded: KeySet.KeySet|null; - halign: 'center'|'end'|'start'; - hiddenCategories: Array; - hideAndShowBehavior: 'on'|'off'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - orientation: 'horizontal'|'vertical'; - scrolling: 'off'|'asNeeded'; - symbolHeight: number; - symbolWidth: number; - textStyle?: object; - valign: 'middle'|'bottom'|'top'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojLegend { - type ItemContext = - { - text: string - } - } - namespace ojLegend { - type NodeContext = - { - itemIndex: number, sectionIndexPath: Array, subId: string - } - } - namespace ojLegend { - type PreferredSize = - { - width: number, height: number - } - } - namespace ojLegend { - type SectionContext = - { - title: string, sections: Array, items: Array, getSection: {title: string, sections: string, items: boolean}, getItems: {text: string} - } - } - -} -declare namespace oj { - class ojLegendItem extends JetElement { - borderColor?: string; - categories?: Array; - categoryVisibility?: 'hidden'|'visible'; - color?: string; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineWidth?: number; - markerColor?: string; - markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - markerSvgClassName?: string; - markerSvgStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - shortDesc?: string; - source?: string; - svgClassName?: string; - svgStyle?: object; - symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; - text: string; - onBorderColorChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onCategoryVisibilityChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLineStyleChanged: (event: CustomEvent)=> any; - onLineWidthChanged: (event: CustomEvent)=> any; - onMarkerColorChanged: (event: CustomEvent)=> any; - onMarkerShapeChanged: (event: CustomEvent)=> any; - onMarkerSvgClassNameChanged: (event: CustomEvent)=> any; - onMarkerSvgStyleChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onSymbolTypeChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojLegendItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'categoryVisibilityChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'lineStyleChanged': CustomEvent; - 'lineWidthChanged': CustomEvent; - 'markerColorChanged': CustomEvent; - 'markerShapeChanged': CustomEvent; - 'markerSvgClassNameChanged': CustomEvent; - 'markerSvgStyleChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'symbolTypeChanged': CustomEvent; - 'textChanged': CustomEvent; - } - interface ojLegendItemSettableProperties extends JetSettableProperties { - borderColor?: string; - categories?: Array; - categoryVisibility?: 'hidden'|'visible'; - color?: string; - drilling?: 'on'|'off'|'inherit'; - lineStyle?: 'dotted'|'dashed'|'solid'; - lineWidth?: number; - markerColor?: string; - markerShape: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - markerSvgClassName?: string; - markerSvgStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - shortDesc?: string; - source?: string; - svgClassName?: string; - svgStyle?: object; - symbolType?: 'line'|'lineWithMarker'|'image'|'marker'; - text: string; - } - -} -declare namespace oj { - class ojLegendSection extends JetElement { - collapsible?: 'on'|'off'; - text?: string; - textHalign?: 'center'|'end'|'start'; - textStyle?: object; - onCollapsibleChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - onTextHalignChanged: (event: CustomEvent)=> any; - onTextStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojLegendSectionEventMap extends oj.JetElementEventMap { - 'collapsibleChanged': CustomEvent; - 'textChanged': CustomEvent; - 'textHalignChanged': CustomEvent; - 'textStyleChanged': CustomEvent; - } - interface ojLegendSectionSettableProperties extends JetSettableProperties { - collapsible?: 'on'|'off'; - text?: string; - textHalign?: 'center'|'end'|'start'; - textStyle?: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts deleted file mode 100644 index ed2b3d981f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlistdataproviderview/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// -declare namespace oj { - class ListDataProviderView implements DataProvider { - dataMapping: DataMapping; - from: any; - offset: number; - sortCriteria: SortCriterion[]; - constructor(dataProvider: DataProvider, options?: {from?: object, offset?: number, sortCriteria?: SortCriterion[], dataMapping?: DataMapping}); - addEventListener(eventType: string, listener: EventListener): void - containsKeys(params: FetchByKeysParameters): Promise> - dispatchEvent(evt: Event): boolean - fetchByKeys(params: FetchByKeysParameters): Promise> - fetchByOffset(params: FetchByOffsetParameters): Promise> - fetchFirst>(params?: FetchListParameters): AsyncIterable - getCapability(capabilityName: string) - getTotalSize(): Promise; - isEmpty(): 'yes'|'no'|'unknown'; - removeEventListener(eventType: string, listener: EventListener): void - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts b/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts deleted file mode 100644 index cb4289b6ea..0000000000 --- a/types/@oracle/oraclejet/ojs/ojlistview/index.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojListView extends baseComponent> { - as: string; - currentItem: K; - data: oj.DataProvider; - dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; - drillMode: 'collapsible'|'none'; - expanded: KeySet.KeySet; - readonly firstSelectedItem: {key: K, data: D}; - groupHeaderPosition: 'static'|'sticky'; - item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; - scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - selectionRequired: boolean; - translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onDrillModeChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onFirstSelectedItemChanged: (event: CustomEvent)=> any; - onGroupHeaderPositionChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onScrollPolicyChanged: (event: CustomEvent)=> any; - onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRequiredChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojListView.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojListView.ojAnimateStart)=> any; - onOjBeforeCollapse: (event: oj.ojListView.ojBeforeCollapse)=> any; - onOjBeforeCurrentItem: (event: oj.ojListView.ojBeforeCurrentItem)=> any; - onOjBeforeExpand: (event: oj.ojListView.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojListView.ojCollapse)=> any; - onOjCopy: (event: oj.ojListView.ojCopy)=> any; - onOjCut: (event: oj.ojListView.ojCut)=> any; - onOjExpand: (event: oj.ojListView.ojExpand)=> any; - onOjPaste: (event: oj.ojListView.ojPaste)=> any; - onOjReorder: (event: oj.ojListView.ojReorder)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojListView.ContextByNode|null; - getDataForVisibleItem(context: {key?: K, index?: number, parent?: Element}): D; - refresh(): void; - scrollToItem(item: {key: K}): void; - } - namespace ojListView { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: K, previousItem: Element, key: K, item: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojCopy extends CustomEvent<{items: Array, [propName: string]: any}> { - - } - - class ojCut extends CustomEvent<{items: Array, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{key: K, item: Element, [propName: string]: any}> { - - } - - class ojPaste extends CustomEvent<{item: Element, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{items: Array, position: string, reference: Element, [propName: string]: any}> { - - } - } - interface ojListViewEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojListView.ojAnimateEnd; - 'ojAnimateStart': oj.ojListView.ojAnimateStart; - 'ojBeforeCollapse': oj.ojListView.ojBeforeCollapse; - 'ojBeforeCurrentItem': oj.ojListView.ojBeforeCurrentItem; - 'ojBeforeExpand': oj.ojListView.ojBeforeExpand; - 'ojCollapse': oj.ojListView.ojCollapse; - 'ojCopy': oj.ojListView.ojCopy; - 'ojCut': oj.ojListView.ojCut; - 'ojExpand': oj.ojListView.ojExpand; - 'ojPaste': oj.ojListView.ojPaste; - 'ojReorder': oj.ojListView.ojReorder; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'drillModeChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'firstSelectedItemChanged': CustomEvent; - 'groupHeaderPositionChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'scrollPolicyChanged': CustomEvent; - 'scrollPolicyOptionsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRequiredChanged': CustomEvent; - } - interface ojListViewSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: K; - data: oj.DataProvider; - dnd: {drag?: {items: {dataTypes?: string|Array, drag?: ((param0: Event)=> void), dragEnd?: ((param0: Event)=> void), dragStart?: ((param0: Event, param1: {items:Array})=> void)}}, drop?: {items: {dataTypes?: string|Array, dragEnter?: ((param0: Event, param1: {item:Element})=> void), dragLeave?: ((param0: Event, param1: {item:Element})=> void), dragOver?: ((param0: Event, param1: {item:Element})=> void), drop?: ((param0: Event, param1: oj.ojListView.ItemsDropContext)=> void)}}, reorder: {items: 'enabled'|'disabled'}}; - drillMode: 'collapsible'|'none'; - expanded: KeySet.KeySet; - readonly firstSelectedItem: {key: K, data: D}; - groupHeaderPosition: 'static'|'sticky'; - item: {focusable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean, renderer?: ((param0: oj.ojListView.ItemContext) => {insert: Element|string}|undefined)|null, selectable?: ((param0: oj.ojListView.ItemContext) => boolean)|boolean}; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize?: number, maxCount?: number, scroller?: Element}; - scrollPosition: {x?: number, y?: number, index?: number, parent?: K, key?: K, offsetX?: number, offsetY?: number}; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - selectionRequired: boolean; - translations: {accessibleNavigateSkipItems?: string, accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderInsideItem?: string, accessibleReorderTouchInstructionText?: string, indexerCharacters?: string, labelCopy?: string, labelCut?: string, labelPaste?: string, labelPasteAfter?: string, labelPasteBefore?: string, msgFetchingData?: string, msgNoData?: string}; - } - namespace ojListView { - type ContextByNode = - { - subId: string, key: K, index: number, parent?: Element, group?: boolean - } - } - namespace ojListView { - type ItemContext = - { - datasource: oj.DataProvider, index: number, key: K, data: D, parentElement: Element, depth?: number, parentKey?: K, leaf?: boolean - } - } - namespace ojListView { - type ItemsDropContext = - { - item: Element, position: 'before'|'after'|'inside', reorder: boolean - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts b/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts deleted file mode 100644 index f355ffc77b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmasonrylayout/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/// -declare namespace oj { - class ojMasonryLayout extends baseComponent { - reorderHandle: string|null; - translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; - onReorderHandleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojMasonryLayout.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMasonryLayout.ojAnimateStart)=> any; - onOjBeforeInsert: (event: oj.ojMasonryLayout.ojBeforeInsert)=> any; - onOjBeforeRemove: (event: oj.ojMasonryLayout.ojBeforeRemove)=> any; - onOjBeforeReorder: (event: oj.ojMasonryLayout.ojBeforeReorder)=> any; - onOjBeforeResize: (event: oj.ojMasonryLayout.ojBeforeResize)=> any; - onOjInsert: (event: oj.ojMasonryLayout.ojInsert)=> any; - onOjRemove: (event: oj.ojMasonryLayout.ojRemove)=> any; - onOjReorder: (event: oj.ojMasonryLayout.ojReorder)=> any; - onOjResize: (event: oj.ojMasonryLayout.ojResize)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - insertTile(selector: string, index: number): void; - refresh(): void; - removeTile(selector: string): void; - resizeTile(selector: string, sizeStyleClass: string): void; - } - namespace ojMasonryLayout { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { - - } - - class ojBeforeRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { - - } - - class ojBeforeReorder extends CustomEvent<{tile: Element, fromIndex: number, [propName: string]: any}> { - - } - - class ojBeforeResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { - - } - - class ojInsert extends CustomEvent<{tile: Element, index: number, [propName: string]: any}> { - - } - - class ojRemove extends CustomEvent<{tile: Element, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{tile: Element, fromIndex: number, toIndex: number, [propName: string]: any}> { - - } - - class ojResize extends CustomEvent<{tile: Element, previousSizeStyleClass: string, sizeStyleClass: string, [propName: string]: any}> { - - } - } - interface ojMasonryLayoutEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojMasonryLayout.ojAnimateEnd; - 'ojAnimateStart': oj.ojMasonryLayout.ojAnimateStart; - 'ojBeforeInsert': oj.ojMasonryLayout.ojBeforeInsert; - 'ojBeforeRemove': oj.ojMasonryLayout.ojBeforeRemove; - 'ojBeforeReorder': oj.ojMasonryLayout.ojBeforeReorder; - 'ojBeforeResize': oj.ojMasonryLayout.ojBeforeResize; - 'ojInsert': oj.ojMasonryLayout.ojInsert; - 'ojRemove': oj.ojMasonryLayout.ojRemove; - 'ojReorder': oj.ojMasonryLayout.ojReorder; - 'ojResize': oj.ojMasonryLayout.ojResize; - 'reorderHandleChanged': CustomEvent; - } - interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { - reorderHandle: string|null; - translations: {labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts deleted file mode 100644 index cd2c08461c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmenu/index.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/// -declare namespace oj { - class ojMenu extends baseComponent { - disabled: boolean; - openOptions: oj.ojMenu.OpenOptions; - translations: {ariaFocusSkipLink?: string, labelCancel?: string}; - onDisabledChanged: (event: CustomEvent)=> any; - onOpenOptionsChanged: (event: CustomEvent)=> any; - onOjAction: (event: oj.ojMenu.ojAction)=> any; - onOjAnimateEnd: (event: oj.ojMenu.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMenu.ojAnimateStart)=> any; - onOjBeforeOpen: (event: oj.ojMenu.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojMenu.ojClose)=> any; - onOjOpen: (event: oj.ojMenu.ojOpen)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - open(event?: object, openOptions?: oj.ojMenu.OpenOptions): void; - refresh(): void; - } - namespace ojMenu { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{event: Event, [propName: string]: any}> { - - } - } - interface ojMenuEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojMenu.ojAction; - 'ojAnimateEnd': oj.ojMenu.ojAnimateEnd; - 'ojAnimateStart': oj.ojMenu.ojAnimateStart; - 'ojBeforeOpen': oj.ojMenu.ojBeforeOpen; - 'ojClose': oj.ojMenu.ojClose; - 'ojOpen': oj.ojMenu.ojOpen; - 'disabledChanged': CustomEvent; - 'openOptionsChanged': CustomEvent; - } - interface ojMenuSettableProperties extends baseComponentSettableProperties { - disabled: boolean; - openOptions: oj.ojMenu.OpenOptions; - translations: {ariaFocusSkipLink?: string, labelCancel?: string}; - } - namespace ojMenu { - type OpenOptions = - { - display?: string, initialFocus?: string, launcher?: string|Element, position?: oj.ojMenu.Position - } - } - namespace ojMenu { - type Position = - { - my?: oj.ojMenu.PositionAlign, at?: oj.ojMenu.PositionAlign, offset?: oj.ojMenu.PositionPoint, of?: string|oj.ojMenu.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' - } - } - namespace ojMenu { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojMenu { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts b/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts deleted file mode 100644 index 0f380df2f2..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmenuselectmany/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/// -/// -declare namespace oj { - class ojMenuSelectMany extends JetElement { - disabled: boolean; - options: Array|oj.DataProvider|null; - value: Array; - onDisabledChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojMenuSelectManyEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojMenuSelectManySettableProperties extends JetSettableProperties { - disabled: boolean; - options: Array|oj.DataProvider|null; - value: Array; - } - namespace ojMenuSelectMany { - type Option = - { - id?: string, disabled?: boolean, label: string, value: any - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts deleted file mode 100644 index 8be478bd06..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessage/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -declare namespace oj { - class ojMessage extends JetElement { - message: oj.ojMessage.Message; - translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; - onMessageChanged: (event: CustomEvent)=> any; - - onTranslationsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojMessage.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojMessage.ojAnimateStart)=> any; - onOjClose: (event: oj.ojMessage.ojClose)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - namespace ojMessage { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{element: Element, action: 'open'|'close', endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{message: object, [propName: string]: any}> { - - } - } - interface ojMessageEventMap extends oj.JetElementEventMap { - 'ojAnimateEnd': oj.ojMessage.ojAnimateEnd; - 'ojAnimateStart': oj.ojMessage.ojAnimateStart; - 'ojClose': oj.ojMessage.ojClose; - 'messageChanged': CustomEvent; - 'translationsChanged': CustomEvent; - } - interface ojMessageSettableProperties extends JetSettableProperties { - message: oj.ojMessage.Message; - translations: {categories?: {confirmation?: string, error?: string, info?: string, warning?: string}, labelCloseIcon?: string}; - } - namespace ojMessage { - type Message = - { - icon?: string, category?: string, severity?: 'error'|'warning'|'confirmation'|'info'|'none', timestamp?: string, summary?: string, detail?: string, autoTimeout?: number, closeAffordance?: 'none'|'defaults', sound?: string - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts deleted file mode 100644 index 3246de390f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessages/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/// -/// -declare namespace oj { - class ojMessages extends JetElement { - display: 'general'|'notification'; - messages: Array | null | oj.DataProvider; - position: oj.ojMessages.Position|null; - translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; - onDisplayChanged: (event: CustomEvent)=> any; - onMessagesChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - - onTranslationsChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(associated: object): void; - closeAll(closeFilter?: (message: oj.ojMessage.Message) => boolean): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojMessagesEventMap extends oj.JetElementEventMap { - 'displayChanged': CustomEvent; - 'messagesChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'translationsChanged': CustomEvent; - } - interface ojMessagesSettableProperties extends JetSettableProperties { - display: 'general'|'notification'; - messages: Array | null | oj.DataProvider; - position: oj.ojMessages.Position|null; - translations: {ariaLiveRegion?: {navigationFromKeyboard?: string, navigationToKeyboard?: string, navigationToTouch?: string, newMessage?: string}, labelLandmark?: string}; - } - namespace ojMessages { - type Position = - { - my?: oj.ojMessages.PositionAlign, at?: oj.ojMessages.PositionAlign, offset?: oj.ojMessages.PositionPoint, of?: string|oj.ojMessages.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'none' - } - } - namespace ojMessages { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojMessages { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts b/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts deleted file mode 100644 index e65a3ddcc3..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmessaging/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -declare namespace oj { - class Message { - detail: string; - severity: string|number; - summary: string; - constructor(summary: string, detail: string, severity?: number|string); - static getMaxSeverity(messages?: Array): number; - static getSeverityLevel(severity?: string|number|undefined): number; - static getSeverityType(level?: string|number|undefined): string; - static isValid(messages: Array): boolean; - } - namespace Message { - enum SEVERITY_LEVEL { - FATAL = "5", - ERROR = "4", - WARNING = "3", - INFO = "2", - CONFIRMATION = "1", - } - enum SEVERITY_TYPE { - CONFIRMATION = "confirmation", - INFO = "info", - WARNING = "warning", - ERROR = "error", - FATAL = "fatal", - } - } - - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts deleted file mode 100644 index 6e3ebe4118..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodel/index.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -declare namespace oj { - class Collection { - changes: Array; - comparator: null|string|((param0: oj.Model, param1?: oj.Model)=> number); - customPagingOptions: ((response: object)=> oj.Collection.CustomPagingOptionsReturn|null)|null; - customURL: ((param0: string, param1: oj.Collection, param2: object)=> string|Object|null)|null; - fetchSize: number; - hasMore: boolean; - lastFetchCount: number; - lastFetchSize: number; - length: number; - model: object; - modelLimit: number; - models: Array; - offset: number; - omitLanguageHeader: boolean; - parse: ((param0: object)=> Object); - sortDirection: number; - totalResults: number; - url: null|string|(()=> string); - constructor(models?: Array, options?: object); - static extend(properties?: {parse?: (data: any)=> any, model?: oj.Model, url?: string, initialize?: (models: Array, options: Object)=> void, comparator?: null|string|((model1: oj.Model, model2?: oj.Model)=> number), fetchSize?: number, modelLimit?: number, [propName: string]: any}, classProperties?: object): any; - abort(): Promise; - add(m: oj.Model|object|Array|Array, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; - any(iterator: ((param0: object)=> void), context?: object): boolean; - at(index: number, options?: {fetchSize?: number, deferred?: boolean, [propName: string]: any}): oj.Model|Promise|null; - clone(): oj.Collection; - contains(model: object, options?: object): boolean|Promise; - create(attributes?: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|boolean|Promise; - difference(...var_args: (Array)[]): Array; - each(iterator: ((param0: oj.Model)=> void), context?: object): undefined; - fetch(options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, add?: boolean, set?: boolean, startIndex?: number, startID?: Object, since?: Object, until?: Object, fetchSize?: number, [propName: string]: any}): object; - filter(iterator: ((param0: oj.Model)=> void), context?: object): Array; - findWhere(attrs: object|Array, options?: {deferred?: boolean, [propName: string]: any}): oj.Model|Promise; - first(n?: number, options?: object): Array|null|Promise; - get(id: object|string, options?: object): oj.Model|null|Promise; - getByCid(clientId: string): oj.Model|null; - groupBy(iterator: string|((param0: oj.Model)=> object), context?: object): object; - include(model: object, options?: object): boolean|Promise; - indexBy(iterator: string|((param0: oj.Model)=> void), context?: object): object; - indexOf(model: object, options?: object): number|Promise; - initial(n?: number): Array; - isEmpty(): boolean; - isRangeLocal(start: number, count: number): boolean; - last(n?: number, options?: object): Promise|Array|null; - lastIndexOf(model: oj.Model, fromIndex?: number): number; - listenTo(otherObj: object, eventType: string, callback: Function): undefined; - listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; - map(iterator: ((param0: oj.Model)=> object), context?: object): Array; - max(iterator: ((param0: oj.Model)=> object), context?: object): object; - min(iterator: ((param0: object)=> void), context?: object): object; - modelId(attrs: object): null|string; - next(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object|null; - off(eventType?: string|object, callback?: Function, context?: object): undefined; - on(eventType: string|object, callback: Function, context?: object): undefined; - once(eventType: string, callback: Function, context?: object): undefined; - pluck(attr: string): Array; - pop(options?: {silent?: boolean, deferred?: boolean, [propName: string]: any}): oj.Model|Promise; - previous(n: number, options?: {success?: (collection: oj.Collection, response: Object, options: Object)=> void, error?: (collection: oj.Collection, xhr: Object, options: Object)=> void, [propName: string]: any}): object; - push(m: oj.Model|object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|undefined; - refresh(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise; - remove(m: oj.Model|Array, options?: object): Array|object; - reset(data?: object, options?: {silent?: boolean, [propName: string]: any}): oj.Model|Array; - rest(n?: number, options?: object): Array|Promise; - set(models: object, options?: {add?: boolean, remove?: boolean, merge?: boolean, silent?: boolean, deferred?: boolean, [propName: string]: any}): Promise|null; - setFetchSize(n: number): undefined; - setModelLimit(n: number): undefined; - setRangeLocal(start: number, count: number): Promise; - shift(options?: object): oj.Model|Promise|null; - size(): number; - slice(start: number, end?: number, options?: object): Promise>|Array; - sort(options?: {silent?: boolean, startIndex?: number, [propName: string]: any}): Promise|null; - sortBy(iterator: string|((param0: oj.Model)=> object), context?: object): Array; - sortedIndex(comparator: string|((param0: oj.Model, param1?: oj.Model)=> object)): number; - stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; - sync(method: string, collection: oj.Collection, options?: {success?: (json?: Array)=> void, error?: (xhr: Object, status: Object, error: Object)=> void, [propName: string]: any}): object; - toJSON(): Array; - trigger(eventType: string): undefined; - unshift(m: object, options?: {silent?: boolean, at?: number, merge?: boolean, sort?: boolean, force?: boolean, deferred?: boolean, [propName: string]: any}): Promise>|Array; - whenReady(): Promise; - where(attrs: object|Array, options?: object): Promise>|Array; - whereToCollection(attrs: object|Array, options?: object): oj.Collection|Promise; - without(...var_args: (oj.Model)[]): Array; - } - namespace Collection { - type CustomPagingOptionsReturn = - { - totalResults?: number, limit?: number, count?: number, offset?: number, hasMore?: boolean - } - } - namespace Collection { - type SetRangeLocalPromise = - { - start: number, count: number, models: Array - } - } - -} -declare namespace oj { - class Model { - attributes: object; - customURL: ((param0: string, param1: oj.Model, param2: object)=> string|Object|null)|null; - defaults: object; - id: string|null; - idAttribute: string|null; - omitLanguageHeader: boolean; - parse: ((param0: object)=> Object); - parseSave: ((param0: object)=> Object); - urlRoot: string|null; - validate: ((param0: object, param1: Object)=> string|Object|null)|null; - validationError: string|object|null; - constructor(attributes?: object, options?: object); - static extend(properties?: {parse?: (data: any)=> any, parseSave?: (data: any)=> any, urlRoot?: string, initialize?: (models: Array, options: Object)=> void, validate?: null|object|string|((attributes: Object, options?: oj.Model)=> number), [propName: string]: any}, classProperties?: object): any; - changedAttributes(attributes?: object): object|boolean; - clear(options?: object): oj.Model|boolean; - clone(): oj.Model; - destroy(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, wait?: boolean, [propName: string]: any}): boolean; - fetch(options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, [propName: string]: any}): object; - get(property: string): object; - has(property: string): boolean; - hasChanged(attribute?: string): boolean; - invert(): object; - isNew(): boolean; - isValid(): boolean; - keys(): Array; - listenTo(otherObj: object, eventType: string, callback: Function): undefined; - listenToOnce(otherObj: object, eventType: string, callback: Function): undefined; - matches(attrs: object): ((param0: oj.Model)=> boolean); - off(eventType?: string|object, callback?: Function, context?: object): undefined; - omit(keys: Array|object): object; - on(eventType: string|object, callback: Function, context?: object): undefined; - once(eventType: string, callback: Function, context?: object): undefined; - pairs(): object; - pick(keys: Array|object): object; - previous(attr: string): object; - previousAttributes(): object; - save(attributes?: object, options?: {success?: (model: oj.Model, response: Object, options: Object)=> void, error?: (model: oj.Model, xhr: Object, options: Object)=> void, contentType?: string, valdiate?: boolean, wait?: boolean, patch?: boolean, attrs?: Object, [propName: string]: any}): object|boolean; - set(property: string|object, value?: object, options?: object): oj.Model|boolean; - stopListening(otherObj?: object, eventType?: string, callback?: Function): undefined; - sync(method: string, model: oj.Model, options?: object): object; - toJSON(): object; - trigger(eventType: string): undefined; - unset(property: string, options?: object): boolean; - url(): string|null; - values(): Array; - } - -} -declare namespace oj { - class OAuth { - constructor(attributes: object, header: string); - cleanAccessTokenRequest(): undefined; - cleanAccessTokenResponse(): undefined; - clientCredentialGrant(): undefined; - getAccessTokenRequest(): object; - getAccessTokenResponse(): object; - getHeader(): object; - isInitialized(): boolean; - setAccessTokenRequest(data: object): undefined; - setAccessTokenResponse(data: object): undefined; - } - -} -declare namespace oj { - class URLError { - constructor(); - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts deleted file mode 100644 index f2b9b3db7c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule-element-utils/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class ModuleElementUtils { - } - diff --git a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts deleted file mode 100644 index 5129c36e5a..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule-element/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -declare namespace oj { - interface ModuleElementAnimation { - animate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object, newViewParent: Node, oldViewParent: Node, removeOldView: Function, insertNewView: Function, oldDomNodes: Array}): Promise; - canAnimate(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): boolean; - prepareAnimation(context: {node: Node, isInitial: boolean, oldViewModel: object, newViewModel: object}): object; - } - -} -declare namespace oj { - class ojModule { - animation: object; - config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; - onAnimationChanged: (event: CustomEvent)=> any; - onConfigChanged: (event: CustomEvent)=> any; - onOjTransitionEnd: (event: oj.ojModule.ojTransitionEnd)=> any; - onOjTransitionStart: (event: oj.ojModule.ojTransitionStart)=> any; - onOjViewConnected: (event: oj.ojModule.ojViewConnected)=> any; - onOjViewDisconnected: (event: oj.ojModule.ojViewDisconnected)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojModule { - class ojTransitionEnd extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojTransitionStart extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojViewConnected extends CustomEvent<{viewModel: object, [propName: string]: any}> { - - } - - class ojViewDisconnected extends CustomEvent<{viewModel: object, view: Array, [propName: string]: any}> { - - } - } - interface ojModuleEventMap extends oj.JetElementEventMap { - 'ojTransitionEnd': oj.ojModule.ojTransitionEnd; - 'ojTransitionStart': oj.ojModule.ojTransitionStart; - 'ojViewConnected': oj.ojModule.ojViewConnected; - 'ojViewDisconnected': oj.ojModule.ojViewDisconnected; - 'animationChanged': CustomEvent; - 'configChanged': CustomEvent; - } - interface ojModuleSettableProperties extends JetSettableProperties { - animation: object; - config: {cleanupMode: 'onDisconnect'|'none', view: Array, viewModel: object}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts b/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts deleted file mode 100644 index 3cf1b7ee7e..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmodule/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -declare namespace oj { - namespace ModuleBinding { - var defaults: {viewPath: string, viewSuffix: string, modelPath: string, initializeMethod: string, disposeMethod: string, activatedHandler: string, attachedHandler: string, detachedHandler: string, bindingsAppliedHandler: string, deactivatedHandler: string, transitionCompletedHandler: string}; - } - -} -declare namespace oj.ModuleBinding { - interface ConventionMethods { - dispose(info: {element: Node, valueAccessor: Function}): void; - handleActivated(info: {element: Node, valueAccessor: Function}): Promise|undefined; - handleAttached(info: {element: Node, valueAccessor: Function, fromCache: boolean}): void; - handleBindingsApplied(info: {element: Node, valueAccessor: Function}): void; - handleDeactivated(info: {element: Node, valueAccessor: Function}): void; - handleDetached(info: {element: Node, valueAccessor: Function, cachedNodes: Array}): void; - handleTransitionCompleted(info: {element: Node, valueAccessor: Function}): void; - initialize(info: {element: Node, valueAccessor: Function}): object|undefined; - } - -} -declare namespace ojModule { - var Options: {view: Promise|string|Array|DocumentFragment, viewModel: Promise|Function|object, name: string, viewName: string, require: Function|{instance: any, viewPath: string, modelPath: string}, viewModelFactory: object, params: object, createViewFunction: string, cacheKey: string, lifecycleListener: object, animation: object}; - } - diff --git a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts b/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts deleted file mode 100644 index 6d0592dbea..0000000000 --- a/types/@oracle/oraclejet/ojs/ojmoduleanimations/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -declare namespace oj { - namespace ModuleAnimations { - var coverStart: oj.ModuleElementAnimation; - var coverUp: oj.ModuleElementAnimation; - var fade: oj.ModuleElementAnimation; - var navChild: oj.ModuleElementAnimation; - var navParent: oj.ModuleElementAnimation; - var navSiblingEarlier: oj.ModuleElementAnimation; - var navSiblingLater: oj.ModuleElementAnimation; - var pushEnd: oj.ModuleElementAnimation; - var pushStart: oj.ModuleElementAnimation; - var revealDown: oj.ModuleElementAnimation; - var revealEnd: oj.ModuleElementAnimation; - var zoomIn: oj.ModuleElementAnimation; - var zoomOut: oj.ModuleElementAnimation; - function createAnimation(oldViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewEffect: {effect: oj.AnimationUtils.AnimationMethods, [key:string]: any}|oj.AnimationUtils.AnimationMethods|null, newViewOnTop: boolean): oj.ModuleElementAnimation; - function switcher(callback: (param0: oj.ModuleAnimations.SwitcherCallBackParam) => oj.ModuleAnimations.Animations): oj.ModuleElementAnimation; - } - namespace ModuleAnimations { - type Animations = 'coverStart'|'coverUp'|'fade'|'navChild'|'navParent'|'navSiblingEarlier'|'navSiblingLater'|'pushEnd'|'pushStart'|'revealDown'|'revealEnd'|'zoomIn'|'zoomOut'; - } - namespace ModuleAnimations { - type SwitcherCallBackParam = - { - node: Element, valueAccessor: (()=> any), isInitial: boolean, oldViewModel: any, newViewModel: any - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts b/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts deleted file mode 100644 index 9d1c348467..0000000000 --- a/types/@oracle/oraclejet/ojs/ojnavigationlist/index.d.ts +++ /dev/null @@ -1,253 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojNavigationList extends baseComponent> { - as: string; - currentItem: K; - data: oj.DataProvider|null; - display: 'all'|'icons'; - drillMode: 'none'|'collapsible'|'sliding'; - edge: 'top'|'start'; - expanded: KeySet.KeySet; - hierarchyMenuThreshold: number; - item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - rootLabel: string|null; - selection: K; - translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onDrillModeChanged: (event: CustomEvent)=> any; - onEdgeChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHierarchyMenuThresholdChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onOverflowChanged: (event: CustomEvent)=> any; - onRootLabelChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojNavigationList.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojNavigationList.ojAnimateStart)=> any; - onOjBeforeCollapse: (event: oj.ojNavigationList.ojBeforeCollapse)=> any; - onOjBeforeCurrentItem: (event: oj.ojNavigationList.ojBeforeCurrentItem)=> any; - onOjBeforeExpand: (event: oj.ojNavigationList.ojBeforeExpand)=> any; - onOjBeforeSelect: (event: oj.ojNavigationList.ojBeforeSelect)=> any; - onOjCollapse: (event: oj.ojNavigationList.ojCollapse)=> any; - onOjExpand: (event: oj.ojNavigationList.ojExpand)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojNavigationList.NodeContext|null; - refresh(): void; - } - namespace ojNavigationList { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - } - interface ojNavigationListEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojNavigationList.ojAnimateEnd; - 'ojAnimateStart': oj.ojNavigationList.ojAnimateStart; - 'ojBeforeCollapse': oj.ojNavigationList.ojBeforeCollapse; - 'ojBeforeCurrentItem': oj.ojNavigationList.ojBeforeCurrentItem; - 'ojBeforeExpand': oj.ojNavigationList.ojBeforeExpand; - 'ojBeforeSelect': oj.ojNavigationList.ojBeforeSelect; - 'ojCollapse': oj.ojNavigationList.ojCollapse; - 'ojExpand': oj.ojNavigationList.ojExpand; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'drillModeChanged': CustomEvent; - 'edgeChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'hierarchyMenuThresholdChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'overflowChanged': CustomEvent; - 'rootLabelChanged': CustomEvent; - 'selectionChanged': CustomEvent; - } - interface ojNavigationListSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: K; - data: oj.DataProvider|null; - display: 'all'|'icons'; - drillMode: 'none'|'collapsible'|'sliding'; - edge: 'top'|'start'; - expanded: KeySet.KeySet; - hierarchyMenuThreshold: number; - item: {renderer?: (((context: oj.ojNavigationList.ItemContext) => void)|null), selectable?: (((context: oj.ojNavigationList.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - rootLabel: string|null; - selection: K; - translations: {defaultRootLabel?: string, hierMenuBtnLabel?: string, previousIcon?: string}; - } - namespace ojNavigationList { - type ItemContext = - { - componentElement: Element, datasource?: oj.DataProvider, index: number, key: any, data: any, parentElement: Element - } - } - namespace ojNavigationList { - type NodeContext = - { - subId: string, index: number, key: K, group: boolean, parent?: Element - } - } - -} -declare namespace oj { - class ojTabBar extends baseComponent> { - as: string; - currentItem: any; - data: oj.DataProvider|null; - display: 'all'|'icons'; - edge: 'top'|'bottom'|'start'|'end'; - item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - reorderable: 'enabled'|'disabled'; - selection: any; - truncation: 'none'|'progressive'; - translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; - onAsChanged: (event: CustomEvent)=> any; - onCurrentItemChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onEdgeChanged: (event: CustomEvent)=> any; - onItemChanged: (event: CustomEvent)=> any; - onOverflowChanged: (event: CustomEvent)=> any; - onReorderableChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onTruncationChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTabBar.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTabBar.ojAnimateStart)=> any; - onOjBeforeCurrentItem: (event: oj.ojTabBar.ojBeforeCurrentItem)=> any; - onOjBeforeDeselect: (event: oj.ojTabBar.ojBeforeDeselect)=> any; - onOjBeforeRemove: (event: oj.ojTabBar.ojBeforeRemove)=> any; - onOjBeforeSelect: (event: oj.ojTabBar.ojBeforeSelect)=> any; - onOjDeselect: (event: oj.ojTabBar.ojDeselect)=> any; - onOjRemove: (event: oj.ojTabBar.ojRemove)=> any; - onOjReorder: (event: oj.ojTabBar.ojReorder)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTabBar.NodeContext|null; - refresh(): void; - } - namespace ojTabBar { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCurrentItem extends CustomEvent<{previousKey: any, previousItem: Element, key: any, item: Element, [propName: string]: any}> { - - } - - class ojBeforeDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { - - } - - class ojBeforeRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{key: any, item: Element, [propName: string]: any}> { - - } - - class ojDeselect extends CustomEvent<{fromKey: any, fromItem: Element, toKey: any, toItem: Element, [propName: string]: any}> { - - } - - class ojRemove extends CustomEvent<{item: Element, key: any, [propName: string]: any}> { - - } - - class ojReorder extends CustomEvent<{item: Element, position: 'before'|'after', reference: Element, [propName: string]: any}> { - - } - } - interface ojTabBarEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojTabBar.ojAnimateEnd; - 'ojAnimateStart': oj.ojTabBar.ojAnimateStart; - 'ojBeforeCurrentItem': oj.ojTabBar.ojBeforeCurrentItem; - 'ojBeforeDeselect': oj.ojTabBar.ojBeforeDeselect; - 'ojBeforeRemove': oj.ojTabBar.ojBeforeRemove; - 'ojBeforeSelect': oj.ojTabBar.ojBeforeSelect; - 'ojDeselect': oj.ojTabBar.ojDeselect; - 'ojRemove': oj.ojTabBar.ojRemove; - 'ojReorder': oj.ojTabBar.ojReorder; - 'asChanged': CustomEvent; - 'currentItemChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'edgeChanged': CustomEvent; - 'itemChanged': CustomEvent; - 'overflowChanged': CustomEvent; - 'reorderableChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'truncationChanged': CustomEvent; - } - interface ojTabBarSettableProperties extends baseComponentSettableProperties { - as: string; - currentItem: any; - data: oj.DataProvider|null; - display: 'all'|'icons'; - edge: 'top'|'bottom'|'start'|'end'; - item: {renderer?: (((context: oj.ojTabBar.ItemContext) => void)|null), selectable?: (((context: oj.ojTabBar.ItemContext) => boolean)|boolean)}; - overflow: 'popup'|'hidden'; - reorderable: 'enabled'|'disabled'; - selection: any; - truncation: 'none'|'progressive'; - translations: {accessibleReorderAfterItem?: string, accessibleReorderBeforeItem?: string, accessibleReorderTouchInstructionText?: string, labelCut?: string, labelPasteAfter?: string, labelPasteBefore?: string, labelRemove?: string, msgFetchingData?: string, msgNoData?: string, overflowItemLabel?: string, removeCueText?: string, selectedLabel?: string}; - } - namespace ojTabBar { - type ItemContext = - { - componentElement: Element, datasource?: oj.DataProvider, index: number, key: K, data: D, parentElement: Element - } - } - namespace ojTabBar { - type NodeContext = - { - subId: string, index: number, key: K - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts b/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts deleted file mode 100644 index 454774c4bc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojnbox/index.d.ts +++ /dev/null @@ -1,251 +0,0 @@ -/// -/// -declare namespace oj { - class ojNBox extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - cellContent: 'counts'|'auto'; - cellMaximize: 'off'|'on'; - cells: Promise>|null; - columns: Promise>|null; - columnsTitle: string; - countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); - data: oj.DataProvider|null; - groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; - groupBehavior: 'acrossCells'|'none'|'withinCell'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - labelTruncation: 'ifRequired'|'on'; - maximizedColumn: string; - maximizedRow: string; - otherColor: string; - otherThreshold: number; - rows: Promise>|null; - rowsTitle: string; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; - tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onCellContentChanged: (event: CustomEvent)=> any; - onCellMaximizeChanged: (event: CustomEvent)=> any; - onCellsChanged: (event: CustomEvent)=> any; - onColumnsChanged: (event: CustomEvent)=> any; - onColumnsTitleChanged: (event: CustomEvent)=> any; - onCountLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onGroupAttributesChanged: (event: CustomEvent)=> any; - onGroupBehaviorChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onLabelTruncationChanged: (event: CustomEvent)=> any; - onMaximizedColumnChanged: (event: CustomEvent)=> any; - onMaximizedRowChanged: (event: CustomEvent)=> any; - onOtherColorChanged: (event: CustomEvent)=> any; - onOtherThresholdChanged: (event: CustomEvent)=> any; - onRowsChanged: (event: CustomEvent)=> any; - onRowsTitleChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getCell(rowValue: string, columnValue: string): object|null; - getColumn(columnValue: string): object|null; - getColumnCount(): number; - getColumnsTitle(): string; - getContextByNode(node: Element): object|null; - getDialog(): object|null; - getGroupBehavior(): string; - getGroupNode(groupCategory: string): object|null; - getRow(rowValue: string): object|null; - getRowCount(): number; - getRowsTitle(): string; - } - interface ojNBoxEventMap extends oj.dvtBaseComponentEventMap { - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'cellContentChanged': CustomEvent; - 'cellMaximizeChanged': CustomEvent; - 'cellsChanged': CustomEvent; - 'columnsChanged': CustomEvent; - 'columnsTitleChanged': CustomEvent; - 'countLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'groupAttributesChanged': CustomEvent; - 'groupBehaviorChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'labelTruncationChanged': CustomEvent; - 'maximizedColumnChanged': CustomEvent; - 'maximizedRowChanged': CustomEvent; - 'otherColorChanged': CustomEvent; - 'otherThresholdChanged': CustomEvent; - 'rowsChanged': CustomEvent; - 'rowsTitleChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - cellContent: 'counts'|'auto'; - cellMaximize: 'off'|'on'; - cells: Array|Promise>|null; - columns: Array|Promise>|null; - columnsTitle: string; - countLabel: ((context: oj.ojNBox.CountLabelContext) => (string|null)); - data: oj.DataProvider|null; - groupAttributes: 'color'|'indicatorColor'|'indicatorIconColor'|'indicatorIconPattern'|'indicatorIconShape'; - groupBehavior: 'acrossCells'|'none'|'withinCell'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - labelTruncation: 'ifRequired'|'on'; - maximizedColumn: string; - maximizedRow: string; - otherColor: string; - otherThreshold: number; - rows: Array|Promise>|null; - rowsTitle: string; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - styleDefaults: {animationDuration: number, cellDefaults: {labelHalign: 'center'|'end'|'start', labelStyle: object, maximizedSvgStyle: object, minimizedSvgStyle: object, showCount: 'on'|'off'|'auto', svgStyle: object}, columnLabelStyle: object, columnsTitleStyle: object, hoverBehaviorDelay: number, nodeDefaults: {borderColor: string, borderWidth: number, color: string, iconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, indicatorColor: string, indicatorIconDefaults: {borderColor: string, borderRadius: string, borderWidth: number, color: string, height: number, opacity: number, pattern: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none', shape: 'circle'|'ellipse'|'square'|'plus'|'diamond'|'triangleUp'|'triangleDown'|'human'|'rectangle'|'star', source: string, width: number}, labelStyle: object, secondaryLabelStyle: object}, rowLabelStyle: object, rowsTitleStyle: object}; - tooltip: {renderer: ((context: oj.ojNBox.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, highlightedCount?: string, labelAdditionalData?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelGroup?: string, labelInvalidData?: string, labelNoData?: string, labelOther?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojNBox { - type Cell = - { - label?: string, column: string, labelHalign?: string, labelStyle?: object, svgClassName?: string, svgStyle?: object, maximizedSvgStyle?: object, maximizedSvgClassName?: string, minimizedSvgStyle?: object, minimizedSvgClassName?: string, row: string, showCount?: 'on'|'off'|'auto'|string, shortDesc?: string - } - } - namespace ojNBox { - type Column = - { - id: string, label?: string, labelStyle?: object - } - } - namespace ojNBox { - type CountLabelContext = - { - row: string, column: string, nodeCount: number, totalNodeCount: number, highlightedNodeCount: number - } - } - namespace ojNBox { - type Row = - { - id: string, label?: string, labelStyle?: object - } - } - namespace ojNBox { - type TooltipContext = - { - parentElement: Element, id: K, label: string, secondaryLabel: string, row: string, column: string, color: string, indicatorColor: string, componentElement: Element - } - } - -} -declare namespace oj { - class ojNBoxNode extends JetElement { - borderColor: string; - borderWidth: number; - categories: Array; - color?: string; - column: string; - groupCategory?: string; - icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; - indicatorColor?: string; - indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; - label: string; - row: string; - secondaryLabel: string; - shortDesc: string; - svgClassName: string; - svgStyle: object|null; - xPercentage?: number|null; - yPercentage?: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onColumnChanged: (event: CustomEvent)=> any; - onGroupCategoryChanged: (event: CustomEvent)=> any; - onIconChanged: (event: CustomEvent)=> any; - onIndicatorColorChanged: (event: CustomEvent)=> any; - onIndicatorIconChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onRowChanged: (event: CustomEvent)=> any; - onSecondaryLabelChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onXPercentageChanged: (event: CustomEvent)=> any; - onYPercentageChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojNBoxNodeEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'columnChanged': CustomEvent; - 'groupCategoryChanged': CustomEvent; - 'iconChanged': CustomEvent; - 'indicatorColorChanged': CustomEvent; - 'indicatorIconChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'rowChanged': CustomEvent; - 'secondaryLabelChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'xPercentageChanged': CustomEvent; - 'yPercentageChanged': CustomEvent; - } - interface ojNBoxNodeSettableProperties extends JetSettableProperties { - borderColor: string; - borderWidth: number; - categories: Array; - color?: string; - column: string; - groupCategory?: string; - icon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'mallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string, svgClassName: string, svgStyle?: object, width?: number|null}; - indicatorColor?: string; - indicatorIcon?: {borderColor?: string, borderRadius?: string, borderWidth: number, color?: string, height?: number|null, opacity: number, pattern?: 'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'|'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle', shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, source?: string|null, svgClassName: string, svgStyle?: object|null, width?: number|null}; - label: string; - row: string; - secondaryLabel: string; - shortDesc: string; - svgClassName: string; - svgStyle: object|null; - xPercentage?: number|null; - yPercentage?: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts b/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts deleted file mode 100644 index eab2775d88..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoffcanvas/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace oj { - class OffcanvasUtils { - constructor(); - static close(offcanvas: {selector: string}): Promise; - static open(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; - static setupPanToReveal(offcanvas: {selector: string, edge?: string, size?: string}): void; - static setupResponsive(offcanvas: {selector: string, edge: string, query: string}): void; - static tearDownPanToReveal(offcanvas: {selector: string}): void; - static tearDownResponsive(offcanvas: {selector: string}): void; - static toggle(offcanvas: {selector: string, content: string, edge: string, displayMode: string, autoDismiss: string, size: string, modality: string}): Promise; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts deleted file mode 100644 index 335cee2990..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoptgroup/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojOptgroup extends JetElement { - disabled: boolean; - label: string; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojOptgroupEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'labelChanged': CustomEvent; - } - interface ojOptgroupSettableProperties extends JetSettableProperties { - disabled: boolean; - label: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts b/types/@oracle/oraclejet/ojs/ojoption/index.d.ts deleted file mode 100644 index 012cb7a4cc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojoption/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare namespace oj { - class ojOption extends JetElement { - disabled: boolean; - value: any; - onDisabledChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojOptionEventMap extends oj.JetElementEventMap { - 'disabledChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojOptionSettableProperties extends JetSettableProperties { - disabled: boolean; - value: any; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts b/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts deleted file mode 100644 index ec1496377f..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpictochart/index.d.ts +++ /dev/null @@ -1,206 +0,0 @@ -/// -/// -declare namespace oj { - class ojPictoChart extends dvtBaseComponent> { - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; - as: string; - columnCount: number|null; - columnWidth: number|null; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - layout: 'vertical'|'horizontal'; - layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; - rowCount: number|null; - rowHeight: number|null; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColumnCountChanged: (event: CustomEvent)=> any; - onColumnWidthChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onLayoutOriginChanged: (event: CustomEvent)=> any; - onRowCountChanged: (event: CustomEvent)=> any; - onRowHeightChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onOjDrill: (event: oj.ojPictoChart.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojPictoChart.NodeContext|null; - getItem(index: number): oj.ojPictoChart.ItemContext|null; - getItemCount(): number; - } - namespace ojPictoChart { - class ojDrill extends CustomEvent<{id: any, [propName: string]: any}> { - - } - } - interface ojPictoChartEventMap extends oj.dvtBaseComponentEventMap { - 'ojDrill': oj.ojPictoChart.ojDrill; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'columnCountChanged': CustomEvent; - 'columnWidthChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'layoutOriginChanged': CustomEvent; - 'rowCountChanged': CustomEvent; - 'rowHeightChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - } - interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration?: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'popIn'|'alphaFade'|'zoom'|'none'; - as: string; - columnCount: number|null; - columnWidth: number|null; - data: oj.DataProvider|null; - drilling: 'on'|'off'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - layout: 'vertical'|'horizontal'; - layoutOrigin: 'topEnd'|'bottomStart'|'bottomEnd'|'topStart'; - rowCount: number|null; - rowHeight: number|null; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - tooltip: {renderer: ((context: oj.ojPictoChart.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))|null}; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojPictoChart { - type ItemContext = - { - color: string, count: number, id: K, name: string, selected: boolean, tooltip: string - } - } - namespace ojPictoChart { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojPictoChart { - type TooltipContext = - { - parentElement: Element, id: K, name: string, count: number, color: string, componentElement: Element - } - } - -} -declare namespace oj { - class ojPictoChartItem extends JetElement { - borderColor: string; - borderWidth: number; - categories: Array; - color: string; - columnSpan: number; - count: number; - drilling: 'inherit'|'off'|'on'; - name: string; - rowSpan: number; - shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onColumnSpanChanged: (event: CustomEvent)=> any; - onCountChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onNameChanged: (event: CustomEvent)=> any; - onRowSpanChanged: (event: CustomEvent)=> any; - onShapeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojPictoChartItemEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'columnSpanChanged': CustomEvent; - 'countChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'nameChanged': CustomEvent; - 'rowSpanChanged': CustomEvent; - 'shapeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - } - interface ojPictoChartItemSettableProperties extends JetSettableProperties { - borderColor: string; - borderWidth: number; - categories: Array; - color: string; - columnSpan: number; - count: number; - drilling: 'inherit'|'off'|'on'; - name: string; - rowSpan: number; - shape: 'circle'|'diamond'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|'none'; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts b/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts deleted file mode 100644 index c0b076be88..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpopup/index.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/// -declare namespace oj { - class ojPopup extends baseComponent { - autoDismiss: 'none'|'focusLoss'; - chrome: 'default'|'none'; - initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; - modality: 'modeless'|'modal'; - position: oj.ojPopup.Position; - tail: 'none'|'simple'; - translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; - onAutoDismissChanged: (event: CustomEvent)=> any; - onChromeChanged: (event: CustomEvent)=> any; - onInitialFocusChanged: (event: CustomEvent)=> any; - onModalityChanged: (event: CustomEvent)=> any; - onPositionChanged: (event: CustomEvent)=> any; - onTailChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojPopup.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojPopup.ojAnimateStart)=> any; - onOjBeforeClose: (event: oj.ojPopup.ojBeforeClose)=> any; - onOjBeforeOpen: (event: oj.ojPopup.ojBeforeOpen)=> any; - onOjClose: (event: oj.ojPopup.ojClose)=> any; - onOjFocus: (event: oj.ojPopup.ojFocus)=> any; - onOjOpen: (event: oj.ojPopup.ojOpen)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - close(): void; - isOpen(): boolean; - open(launcher: string|Element, position?: oj.ojPopup.Position): void; - refresh(): void; - } - namespace ojPopup { - class ojAnimateEnd extends CustomEvent<{element: Element, action: 'open'|'close', [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'open'|'close', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeClose extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojBeforeOpen extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojClose extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojFocus extends CustomEvent<{ [propName: string]: any}> { - - } - - class ojOpen extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojPopupEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojPopup.ojAnimateEnd; - 'ojAnimateStart': oj.ojPopup.ojAnimateStart; - 'ojBeforeClose': oj.ojPopup.ojBeforeClose; - 'ojBeforeOpen': oj.ojPopup.ojBeforeOpen; - 'ojClose': oj.ojPopup.ojClose; - 'ojFocus': oj.ojPopup.ojFocus; - 'ojOpen': oj.ojPopup.ojOpen; - 'autoDismissChanged': CustomEvent; - 'chromeChanged': CustomEvent; - 'initialFocusChanged': CustomEvent; - 'modalityChanged': CustomEvent; - 'positionChanged': CustomEvent; - 'tailChanged': CustomEvent; - } - interface ojPopupSettableProperties extends baseComponentSettableProperties { - autoDismiss: 'none'|'focusLoss'; - chrome: 'default'|'none'; - initialFocus: 'auto'|'none'|'firstFocusable'|'popup'; - modality: 'modeless'|'modal'; - position: oj.ojPopup.Position; - tail: 'none'|'simple'; - translations: {ariaCloseSkipLink?: string, ariaFocusSkipLink?: string, ariaLiveRegionInitialFocusFirstFocusable?: string, ariaLiveRegionInitialFocusFirstFocusableTouch?: string, ariaLiveRegionInitialFocusNone?: string, ariaLiveRegionInitialFocusNoneTouch?: string}; - } - namespace ojPopup { - type Position = - { - my?: oj.ojPopup.PositionAlign, at?: oj.ojPopup.PositionAlign, offset?: oj.ojPopup.PositionPoint, of?: string|oj.ojPopup.PositionPoint, collision?: 'flip'|'fit'|'flipfit'|'flipcenter'|'none' - } - } - namespace ojPopup { - type PositionAlign = - { - vertical?: 'top'|'bottom'|'center', horizontal?: 'start'|'end'|'left'|'center'|'bottom' - } - } - namespace ojPopup { - type PositionPoint = - { - x?: number, y?: number - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts deleted file mode 100644 index 66fec85056..0000000000 --- a/types/@oracle/oraclejet/ojs/ojprogress/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// -declare namespace oj { - class ojProgress extends baseComponent { - max: number; - type: 'bar'|'circle'; - value: number; - translations: {ariaIndeterminateProgressText?: string}; - onMaxChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojProgressEventMap extends oj.baseComponentEventMap { - 'maxChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojProgressSettableProperties extends baseComponentSettableProperties { - max: number; - type: 'bar'|'circle'; - value: number; - translations: {ariaIndeterminateProgressText?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts b/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts deleted file mode 100644 index d3b9efbc83..0000000000 --- a/types/@oracle/oraclejet/ojs/ojprogresslist/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojProgressList extends JetElement { - data: oj.DataProvider|null; - onDataChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojProgressListEventMap extends oj.JetElementEventMap { - 'dataChanged': CustomEvent; - } - interface ojProgressListSettableProperties extends JetSettableProperties { - data: oj.DataProvider|null; - } - -} -declare namespace oj { - interface ProgressItem { - addEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; - removeEventListener(eventType: oj.ProgressItem.EventType, listener: EventListener): void; - } - namespace ProgressItem { - enum EventType { - LOADSTART = "loadstart", - PROGRESS = "progress", - ABORT = "abort", - ERROR = "error", - LOAD = "load", - TIMEOUT = "timeout", - LOADEND = "loadend", - } - enum Status { - QUEUED = "queued", - LOADSTARTED = "loadstarted", - ABORTED = "aborted", - ERRORED = "errored", - TIMEDOUT = "timedout", - LOADED = "loaded", - } - } - - -} diff --git a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts b/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts deleted file mode 100644 index 7367c03bbd..0000000000 --- a/types/@oracle/oraclejet/ojs/ojpulltorefresh/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare namespace oj { - class PullToRefreshUtils { - static setupPullToRefresh(element: Element, refreshFunc: (()=> Promise), options?: {threshold?: number, primaryText?: string, secondaryText?: string}): void; - static tearDownPullToRefresh(element: Element): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts b/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts deleted file mode 100644 index 7657b0a18c..0000000000 --- a/types/@oracle/oraclejet/ojs/ojradioset/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// -declare namespace oj { - class ojRadioset extends editableValue { - disabled: boolean|null; - labelledBy: string|null; - required: boolean; - value: any; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onDisabledChanged: (event: CustomEvent)=> any; - onLabelledByChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojRadioset.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojRadioset.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojRadioset { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojRadiosetEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojRadioset.ojAnimateEnd; - 'ojAnimateStart': oj.ojRadioset.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'labelledByChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojRadiosetSettableProperties extends editableValueSettableProperties { - disabled: boolean|null; - labelledBy: string|null; - required: boolean; - value: any; - translations: {required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts b/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts deleted file mode 100644 index 5c2dee4c70..0000000000 --- a/types/@oracle/oraclejet/ojs/ojrefresher/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -declare namespace oj { - class ojRefresher extends baseComponent { - refreshContent: (()=> Promise); - target: Element; - text: string; - threshold: number; - onRefreshContentChanged: (event: CustomEvent)=> any; - onTargetChanged: (event: CustomEvent)=> any; - onTextChanged: (event: CustomEvent)=> any; - onThresholdChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojRefresherEventMap extends oj.baseComponentEventMap { - 'refreshContentChanged': CustomEvent; - 'targetChanged': CustomEvent; - 'textChanged': CustomEvent; - 'thresholdChanged': CustomEvent; - } - interface ojRefresherSettableProperties extends baseComponentSettableProperties { - refreshContent: (()=> Promise); - target: Element; - text: string; - threshold: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts b/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts deleted file mode 100644 index 44c23b8f5d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojrouter/index.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/// -declare namespace oj { - class Router { - readonly currentState: (()=> oj.RouterState|undefined); - readonly currentValue: (()=> string|undefined); - defaultStateId: string|undefined; - static defaults: {urlAdapter?: oj.Router.urlPathAdapter|oj.Router.urlParamAdapter, baseUrl?: string, rootInstanceName?: string}; - readonly direction: string|undefined; - readonly moduleConfig: {name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string}}, lifecycleListener: {attached: ((param0: string)=> void)}}; - readonly name: string; - readonly observableModuleConfig: KnockoutObservable; - readonly parent: oj.Router|undefined; - static readonly rootInstance: oj.Router; - readonly stateId: ((param0?: string)=> string); - readonly states: Array|null; - static readonly transitionedToState: object; - static sync(): Promise<{hasChanged: boolean}>; - configure(option: {[key:string]: oj.RouterState.ConfigOptions}|((id:string)=> oj.RouterState)): any; - createChildRouter(name: string, parentStateId?: string): oj.Router; - dispose(): undefined; - getChildRouter(name: string): oj.Router|undefined; - getCurrentChildRouter(): oj.Router|undefined; - getState(stateId: string): oj.RouterState|undefined; - go(stateIdPath?: string|Array, options?: {historyUpdate: string}): Promise<{hasChanged: boolean}>; - retrieve(): any; - store(data: object): undefined; - } - namespace Router { - type ModuleConfigType = - { - name: KnockoutObservable, params: {ojRouter: {parentRouter: oj.Router, direction: string, parameters: object}}, lifecycleListener: {attached: ((param0: object)=> void)} - } - } - namespace Router { - class urlParamAdapter { - constructor(); - } -class urlPathAdapter { - constructor(); - } - - - } - - -} -declare namespace oj { - class RouterState { - canEnter: (()=> boolean)|(()=> Promise); - canExit: (()=> boolean)|(()=> Promise); - enter: (()=> void)|(()=> Promise); - exit: (()=> void)|(()=> Promise); - readonly id: string; - label: string|undefined; - parameters: object; - title: string|(()=> string|undefined); - value: any; - constructor(id: string, options?: oj.RouterState.ConfigOptions, router?: oj.Router); - go(): Promise<{hasChanged: boolean}>; - isCurrent(): boolean; - } - namespace RouterState { - type ConfigOptions = - { - label?: string, value?: any, isDefault?: boolean, canEnter?: (()=> boolean)|(()=> Promise), enter?: (()=> void)|(()=> Promise), canExit?: (()=> boolean)|(()=> Promise), exit?: (()=> void)|(()=> Promise) - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts b/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts deleted file mode 100644 index d6c2cec4a5..0000000000 --- a/types/@oracle/oraclejet/ojs/ojselectcombobox/index.d.ts +++ /dev/null @@ -1,427 +0,0 @@ -/// -declare namespace oj { - abstract class ojCombobox, SV=V, RV=V> extends editableValue { - onOjAnimateEnd: (event: oj.ojCombobox.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojCombobox.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojCombobox { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojComboboxEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojCombobox.ojAnimateEnd; - 'ojAnimateStart': oj.ojCombobox.ojAnimateStart; - } - interface ojComboboxSettableProperties extends editableValueSettableProperties { - } - namespace ojCombobox { - type Optgroup = - { - disabled?: boolean, label: string, children: Array<(oj.ojCombobox.Option|oj.ojCombobox.Optgroup)> - } - } - namespace ojCombobox { - type Option = - { - disabled?: boolean, label?: string, value: any - } - } - namespace ojCombobox { - type OptionContext = - { - component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element - } - } - namespace ojCombobox { - type OptionsKeys = - { - label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys - } - } - -} -declare namespace oj { - class ojComboboxMany extends ojCombobox, ojComboboxManySettableProperties, Array, string> { - asyncValidators: Array>>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array>|oj.Validation.RegisteredValidator>|null; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onMinLengthChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojComboboxMany.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojComboboxMany.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojComboboxMany { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojComboboxManyEventMap extends oj.ojComboboxEventMap { - 'ojAnimateEnd': oj.ojComboboxMany.ojAnimateEnd; - 'ojAnimateStart': oj.ojComboboxMany.ojAnimateStart; - 'asyncValidatorsChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'minLengthChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionsChanged': CustomEvent; - } - interface ojComboboxManySettableProperties extends ojComboboxSettableProperties, Array, string> { - asyncValidators: Array>>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array>|oj.Validation.RegisteredValidator>|null; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - class ojComboboxOne extends ojCombobox, any, string> { - asyncValidators: Array>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - filterOnOpen: 'none'|'rawValue'; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - onAsyncValidatorsChanged: (event: CustomEvent)=> any; - onConverterChanged: (event: CustomEvent)=> any; - onFilterOnOpenChanged: (event: CustomEvent)=> any; - onMinLengthChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRawValueChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValidatorsChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojComboboxOne.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojComboboxOne.ojAnimateStart)=> any; - onOjValueUpdated: (event: oj.ojComboboxOne.ojValueUpdated)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojComboboxOne { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojValueUpdated extends CustomEvent<{value: any, previousValue: any, [propName: string]: any}> { - - } - } - interface ojComboboxOneEventMap extends oj.ojComboboxEventMap { - 'ojAnimateEnd': oj.ojComboboxOne.ojAnimateEnd; - 'ojAnimateStart': oj.ojComboboxOne.ojAnimateStart; - 'ojValueUpdated': oj.ojComboboxOne.ojValueUpdated; - 'asyncValidatorsChanged': CustomEvent; - 'converterChanged': CustomEvent; - 'filterOnOpenChanged': CustomEvent; - 'minLengthChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'rawValueChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'validatorsChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionChanged': CustomEvent; - } - interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { - asyncValidators: Array>; - converter: oj.Converter|oj.Validation.RegisteredConverter|null; - filterOnOpen: 'none'|'rawValue'; - minLength: number; - optionRenderer?: ((param0: oj.ojCombobox.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys: {label?: string, value?: string, children?: string, childKeys?: oj.ojCombobox.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - readonly rawValue: string|null; - required: boolean; - validators: Array|oj.Validation.RegisteredValidator>|null; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, noMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}}; - } - -} -declare namespace oj { - abstract class ojSelect, SV=V> extends editableValue { - onOjAnimateEnd: (event: oj.ojSelect.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelect.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - validate(): Promise; - } - namespace ojSelect { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSelect.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelect.ojAnimateStart; - } - interface ojSelectSettableProperties extends editableValueSettableProperties { - } - namespace ojSelect { - type Optgroup = - { - disabled?: boolean, label: string, children: Array<(oj.ojSelect.Option|oj.ojSelect.Optgroup)> - } - } - namespace ojSelect { - type Option = - { - disabled?: boolean, label?: string, value: any - } - } - namespace ojSelect { - type OptionContext = - { - component: Element, parent: Element, index: number, depth: number, leaf: boolean, data: object, parentElement: Element - } - } - namespace ojSelect { - type OptionsKeys = - { - label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys - } - } - -} -declare namespace oj { - class ojSelectMany extends ojSelect, ojSelectManySettableProperties> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionsChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSelectMany.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelectMany.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSelectMany { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectManyEventMap extends oj.ojSelectEventMap { - 'ojAnimateEnd': oj.ojSelectMany.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelectMany.ojAnimateStart; - 'minimumResultsForSearchChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionsChanged': CustomEvent; - } - interface ojSelectManySettableProperties extends ojSelectSettableProperties> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: Array|null; - valueOptions: Array<{value: any, label?: string}> | null; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - } - -} -declare namespace oj { - class ojSelectOne extends ojSelect> { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - onMinimumResultsForSearchChanged: (event: CustomEvent)=> any; - onOptionRendererChanged: (event: CustomEvent)=> any; - onOptionsChanged: (event: CustomEvent)=> any; - onOptionsKeysChanged: (event: CustomEvent)=> any; - onPickerAttributesChanged: (event: CustomEvent)=> any; - onPlaceholderChanged: (event: CustomEvent)=> any; - onRenderModeChanged: (event: CustomEvent)=> any; - onRequiredChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onValueOptionChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSelectOne.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSelectOne.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSelectOne { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSelectOneEventMap extends oj.ojSelectEventMap { - 'ojAnimateEnd': oj.ojSelectOne.ojAnimateEnd; - 'ojAnimateStart': oj.ojSelectOne.ojAnimateStart; - 'minimumResultsForSearchChanged': CustomEvent; - 'optionRendererChanged': CustomEvent; - 'optionsChanged': CustomEvent; - 'optionsKeysChanged': CustomEvent; - 'pickerAttributesChanged': CustomEvent; - 'placeholderChanged': CustomEvent; - 'renderModeChanged': CustomEvent; - 'requiredChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'valueOptionChanged': CustomEvent; - } - interface ojSelectOneSettableProperties extends ojSelectSettableProperties { - minimumResultsForSearch: number; - optionRenderer?: ((param0: oj.ojSelect.OptionContext) => {insert: Element}|undefined)|null; - options: Array|oj.DataProvider|null; - optionsKeys: {childKeys?: {label?: string, value?: string, children?: string, childKeys?: oj.ojSelect.OptionsKeys}, children?: string, label?: string, value?: string}; - pickerAttributes: {style?: string, class?: string}; - placeholder: string|null; - renderMode: 'jet'|'native'; - required: boolean; - value: any; - valueOption: {value: any, label?: string}; - translations: {filterFurther?: string, moreMatchesFound?: string, noMatchesFound?: string, oneMatchesFound?: string, required?: {hint?: string, messageDetail?: string, messageSummary?: string}, searchField?: string}; - } - -} -declare namespace oj { - interface Optgroup { - children: Array<(oj.Option|oj.Optgroup)>; - disabled?: boolean; - label: string; - } - -} -declare namespace oj { - interface Option { - disabled?: boolean; - label?: string; - value: object; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts b/types/@oracle/oraclejet/ojs/ojslider/index.d.ts deleted file mode 100644 index 467073e274..0000000000 --- a/types/@oracle/oraclejet/ojs/ojslider/index.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/// -declare namespace oj { - class ojSlider extends editableValue { - disabled: boolean|null; - max: number|null; - min: number|null; - orientation: 'horizontal'|'vertical'; - step: number|null; - readonly transientValue: number; - type: 'fromMin'|'fromMax'|'single'; - value: number|null; - translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; - onDisabledChanged: (event: CustomEvent)=> any; - onMaxChanged: (event: CustomEvent)=> any; - onMinChanged: (event: CustomEvent)=> any; - onOrientationChanged: (event: CustomEvent)=> any; - onStepChanged: (event: CustomEvent)=> any; - onTransientValueChanged: (event: CustomEvent)=> any; - onTypeChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSlider.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSlider.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSlider { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSliderEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSlider.ojAnimateEnd; - 'ojAnimateStart': oj.ojSlider.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'maxChanged': CustomEvent; - 'minChanged': CustomEvent; - 'orientationChanged': CustomEvent; - 'stepChanged': CustomEvent; - 'transientValueChanged': CustomEvent; - 'typeChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSliderSettableProperties extends editableValueSettableProperties { - disabled: boolean|null; - max: number|null; - min: number|null; - orientation: 'horizontal'|'vertical'; - step: number|null; - readonly transientValue: number; - type: 'fromMin'|'fromMax'|'single'; - value: number|null; - translations: {invalidStep?: string, maxMin?: string, noValue?: string, optionNum?: string, valueRange?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts b/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts deleted file mode 100644 index 6ef93fd030..0000000000 --- a/types/@oracle/oraclejet/ojs/ojsunburst/index.d.ts +++ /dev/null @@ -1,270 +0,0 @@ -/// -declare namespace oj { - class ojSunburst extends dvtBaseComponent> { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - expanded: KeySet.KeySet; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; - rootNode: any; - rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; - rotation: 'off'|'on'; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - startAngle: number; - tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAnimationUpdateColorChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColorLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayLevelsChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onExpandedChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onNodeDefaultsChanged: (event: CustomEvent)=> any; - onRootNodeChanged: (event: CustomEvent)=> any; - onRootNodeContentChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSizeLabelChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onStartAngleChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onOjBeforeCollapse: (event: oj.ojSunburst.ojBeforeCollapse)=> any; - onOjBeforeDrill: (event: oj.ojSunburst.ojBeforeDrill)=> any; - onOjBeforeExpand: (event: oj.ojSunburst.ojBeforeExpand)=> any; - onOjCollapse: (event: oj.ojSunburst.ojCollapse)=> any; - onOjDrill: (event: oj.ojSunburst.ojDrill)=> any; - onOjExpand: (event: oj.ojSunburst.ojExpand)=> any; - onOjRotateInput: (event: oj.ojSunburst.ojRotateInput)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojSunburst.NodeContext|null; - getNode(subIdPath: Array): oj.ojSunburst.DataContext|null; - } - namespace ojSunburst { - class ojBeforeCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojBeforeExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojCollapse extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojExpand extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojRotateInput extends CustomEvent<{value: number, [propName: string]: any}> { - - } - } - interface ojSunburstEventMap extends oj.dvtBaseComponentEventMap { - 'ojBeforeCollapse': oj.ojSunburst.ojBeforeCollapse; - 'ojBeforeDrill': oj.ojSunburst.ojBeforeDrill; - 'ojBeforeExpand': oj.ojSunburst.ojBeforeExpand; - 'ojCollapse': oj.ojSunburst.ojCollapse; - 'ojDrill': oj.ojSunburst.ojDrill; - 'ojExpand': oj.ojSunburst.ojExpand; - 'ojRotateInput': oj.ojSunburst.ojRotateInput; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'animationUpdateColorChanged': CustomEvent; - 'asChanged': CustomEvent; - 'colorLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayLevelsChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'expandedChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'nodeDefaultsChanged': CustomEvent; - 'rootNodeChanged': CustomEvent; - 'rootNodeContentChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'sizeLabelChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'startAngleChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - expanded: KeySet.KeySet; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - nodeDefaults: {borderColor: string, borderWidth: number, hoverColor: string, labelDisplay: 'horizontal'|'rotated'|'off'|'auto', labelHalign: 'inner'|'outer'|'center', labelMinLength: number, labelStyle: object, selectedInnerColor: string, selectedOuterColor: string, showDisclosure: 'on'|'off'}; - rootNode: any; - rootNodeContent: {renderer: ((context: oj.ojSunburst.RootNodeContext) => ({insert: Element|string}))}; - rotation: 'off'|'on'; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - startAngle: number; - tooltip: {renderer: ((context: oj.ojSunburst.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipCollapse?: string, tooltipExpand?: string}; - } - namespace ojSunburst { - type DataContext = - { - color: string, label: string, selected: boolean, size: number, tooltip: string - } - } - namespace ojSunburst { - type NodeContext = - { - subId: string, indexPath: Array - } - } - namespace ojSunburst { - type RootNodeContext = - { - outerBounds: {x: number, y: number, width: number, height: number}, innerBounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element - } - } - namespace ojSunburst { - type TooltipContext = - { - parentElement: Element, id: K, label: string, value: number, radius: number, color: string, data: object, itemData: D, componentElement: Element - } - } - -} -declare namespace oj { - class ojSunburstNode extends JetElement { - borderColor?: string; - borderWidth?: number; - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - label?: string; - labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; - labelHalign?: 'inner'|'outer'|'center'; - labelStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - radius?: number; - selectable?: 'off'|'auto'; - shortDesc?: string; - showDisclosure?: 'on'|'off'|'inherit'; - svgClassName?: string; - svgStyle?: object; - value: number; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelHalignChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onRadiusChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onShowDisclosureChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojSunburstNodeEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelHalignChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'radiusChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'showDisclosureChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSunburstNodeSettableProperties extends JetSettableProperties { - borderColor?: string; - borderWidth?: number; - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - label?: string; - labelDisplay?: 'horizontal'|'rotated'|'off'|'auto'; - labelHalign?: 'inner'|'outer'|'center'; - labelStyle?: object; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - radius?: number; - selectable?: 'off'|'auto'; - shortDesc?: string; - showDisclosure?: 'on'|'off'|'inherit'; - svgClassName?: string; - svgStyle?: object; - value: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts deleted file mode 100644 index 11ce95700d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswipeactions/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -declare namespace oj { - class ojSwipeActions extends baseComponent { - translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; - onOjAction: (event: oj.ojSwipeActions.ojAction)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - namespace ojSwipeActions { - class ojAction extends CustomEvent<{ [propName: string]: any}> { - - } - } - interface ojSwipeActionsEventMap extends oj.baseComponentEventMap { - 'ojAction': oj.ojSwipeActions.ojAction; - } - interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { - translations: {ariaHideActionsDescription?: string, ariaShowEndActionsDescription?: string, ariaShowStartActionsDescription?: string}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts b/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts deleted file mode 100644 index da94a66d4b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswipetoreveal/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare namespace oj { - class SwipeToRevealUtils { - static setupSwipeActions(elem: Element, options?: {threshold?: number}): void; - static tearDownSwipeActions(elem: Element): void; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts deleted file mode 100644 index 31f04cc1ee..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswitch/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/// -declare namespace oj { - class ojSwitch extends editableValue { - disabled: boolean; - readonly: boolean; - value: boolean; - onDisabledChanged: (event: CustomEvent)=> any; - onReadonlyChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojSwitch.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojSwitch.ojAnimateStart)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - namespace ojSwitch { - class ojAnimateEnd extends CustomEvent<{action: string, element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: string, element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - } - interface ojSwitchEventMap extends oj.editableValueEventMap { - 'ojAnimateEnd': oj.ojSwitch.ojAnimateEnd; - 'ojAnimateStart': oj.ojSwitch.ojAnimateStart; - 'disabledChanged': CustomEvent; - 'readonlyChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojSwitchSettableProperties extends editableValueSettableProperties { - disabled: boolean; - readonly: boolean; - value: boolean; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts b/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts deleted file mode 100644 index d99477edf8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojswitcher/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare namespace oj { - class ojSwitcher extends JetElement { - value: string; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getProperty(property: string): any; - refresh(): void; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - } - interface ojSwitcherEventMap extends oj.JetElementEventMap { - 'valueChanged': CustomEvent; - } - interface ojSwitcherSettableProperties extends JetSettableProperties { - value: string; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts b/types/@oracle/oraclejet/ojs/ojtable/index.d.ts deleted file mode 100644 index 5ee54785bd..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtable/index.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/// -/// -declare namespace oj { - class ojTable extends baseComponent> { - accessibility: {rowHeader: string}; - as: string; - columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; - columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; - currentRow: oj.ojTable.CurrentRow | null; - data: oj.DataProvider; - display: 'list'|'grid'; - dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; - editMode: 'none'|'rowEdit'; - readonly firstSelectedRow: object; - horizontalGridVisible: 'auto'|'enabled'|'disabled'; - rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize: number, maxCount: number}; - scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; - selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; - selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; - selectionRequired: boolean; - verticalGridVisible: 'auto'|'enabled'|'disabled'; - translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; - onAccessibilityChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColumnsChanged: (event: CustomEvent)=> any; - onColumnsDefaultChanged: (event: CustomEvent)=> any; - onCurrentRowChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayChanged: (event: CustomEvent)=> any; - onDndChanged: (event: CustomEvent)=> any; - onEditModeChanged: (event: CustomEvent)=> any; - onFirstSelectedRowChanged: (event: CustomEvent)=> any; - onHorizontalGridVisibleChanged: (event: CustomEvent)=> any; - onRowRendererChanged: (event: CustomEvent)=> any; - onScrollPolicyChanged: (event: CustomEvent)=> any; - onScrollPolicyOptionsChanged: (event: CustomEvent)=> any; - onScrollPositionChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRequiredChanged: (event: CustomEvent)=> any; - onVerticalGridVisibleChanged: (event: CustomEvent)=> any; - onOjAnimateEnd: (event: oj.ojTable.ojAnimateEnd)=> any; - onOjAnimateStart: (event: oj.ojTable.ojAnimateStart)=> any; - onOjBeforeCurrentRow: (event: oj.ojTable.ojBeforeCurrentRow)=> any; - onOjBeforeRowEdit: (event: oj.ojTable.ojBeforeRowEdit)=> any; - onOjBeforeRowEditEnd: (event: oj.ojTable.ojBeforeRowEditEnd)=> any; - onOjSort: (event: oj.ojTable.ojSort)=> any; - - addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): {subId: 'oj-table-cell', rowIndex: number, columnIndex: number, key:string} | {subId: 'oj-table-footer'|'oj-table-header',index: number}; - getDataForVisibleRow(rowIndex: number) : {data: D, index: number, key: K} | null - refresh(): void; - refreshRow(rowIdx: number): Promise; - } - namespace ojTable { - class ojAnimateEnd extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, [propName: string]: any}> { - - } - - class ojAnimateStart extends CustomEvent<{action: 'add'|'remove'|'update', element: Element, endCallback: (()=> void), [propName: string]: any}> { - - } - - class ojBeforeCurrentRow extends CustomEvent<{currentRow: oj.ojTable.CurrentRow, previousCurrentRow: oj.ojTable.CurrentRow, [propName: string]: any}> { - - } - - class ojBeforeRowEdit extends CustomEvent<{rowContext: object, [propName: string]: any}> { - - } - - class ojBeforeRowEditEnd extends CustomEvent<{rowContext: object, cancelEdit: object, [propName: string]: any}> { - - } - - class ojSort extends CustomEvent<{header: Element, direction: 'ascending'|'descending', [propName: string]: any}> { - - } - } - interface ojTableEventMap extends oj.baseComponentEventMap { - 'ojAnimateEnd': oj.ojTable.ojAnimateEnd; - 'ojAnimateStart': oj.ojTable.ojAnimateStart; - 'ojBeforeCurrentRow': oj.ojTable.ojBeforeCurrentRow; - 'ojBeforeRowEdit': oj.ojTable.ojBeforeRowEdit; - 'ojBeforeRowEditEnd': oj.ojTable.ojBeforeRowEditEnd; - 'ojSort': oj.ojTable.ojSort; - 'accessibilityChanged': CustomEvent; - 'asChanged': CustomEvent; - 'columnsChanged': CustomEvent; - 'columnsDefaultChanged': CustomEvent; - 'currentRowChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayChanged': CustomEvent; - 'dndChanged': CustomEvent; - 'editModeChanged': CustomEvent; - 'firstSelectedRowChanged': CustomEvent; - 'horizontalGridVisibleChanged': CustomEvent; - 'rowRendererChanged': CustomEvent; - 'scrollPolicyChanged': CustomEvent; - 'scrollPolicyOptionsChanged': CustomEvent; - 'scrollPositionChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRequiredChanged': CustomEvent; - 'verticalGridVisibleChanged': CustomEvent; - } - interface ojTableSettableProperties extends baseComponentSettableProperties { - accessibility: {rowHeader: string}; - as: string; - columns: Array<{className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, id?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}>|null; - columnsDefault: {className?: string|null, field?: string|null, footerClassName?: string|null, footerRenderer?: ((context: oj.ojTable.FooterRendererContext) => {insert: HTMLElement | string} | void) | null, footerStyle?: string|null, footerTemplate?: {componentElement: Element}, headerClassName?: string|null, headerRenderer?: ((context: oj.ojTable.HeaderRendererContext) => {insert: HTMLElement | string} | void) | null, headerStyle?: string|null, headerTemplate?: {componentElement: Element, data: object}, headerText?: string|null, renderer?: ((context: oj.ojTable.ColumnsRendererContext) => {insert: HTMLElement | string} | void) | null, resizable?: 'enabled'|'disabled', sortProperty?: string|null, sortable?: 'auto'|'enabled'|'disabled', style?: string|null, template?: {componentElement: Element, data: object, row: object, index: number, columnIndex: number, key: any, mode: string}, width?: number|null}; - currentRow: oj.ojTable.CurrentRow | null; - data: oj.DataProvider|null; - display: 'list'|'grid'; - dnd: {drag: {rows: {dataTypes?: string|Array, dragStart?: ((param0: DragEvent, param1: oj.ojTable.DragRowContext)=> void), drag?: ((param0: DragEvent)=> void), dragEnd?: ((param0: DragEvent)=> void)}}, drop: {columns: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropColumnContext)=> void)}, rows: {dataTypes: string|Array, dragEnter?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragOver?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), dragLeave?: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void), drop: ((param0: DragEvent, param1: oj.ojTable.DropRowContext)=> void)}}, reorder: {columns: 'enabled'|'disabled'}}; - editMode: 'none'|'rowEdit'; - readonly firstSelectedRow: object; - horizontalGridVisible: 'auto'|'enabled'|'disabled'; - rowRenderer: ((context: oj.ojTable.RowRendererContext) => string | HTMLElement | void) | null; - scrollPolicy: 'auto'|'loadMoreOnScroll'; - scrollPolicyOptions: {fetchSize: number, maxCount: number}; - scrollPosition: {x?: number, y?: number, columnIndex?: number, rowIndex?: number, columnKey?: any, rowKey?: any, offsetX?: number, offsetY?: number}; - selection: Array & oj.ojTable.RowSelectionEnd> | Array & oj.ojTable.ColumnSelectionEnd>; - selectionMode: {column: 'single'|'multiple', row: 'single'|'multiple'}; - selectionRequired: boolean; - verticalGridVisible: 'auto'|'enabled'|'disabled'; - translations: {labelAccSelectionAffordanceBottom?: string, labelAccSelectionAffordanceTop?: string, labelDisableNonContiguousSelection?: string, labelEditRow?: string, labelEnableNonContiguousSelection?: string, labelResize?: string, labelResizePopupSpinner?: string, labelResizePopupSubmit?: string, labelSelectAndEditRow?: string, labelSelectColum?: string, labelSelectRow?: string, labelSort?: string, labelSortAsc?: string, labelSortDsc?: string, msgColumnResizeWidthValidation?: string, msgFetchingData?: string, msgInitializing?: string, msgNoData?: string, msgScrollPolicyMaxCountDetail?: string, msgScrollPolicyMaxCountSummary?: string, msgStatusSortAscending?: string, msgStatusSortDescending?: string}; - } - namespace ojTable { - type ColumnSelectionEnd = {endIndex:{column:number},endKey?:{column:K}}|{endIndex?:{column:number}, endKey:{column:K}}; - } - namespace ojTable { - type ColumnSelectionStart = {startIndex:{column:number}, startKey?:{column:K}}|{startIndex?:{column:number}, startKey:{column:K}}; - } - namespace ojTable { - type ColumnsRendererContext = - { - cellContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus}, columnIndex: number, componentElement: Element, data: D, parentElement: Element, row: {[name: string]: any} - } - } - namespace ojTable { - type ContextStatus = - { - rowIndex: number, rowKey: K, currentRow: oj.ojTable.CurrentRow - } - } - namespace ojTable { - type CurrentRow = {rowIndex: number, rowKey?: K}|{rowIndex?: number, rowKey: K}; - } - namespace ojTable { - type DragRowContext = - { - rows: Array<{data: D, index: number, key: K}> - } - } - namespace ojTable { - type DropColumnContext = - { - columnIndex: number - } - } - namespace ojTable { - type DropRowContext = - { - rowIndex: number - } - } - namespace ojTable { - type FooterRendererContext = - { - columnIndex: number, componentElement: Element, footerContext: {datasource: oj.DataProvider|null}, parentElement: Element - } - } - namespace ojTable { - type HeaderRendererContext = - { - columnIndex: number, columnHeaderDefaultRenderer: ((param0: object, param1: ((param0: object)=>void))=> void), columnHeaderSortableIconRenderer: ((param0: object, param1: ((param0: Object)=>void))=> void), componentElement: Element, data: string, headerContext: {datasource: oj.DataProvider|null}, parentElement: Element - } - } - namespace ojTable { - type RowRendererContext = - { - componentElement: Element, data: {[name: string]: any}, parentElement: Element, rowContext: {datasource: oj.DataProvider|null, mode: 'edit'|'navigation', status: oj.ojTable.ContextStatus} - } - } - namespace ojTable { - type RowSelectionEnd = {endIndex: {row: number}, endKey?: {row: K}}|{endIndex?:{row: number}, endKey:{row: K}}; - } - namespace ojTable { - type RowSelectionStart = {startIndex: {row: number}, startKey?:{row: K}}|{startIndex?: {row: number}, startKey:{row: K}}; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts b/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts deleted file mode 100644 index 9400b980f7..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtagcloud/index.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -/// -/// -declare namespace oj { - class ojTagCloud extends dvtBaseComponent> { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - data: oj.DataProvider|null; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - layout: 'cloud'|'rectangular'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; - tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTagCloud.NodeContext|null; - getItem(index: number): oj.ojTagCloud.ItemContext|null; - getItemCount(): number; - } - interface ojTagCloudEventMap extends oj.dvtBaseComponentEventMap { - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'asChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - as: string; - data: oj.DataProvider|null; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - layout: 'cloud'|'rectangular'; - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - styleDefaults: {animationDuration?: number, hoverBehaviorDelay?: number, svgStyle?: object}; - tooltip: {renderer: ((context: oj.ojTagCloud.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojTagCloud { - type ItemContext = - { - color: string, label: string, selected: boolean, tooltip: string, value: number - } - } - namespace ojTagCloud { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojTagCloud { - type TooltipContext = - { - color: string, componentElement: Element, id: K, label: string, parentElement: Element, value: number - } - } - -} -declare namespace oj { - class ojTagCloudItem extends JetElement { - categories: Array; - color?: string; - label: string; - shortDesc: string; - svgClassName: string; - svgStyle: object; - url: string; - value: number|null; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onUrlChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTagCloudItemEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'urlChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojTagCloudItemSettableProperties extends JetSettableProperties { - categories: Array; - color?: string; - label: string; - shortDesc: string; - svgClassName: string; - svgStyle: object; - url: string; - value: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts b/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts deleted file mode 100644 index 81c012ce6d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojthematicmap/index.d.ts +++ /dev/null @@ -1,376 +0,0 @@ -/// -/// -declare namespace oj { - class ojThematicMap extends dvtBaseComponent> { - animationDuration: number; - animationOnDisplay: 'auto'|'none'; - areaData: oj.DataProvider|null; - as: string; - focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - initialZooming: 'auto'|'none'; - isolatedItem: K1; - labelDisplay: 'on'|'off'|'auto'; - labelType: 'long'|'short'; - linkData: oj.DataProvider|null; - mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; - markerData: oj.DataProvider|null; - markerZoomBehavior: 'zoom'|'fixed'; - maxZoom: number; - panning: 'auto'|'none'; - renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; - tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; - touchResponse: 'touchStart'|'auto'; - zooming: 'auto'|'none'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAreaDataChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onFocusRendererChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverRendererChanged: (event: CustomEvent)=> any; - onInitialZoomingChanged: (event: CustomEvent)=> any; - onIsolatedItemChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelTypeChanged: (event: CustomEvent)=> any; - onLinkDataChanged: (event: CustomEvent)=> any; - onMapProviderChanged: (event: CustomEvent)=> any; - onMarkerDataChanged: (event: CustomEvent)=> any; - onMarkerZoomBehaviorChanged: (event: CustomEvent)=> any; - onMaxZoomChanged: (event: CustomEvent)=> any; - onPanningChanged: (event: CustomEvent)=> any; - onRendererChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSelectionRendererChanged: (event: CustomEvent)=> any; - onStyleDefaultsChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTooltipDisplayChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onZoomingChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getArea(index: number): oj.ojThematicMap.DataContext|null; - getContextByNode(node: Element): oj.ojThematicMap.NodeContext|null; - getLink(index: number): oj.ojThematicMap.DataContext|null; - getMarker(index: number): oj.ojThematicMap.DataContext|null; - } - interface ojThematicMapEventMap extends oj.dvtBaseComponentEventMap { - 'animationDurationChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'areaDataChanged': CustomEvent; - 'asChanged': CustomEvent; - 'focusRendererChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverRendererChanged': CustomEvent; - 'initialZoomingChanged': CustomEvent; - 'isolatedItemChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelTypeChanged': CustomEvent; - 'linkDataChanged': CustomEvent; - 'mapProviderChanged': CustomEvent; - 'markerDataChanged': CustomEvent; - 'markerZoomBehaviorChanged': CustomEvent; - 'maxZoomChanged': CustomEvent; - 'panningChanged': CustomEvent; - 'rendererChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'selectionRendererChanged': CustomEvent; - 'styleDefaultsChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'tooltipDisplayChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - 'zoomingChanged': CustomEvent; - } - interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDisplay: 'auto'|'none'; - areaData: oj.DataProvider|null; - as: string; - focusRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - initialZooming: 'auto'|'none'; - isolatedItem: K1; - labelDisplay: 'on'|'off'|'auto'; - labelType: 'long'|'short'; - linkData: oj.DataProvider|null; - mapProvider: {geo: object, propertiesKeys: {id: string, longLabel?: string, shortLabel?: string}}; - markerData: oj.DataProvider|null; - markerZoomBehavior: 'zoom'|'fixed'; - maxZoom: number; - panning: 'auto'|'none'; - renderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - selection: Array; - selectionMode: 'single'|'multiple'|'none'; - selectionRenderer: ((context: oj.ojThematicMap.RendererContext) => ({insert: SVGElement}|void)); - styleDefaults: {areaSvgStyle?: object, dataAreaDefaults?: {borderColor?: string, hoverColor?: string, selectedInnerColor?: string, selectedOuterColor?: string}, dataMarkerDefaults?: {borderColor?: string, borderStyle?: 'none'|'solid', borderWidth?: number, color?: string, height?: number, labelStyle?: object, opacity?: number, shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string, width?: number}, hoverBehaviorDelay?: number, labelStyle?: object, linkDefaults?: {color?: string, width?: number}}; - tooltip: {renderer: ((context: oj.ojThematicMap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - tooltipDisplay: 'auto'|'labelAndShortDesc'|'none'|'shortDesc'; - touchResponse: 'touchStart'|'auto'; - zooming: 'auto'|'none'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojThematicMap { - type DataContext = - { - color: string, label: string, selected: boolean, tooltip: string - } - } - namespace ojThematicMap { - type NodeContext = - { - subId: string, index: number - } - } - namespace ojThematicMap { - type RendererContext = - { - color: string, componentElement: Element, data: object, id: K1|K2|K3, itemData: D1|D2|D3, label: string, location: string|null, parentElement: Element, previousState: {hovered: boolean, selected: boolean, focused: boolean}, renderDefaultFocus: (()=> void), renderDefaultHover: (()=> void), renderDefaultSelection: (()=> void), root: Element|null, state: {hovered: boolean, selected: boolean, focused: boolean}, x: number|null, y: number|null - } - } - namespace ojThematicMap { - type TooltipContext = - { - color: string|null, componentElement: Element, data: object|null, id: K1|K2|K3, itemData: D1|D2|D3, label: string|null, location: string|null, locationName: string|null, parentElement: Element, tooltip: string, x: number, y: number - } - } - -} -declare namespace oj { - class ojThematicMapArea extends JetElement { - categories: Array; - color: string; - label: string; - labelStyle: object; - location: string; - opacity: number; - selectable: 'auto'|'off'; - shortDesc: string; - svgClassName: string; - svgStyle: object; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLocationChanged: (event: CustomEvent)=> any; - onOpacityChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapAreaEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'locationChanged': CustomEvent; - 'opacityChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - } - interface ojThematicMapAreaSettableProperties extends JetSettableProperties { - categories: Array; - color: string; - label: string; - labelStyle: object; - location: string; - opacity: number; - selectable: 'auto'|'off'; - shortDesc: string; - svgClassName: string; - svgStyle: object; - } - -} -declare namespace oj { - class ojThematicMapLink extends JetElement { - categories: Array; - color: string; - endLocation: {id?: any, location?: string, x?: number, y?: number}; - selectable: 'auto'|'off'; - shortDesc: string; - startLocation: {id?: any, location?: string, x?: number, y?: number}; - svgClassName: string; - svgStyle: object; - width: number; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onEndLocationChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onStartLocationChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onWidthChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapLinkEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'endLocationChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'startLocationChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'widthChanged': CustomEvent; - } - interface ojThematicMapLinkSettableProperties extends JetSettableProperties { - categories: Array; - color: string; - endLocation: {id?: any, location?: string, x?: number, y?: number}; - selectable: 'auto'|'off'; - shortDesc: string; - startLocation: {id?: any, location?: string, x?: number, y?: number}; - svgClassName: string; - svgStyle: object; - width: number; - } - -} -declare namespace oj { - class ojThematicMapMarker extends JetElement { - borderColor: string; - borderStyle: 'solid'|'none'; - borderWidth: number; - categories: Array; - color: string; - height: number; - label: string; - labelPosition: 'bottom'|'center'|'top'; - labelStyle: object; - location: string; - opacity: number; - rotation: number; - selectable: 'auto'|'off'; - shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - value: number; - width: number; - x: number|null; - y: number|null; - onBorderColorChanged: (event: CustomEvent)=> any; - onBorderStyleChanged: (event: CustomEvent)=> any; - onBorderWidthChanged: (event: CustomEvent)=> any; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onHeightChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelPositionChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLocationChanged: (event: CustomEvent)=> any; - onOpacityChanged: (event: CustomEvent)=> any; - onRotationChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShapeChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSourceChanged: (event: CustomEvent)=> any; - onSourceHoverChanged: (event: CustomEvent)=> any; - onSourceHoverSelectedChanged: (event: CustomEvent)=> any; - onSourceSelectedChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - onWidthChanged: (event: CustomEvent)=> any; - onXChanged: (event: CustomEvent)=> any; - onYChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojThematicMapMarkerEventMap extends oj.JetElementEventMap { - 'borderColorChanged': CustomEvent; - 'borderStyleChanged': CustomEvent; - 'borderWidthChanged': CustomEvent; - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'heightChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelPositionChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'locationChanged': CustomEvent; - 'opacityChanged': CustomEvent; - 'rotationChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shapeChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'sourceChanged': CustomEvent; - 'sourceHoverChanged': CustomEvent; - 'sourceHoverSelectedChanged': CustomEvent; - 'sourceSelectedChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - 'widthChanged': CustomEvent; - 'xChanged': CustomEvent; - 'yChanged': CustomEvent; - } - interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { - borderColor: string; - borderStyle: 'solid'|'none'; - borderWidth: number; - categories: Array; - color: string; - height: number; - label: string; - labelPosition: 'bottom'|'center'|'top'; - labelStyle: object; - location: string; - opacity: number; - rotation: number; - selectable: 'auto'|'off'; - shape?: 'circle'|'diamond'|'ellipse'|'human'|'plus'|'rectangle'|'square'|'star'|'triangleDown'|'triangleUp'|string; - shortDesc: string; - source: string; - sourceHover: string; - sourceHoverSelected: string; - sourceSelected: string; - svgClassName: string; - svgStyle: object; - value: number; - width: number; - x: number|null; - y: number|null; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts deleted file mode 100644 index ba23106a05..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtime-base/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -/// -declare namespace oj { - abstract class dvtTimeComponent extends dvtBaseComponent { - - addEventListener(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface dvtTimeComponentEventMap extends oj.dvtBaseComponentEventMap { - } - interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts deleted file mode 100644 index 1710eb655d..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtimeaxis/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/// -/// -/// -declare namespace oj { - class ojTimeAxis extends dvtBaseComponent { - converter: oj.ojTimeAxis.Converter|oj.Converter; - end: string; - scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; - start: string; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - onConverterChanged: (event: CustomEvent)=> any; - onEndChanged: (event: CustomEvent)=> any; - onScaleChanged: (event: CustomEvent)=> any; - onStartChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTimeAxisEventMap extends oj.dvtBaseComponentEventMap { - 'converterChanged': CustomEvent; - 'endChanged': CustomEvent; - 'scaleChanged': CustomEvent; - 'startChanged': CustomEvent; - } - interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { - converter: oj.ojTimeAxis.Converter|oj.Converter; - end: string; - scale: 'seconds'|'minutes'|'hours'|'days'|'weeks'|'months'|'quarters'|'years'; - start: string; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string}; - } - namespace ojTimeAxis { - type Converter = - { - default?: oj.Converter, seconds?: oj.Converter, minutes?: oj.Converter, hours?: oj.Converter, days?: oj.Converter, weeks?: oj.Converter, months?: oj.Converter, quarters?: oj.Converter, years?: oj.Converter - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts b/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts deleted file mode 100644 index 9252a83ed8..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtimeutils/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare namespace oj { - class TimeUtils { - static getDate(pos: number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - static getLength(startTime: Date|string|number, endTime: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - static getPosition(time: Date|string|number, rangeStartTime: Date|string|number, rangeEndTime: Date|string|number, rangeWidth: number): number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts b/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts deleted file mode 100644 index a8eec009ec..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtoolbar/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/// -declare namespace oj { - class ojToolbar extends baseComponent { - chroming: 'full'|'half'|'outlined'; - onChromingChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - refresh(): void; - } - interface ojToolbarEventMap extends oj.baseComponentEventMap { - 'chromingChanged': CustomEvent; - } - interface ojToolbarSettableProperties extends baseComponentSettableProperties { - chroming: 'full'|'half'|'outlined'; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts b/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts deleted file mode 100644 index db6720b353..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtrain/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/// -declare namespace oj { - class ojTrain extends baseComponent { - selectedStep: string; - steps: Array; - onSelectedStepChanged: (event: CustomEvent)=> any; - onStepsChanged: (event: CustomEvent)=> any; - onOjBeforeDeselect: (event: oj.ojTrain.ojBeforeDeselect)=> any; - onOjBeforeSelect: (event: oj.ojTrain.ojBeforeSelect)=> any; - onOjDeselect: (event: oj.ojTrain.ojDeselect)=> any; - onOjSelect: (event: oj.ojTrain.ojSelect)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getNextSelectableStep(): string|null; - getPreviousSelectableStep(): string|null; - getStep(id: string): oj.ojTrain.Step|null; - refresh(): void; - updateStep(id: string, stepProperties: {id?: string, label?: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning'}): void; - } - namespace ojTrain { - class ojBeforeDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojBeforeSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojDeselect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - - class ojSelect extends CustomEvent<{toStep: string, fromStep: string, [propName: string]: any}> { - - } - } - interface ojTrainEventMap extends oj.baseComponentEventMap { - 'ojBeforeDeselect': oj.ojTrain.ojBeforeDeselect; - 'ojBeforeSelect': oj.ojTrain.ojBeforeSelect; - 'ojDeselect': oj.ojTrain.ojDeselect; - 'ojSelect': oj.ojTrain.ojSelect; - 'selectedStepChanged': CustomEvent; - 'stepsChanged': CustomEvent; - } - interface ojTrainSettableProperties extends baseComponentSettableProperties { - selectedStep: string; - steps: Array; - } - namespace ojTrain { - type Step = - { - id: string, label: string, disabled?: boolean, visited?: boolean, messageType?: 'info'|'error'|'fatal'|'warning' - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts deleted file mode 100644 index 333e0208ec..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtreedataprovider/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -declare namespace oj { - interface TreeDataProvider extends DataProvider { - getChildDataProvider(any): TreeDataProvider - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts b/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts deleted file mode 100644 index 96a1db2873..0000000000 --- a/types/@oracle/oraclejet/ojs/ojtreemap/index.d.ts +++ /dev/null @@ -1,241 +0,0 @@ -/// -/// -declare namespace oj { - class ojTreemap extends dvtBaseComponent> { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - groupGaps: 'all'|'none'|'outer'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - isolatedNode: any; - layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; - nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; - nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; - nodeSeparators: 'bevels'|'gaps'; - rootNode: any; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; - onAnimationDurationChanged: (event: CustomEvent)=> any; - onAnimationOnDataChangeChanged: (event: CustomEvent)=> any; - onAnimationOnDisplayChanged: (event: CustomEvent)=> any; - onAnimationUpdateColorChanged: (event: CustomEvent)=> any; - onAsChanged: (event: CustomEvent)=> any; - onColorLabelChanged: (event: CustomEvent)=> any; - onDataChanged: (event: CustomEvent)=> any; - onDisplayLevelsChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupGapsChanged: (event: CustomEvent)=> any; - onHiddenCategoriesChanged: (event: CustomEvent)=> any; - onHighlightMatchChanged: (event: CustomEvent)=> any; - onHighlightedCategoriesChanged: (event: CustomEvent)=> any; - onHoverBehaviorChanged: (event: CustomEvent)=> any; - onHoverBehaviorDelayChanged: (event: CustomEvent)=> any; - onIsolatedNodeChanged: (event: CustomEvent)=> any; - onLayoutChanged: (event: CustomEvent)=> any; - onNodeContentChanged: (event: CustomEvent)=> any; - onNodeDefaultsChanged: (event: CustomEvent)=> any; - onNodeSeparatorsChanged: (event: CustomEvent)=> any; - onRootNodeChanged: (event: CustomEvent)=> any; - onSelectionChanged: (event: CustomEvent)=> any; - onSelectionModeChanged: (event: CustomEvent)=> any; - onSizeLabelChanged: (event: CustomEvent)=> any; - onSortingChanged: (event: CustomEvent)=> any; - onTooltipChanged: (event: CustomEvent)=> any; - onTouchResponseChanged: (event: CustomEvent)=> any; - onOjBeforeDrill: (event: oj.ojTreemap.ojBeforeDrill)=> any; - onOjDrill: (event: oj.ojTreemap.ojDrill)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - getContextByNode(node: Element): oj.ojTreemap.NodeContext|null; - getNode(subIdPath: Array): oj.ojTreemap.DataContext|null; - } - namespace ojTreemap { - class ojBeforeDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - - class ojDrill extends CustomEvent<{id: any, data: object, itemData: object, [propName: string]: any}> { - - } - } - interface ojTreemapEventMap extends oj.dvtBaseComponentEventMap { - 'ojBeforeDrill': oj.ojTreemap.ojBeforeDrill; - 'ojDrill': oj.ojTreemap.ojDrill; - 'animationDurationChanged': CustomEvent; - 'animationOnDataChangeChanged': CustomEvent; - 'animationOnDisplayChanged': CustomEvent; - 'animationUpdateColorChanged': CustomEvent; - 'asChanged': CustomEvent; - 'colorLabelChanged': CustomEvent; - 'dataChanged': CustomEvent; - 'displayLevelsChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupGapsChanged': CustomEvent; - 'hiddenCategoriesChanged': CustomEvent; - 'highlightMatchChanged': CustomEvent; - 'highlightedCategoriesChanged': CustomEvent; - 'hoverBehaviorChanged': CustomEvent; - 'hoverBehaviorDelayChanged': CustomEvent; - 'isolatedNodeChanged': CustomEvent; - 'layoutChanged': CustomEvent; - 'nodeContentChanged': CustomEvent; - 'nodeDefaultsChanged': CustomEvent; - 'nodeSeparatorsChanged': CustomEvent; - 'rootNodeChanged': CustomEvent; - 'selectionChanged': CustomEvent; - 'selectionModeChanged': CustomEvent; - 'sizeLabelChanged': CustomEvent; - 'sortingChanged': CustomEvent; - 'tooltipChanged': CustomEvent; - 'touchResponseChanged': CustomEvent; - } - interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { - animationDuration: number; - animationOnDataChange: 'auto'|'none'; - animationOnDisplay: 'auto'|'none'; - animationUpdateColor: string; - as: string; - colorLabel: string; - data: oj.DataProvider|null; - displayLevels: number; - drilling: 'on'|'off'; - groupGaps: 'all'|'none'|'outer'; - hiddenCategories: Array; - highlightMatch: 'any'|'all'; - highlightedCategories: Array; - hoverBehavior: 'dim'|'none'; - hoverBehaviorDelay: number; - isolatedNode: any; - layout: 'sliceAndDiceHorizontal'|'sliceAndDiceVertical'|'squarified'; - nodeContent: {renderer: ((context: oj.ojTreemap.NodeContentContext) => ({insert: Element|string}))}; - nodeDefaults: {groupLabelDisplay: 'node'|'off'|'header', header: {backgroundColor: string, borderColor: string, hoverBackgroundColor: string, hoverInnerColor: string, hoverOuterColor: string, isolate: 'off'|'on', labelHalign: 'center'|'end'|'start', labelStyle: object, selectedBackgroundColor: string, selectedInnerColor: string, selectedOuterColor: string, useNodeColor: 'on'|'off'}, hoverColor: string, labelDisplay: 'off'|'node', labelHalign: 'start'|'end'|'center', labelMinLength: number, labelStyle: object, labelValign: 'top'|'bottom'|'center', selectedInnerColor: string, selectedOuterColor: string}; - nodeSeparators: 'bevels'|'gaps'; - rootNode: any; - selection: Array; - selectionMode: 'none'|'single'|'multiple'; - sizeLabel: string; - sorting: 'on'|'off'; - tooltip: {renderer: ((context: oj.ojTreemap.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))}; - touchResponse: 'touchStart'|'auto'; - translations: {componentName?: string, labelAndValue?: string, labelClearSelection?: string, labelColor?: string, labelCountWithTotal?: string, labelDataVisualization?: string, labelInvalidData?: string, labelNoData?: string, labelSize?: string, stateCollapsed?: string, stateDrillable?: string, stateExpanded?: string, stateHidden?: string, stateIsolated?: string, stateMaximized?: string, stateMinimized?: string, stateSelected?: string, stateUnselected?: string, stateVisible?: string, tooltipIsolate?: string, tooltipRestore?: string}; - } - namespace ojTreemap { - type DataContext = - { - color: string, label: string, selected: boolean, size: number, tooltip: string - } - } - namespace ojTreemap { - type NodeContentContext = - { - bounds: {x: number, y: number, width: number, height: number}, id: K, data: object, itemData: D, componentElement: Element - } - } - namespace ojTreemap { - type NodeContext = - { - subId: string, indexPath: Array - } - } - namespace ojTreemap { - type TooltipContext = - { - parentElement: Element, id: K, label: string, value: number, color: string, data: object, itemData: D, componentElement: Element - } - } - -} -declare namespace oj { - class ojTreemapNode extends JetElement { - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupLabelDisplay?: 'node'|'off'|'header'; - header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; - label?: string; - labelDisplay?: 'off'|'node'; - labelHalign?: 'start'|'end'|'center'; - labelStyle?: object; - labelValign?: 'top'|'bottom'|'center'; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - selectable?: 'off'|'auto'; - shortDesc?: string; - svgClassName?: string; - svgStyle?: object; - value: number; - onCategoriesChanged: (event: CustomEvent)=> any; - onColorChanged: (event: CustomEvent)=> any; - onDrillingChanged: (event: CustomEvent)=> any; - onGroupLabelDisplayChanged: (event: CustomEvent)=> any; - onHeaderChanged: (event: CustomEvent)=> any; - onLabelChanged: (event: CustomEvent)=> any; - onLabelDisplayChanged: (event: CustomEvent)=> any; - onLabelHalignChanged: (event: CustomEvent)=> any; - onLabelStyleChanged: (event: CustomEvent)=> any; - onLabelValignChanged: (event: CustomEvent)=> any; - onPatternChanged: (event: CustomEvent)=> any; - onSelectableChanged: (event: CustomEvent)=> any; - onShortDescChanged: (event: CustomEvent)=> any; - onSvgClassNameChanged: (event: CustomEvent)=> any; - onSvgStyleChanged: (event: CustomEvent)=> any; - onValueChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - } - interface ojTreemapNodeEventMap extends oj.JetElementEventMap { - 'categoriesChanged': CustomEvent; - 'colorChanged': CustomEvent; - 'drillingChanged': CustomEvent; - 'groupLabelDisplayChanged': CustomEvent; - 'headerChanged': CustomEvent; - 'labelChanged': CustomEvent; - 'labelDisplayChanged': CustomEvent; - 'labelHalignChanged': CustomEvent; - 'labelStyleChanged': CustomEvent; - 'labelValignChanged': CustomEvent; - 'patternChanged': CustomEvent; - 'selectableChanged': CustomEvent; - 'shortDescChanged': CustomEvent; - 'svgClassNameChanged': CustomEvent; - 'svgStyleChanged': CustomEvent; - 'valueChanged': CustomEvent; - } - interface ojTreemapNodeSettableProperties extends JetSettableProperties { - categories?: Array; - color?: string; - drilling?: 'on'|'off'|'inherit'; - groupLabelDisplay?: 'node'|'off'|'header'; - header?: {isolate?: 'off'|'on', labelHalign?: 'center'|'end'|'start', labelStyle?: object, useNodeColor?: 'on'|'off'}; - label?: string; - labelDisplay?: 'off'|'node'; - labelHalign?: 'start'|'end'|'center'; - labelStyle?: object; - labelValign?: 'top'|'bottom'|'center'; - pattern?: 'smallChecker'|'smallCrosshatch'|'smallDiagonalLeft'|'smallDiagonalRight'|'smallDiamond'|'smallTriangle'|'largeChecker'|'largeCrosshatch'|'largeDiagonalLeft'|'largeDiagonalRight'|'largeDiamond'|'largeTriangle'|'none'; - selectable?: 'off'|'auto'; - shortDesc?: string; - svgClassName?: string; - svgStyle?: object; - value: number; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts deleted file mode 100644 index 01a6280ff9..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-base/index.d.ts +++ /dev/null @@ -1,188 +0,0 @@ -/// -/// -declare namespace oj { - interface AsyncValidator { - hint: Promise; - validate(value: V): Promise - } - -} -declare namespace oj { - class ColorConverter extends Converter { - constructor(options?: oj.ColorConverter.ConverterOptions); - format(color: oj.Color): string|null; - getHint(): string; - parse(value: string): oj.Color; - resolvedOptions(): oj.ColorConverter.ConverterOptions; - } - namespace ColorConverter { - type ConverterOptions = - { - format?: 'rgb'|'hsl'|'hsv'|'hex'|'hex3' - } - } - -} -declare namespace oj { - class ColorConverterFactory { - createConverter(options?: oj.ColorConverter.ConverterOptions): oj.ColorConverter; - } - -} -declare namespace oj { - class Converter { - format(value: V): string|null; - getHint?(): string|null - getOptions?(): object - parse(value: string): V; - resolvedOptions?(): object - } - -} -declare namespace oj { - class ConverterError { - constructor(summary: string, detail: string); - getMessage(): oj.Message; - } - -} -declare namespace oj { - class ConverterFactory { - static CONVERTER_TYPE_COLOR: string; - static CONVERTER_TYPE_DATETIME: string; - static CONVERTER_TYPE_NUMBER: string; - createConverter(options: object|null): oj.Converter; - } - -} -declare namespace oj { - class IntlConverterUtils { - static dateToLocalIso(date: Date): string; - static getConverterInstance(converterOption: string|oj.Validation.RegisteredConverter|oj.Converter): oj.Converter|null - static getInitials(firstName?: string, lastName?: string): string|undefined; - static getLocalTimeZoneOffset(): string; - static isoToDate(isoString: string): Date; - static isoToLocalDate(isoString: string): Date; - } - -} -declare namespace oj { - class LengthValidator extends Validator { - static defaults: {countBy: string}; - constructor(options?: oj.LengthValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace LengthValidator { - type ValidatorOptions = - { - countBy?: 'codeUnit'|'codePoint', min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {tooLong?: string, tooShort?: string}, messageSummary?: {tooLong?: string, tooShort?: string} - } - } - -} -declare namespace oj { - class LengthValidatorFactory { - createValidator(options?: oj.LengthValidator.ValidatorOptions): oj.LengthValidator; - } - -} -declare namespace oj { - class LocaleData { - static getDayNames(type?: 'abbreviated'|'narrow'|'wide'): Array; - static getFirstDayOfWeek(): number; - static getMonthNames(type?: 'abbreviated'|'narrow'|'wide'): Array; - static getWeekendEnd(): number; - static getWeekendStart(): number; - static isMonthPriorToYear(): boolean; - static setBundle(bundle: object): void; - } - -} -declare namespace oj { - class RegExpValidator extends Validator { - constructor(options?: oj.RegExpValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace RegExpValidator { - type ValidatorOptions = - { - pattern?: string, hint?: string, messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class RegExpValidatorFactory { - createValidator(options: oj.RegExpValidator.ValidatorOptions): oj.RegExpValidator; - } - -} -declare namespace oj { - class RequiredValidator extends Validator { - constructor(options?: oj.RequiredValidator.ValidatorOptions); - getHint(): string|null; - validate(value: object|string|number): void; - } - namespace RequiredValidator { - type ValidatorOptions = - { - hint?: string, messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class RequiredValidatorFactory { - createValidator(options?: oj.RequiredValidator.ValidatorOptions): oj.RequiredValidator; - } - -} -declare namespace oj { - class Validation { - static converterFactory>(type:'number'|'color'|'datetime'|string, instance?:CF): CF|null - static getDefaultConverterFactory(type: 'number'|'color'|'datetime'): oj.ConverterFactory|null - static getDefaultValidatorFactory(type: 'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'): oj.ValidatorFactory|null - static validatorFactory>(type:'required'|'regexp'|'numberRange'|'length'|'dateTimeRange'|'dateRestriction'|string, instance?:VF): VF|null - } - namespace Validation { - type RegisteredConverter = - { - type: string, options?: object - } - } - namespace Validation { - type RegisteredValidator = - { - type: string, options?: object - } - } - -} -declare namespace oj { - class Validator { - getHint?(): string|null - validate(value: V): void; - } - -} -declare namespace oj { - class ValidatorError { - constructor(summary: string, detail: string); - getMessage(): oj.Message; - } - -} -declare namespace oj { - class ValidatorFactory { - static VALIDATOR_TYPE_DATERESTRICTION: string; - static VALIDATOR_TYPE_DATETIMERANGE: string; - static VALIDATOR_TYPE_LENGTH: string; - static VALIDATOR_TYPE_NUMBERRANGE: string; - static VALIDATOR_TYPE_REGEXP: string; - static VALIDATOR_TYPE_REQUIRED: string; - createValidator(options: object|null): oj.Validator; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts deleted file mode 100644 index f4ab6b312b..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-datetime/index.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/// -declare namespace oj { - class DateRestrictionValidator extends Validator { - constructor(options?: oj.DateRestrictionValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string): void; - } - namespace DateRestrictionValidator { - type DayFormatterInput = - { - fullYear: number, month: number, date: number - } - } - namespace DateRestrictionValidator { - type DayFormatterOutput = - { - disabled?: boolean, className?: string, tooltip?: string - } - } - namespace DateRestrictionValidator { - type ValidatorOptions = - { - dayFormatter?: ((param0: oj.DateRestrictionValidator.DayFormatterInput)=> oj.DateRestrictionValidator.DayFormatterOutput|null|'all'), messageSummary?: string, messageDetail?: string - } - } - -} -declare namespace oj { - class DateRestrictionValidatorFactory { - createValidator(options?: oj.DateRestrictionValidator.ValidatorOptions): oj.DateRestrictionValidator; - } - -} -declare namespace oj { - abstract class DateTimeConverter extends Converter { - abstract calculateWeek(value: string): number|undefined; - compareISODates(isoStr: string, isoStr2: string): number; - format(value: string): string|null; - getAvailableTimeZones(): Array; - abstract isDayNameSet():boolean - abstract isDaySet():boolean - abstract isHourInAMPMSet():boolean - abstract isHourInDaySet():boolean - abstract isMilliSecondSet():boolean - abstract isMinuteSet():boolean - abstract isMonthSet():boolean - abstract isSecondSet():boolean - abstract isYearSet():boolean - parse(value: string): string; - } - -} -declare namespace oj { - class DateTimeConverterFactory { - createConverter(options?: oj.IntlDateTimeConverter.ConverterOptions): oj.IntlDateTimeConverter; - } - -} -declare namespace oj { - class DateTimeRangeValidator extends Validator { - constructor(options?: oj.DateTimeRangeValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string): void; - } - namespace DateTimeRangeValidator { - type ValidatorOptions = - { - converter: oj.DateTimeConverter, min?: string, max?: string, hint?: {max?: string, min?: string, inRange?: string}, translationKey?: string, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} - } - } - -} -declare namespace oj { - class DateTimeRangeValidatorFactory { - createValidator(options?: oj.DateTimeRangeValidator.ValidatorOptions): oj.DateTimeRangeValidator; - } - -} -declare namespace oj { - class IntlDateTimeConverter extends DateTimeConverter { - constructor(options?: oj.IntlDateTimeConverter.ConverterOptions); - calculateWeek(value: string): number; - compareISODates(isoStr: string, isoStr2: string): number; - format(value: string): string|null; - formatRelative(value: string, relativeOptions?: {formatUsing?: string, dateField?: string, relativeTime?: string, dateOnly?: boolean, timeZone?: string}): string|null; - getAvailableTimeZones(): Array; - getHint(): null; - getOptions(): oj.IntlDateTimeConverter.ConverterOptions; - isDayNameSet(): boolean; - isDaySet(): boolean; - isHourInAMPMSet(): boolean; - isHourInDaySet(): boolean; - isMilliSecondSet(): boolean; - isMinuteSet(): boolean; - isMonthSet(): boolean; - isSecondSet(): boolean; - isYearSet(): boolean; - parse(value: string): string|null; - resolvedOptions(): oj.IntlDateTimeConverter.ConverterOptions; - } - namespace IntlDateTimeConverter { - type ConverterOptions = - { - year?: '2-digit'|'numeric', 'two-digit-year-start'?: number, month?: '2-digit'|'numeric'|'narrow'|'short'|'long', day?: '2-digit'|'numeric', hour?: '2-digit'|'numeric', minute?: '2-digit'|'numeric', second?: '2-digit'|'numeric', millisecond?: 'numeric', weekday?: 'narrow'|'short'|'long', era?: 'narrow'|'short'|'long', timeZoneName?: 'short'|'long', timeZone?: string, isoStrFormat?: 'offset'|'zulu'|'local'|'auto', dst?: boolean, hour12?: boolean, pattern?: string, formatType?: 'date'|'time'|'datetime', dateFormat?: 'short'|'medium'|'long'|'full', timeFormat?: 'short'|'medium'|'long'|'full', lenientParse?: 'full'|'none' - } - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts deleted file mode 100644 index d53b2b8258..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidation-number/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/// -declare namespace oj { - class IntlNumberConverter extends NumberConverter { - constructor(options?: oj.IntlNumberConverter.ConverterOptions); - format(value: number): string; - getHint(): null; - getOptions(): oj.IntlNumberConverter.ConverterOptions; - parse(value: string): number|null; - resolvedOptions(): oj.IntlNumberConverter.ConverterOptions; - } - namespace IntlNumberConverter { - type ConverterOptions = - { - style?: 'decimal'|'currency'|'percent'|'unit', currency?: string, unit?: 'byte'|'bit', currencyDisplay?: 'code'|'symbol'|'name', decimalFormat?: 'standard'|'short'|'long', currencyFormat?: 'standard'|'short'|'long', minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean, pattern?: string, roundingMode?: 'HALF_UP'|'HALF_DOWN'|'HALF_EVEN', roundDuringParse?: boolean, separators?: object, lenientParse?: 'full'|'none' - } - } - -} -declare namespace oj { - class NumberConverter extends Converter { - format(value: number): string|null; - parse(value: string): number; - } - -} -declare namespace oj { - class NumberConverterFactory { - createConverter(options?: oj.IntlNumberConverter.ConverterOptions): oj.IntlNumberConverter; - } - -} -declare namespace oj { - class NumberRangeValidator extends Validator { - constructor(options?: oj.NumberRangeValidator.ValidatorOptions); - getHint(): string|null; - validate(value: string|number): void; - } - namespace NumberRangeValidator { - type ValidatorOptions = - { - converter?: oj.NumberConverter, min?: number, max?: number, hint?: {max?: string, min?: string, inRange?: string, exact?: string}, messageDetail?: {rangeUnderflow?: string, rangeOverflow?: string, exact?: string}, messageSummary?: {rangeUnderflow?: string, rangeOverflow?: string} - } - } - -} -declare namespace oj { - class NumberRangeValidatorFactory { - createValidator(options?: oj.NumberRangeValidator.ValidatorOptions): oj.NumberRangeValidator; - } - -} diff --git a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts b/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts deleted file mode 100644 index c714ed9ecc..0000000000 --- a/types/@oracle/oraclejet/ojs/ojvalidationgroup/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare namespace oj { - class ojValidationGroup extends JetElement { - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - onValidChanged: (event: CustomEvent)=> any; - - addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - focusOn(key?: '@firstInvalidShown'): void; - getProperty(property: string): any; - setProperties(properties: object): void; - setProperty(property: string, value: any): void; - showMessages(): void; - } - interface ojValidationGroupEventMap extends oj.JetElementEventMap { - 'validChanged': CustomEvent; - } - interface ojValidationGroupSettableProperties extends JetSettableProperties { - readonly valid: 'valid'|'pending'|'invalidHidden'|'invalidShown'; - } - -} diff --git a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts b/types/@oracle/tests/oraclejet/@oraclejet-tests.ts deleted file mode 100644 index 9fc8ff4951..0000000000 --- a/types/@oracle/tests/oraclejet/@oraclejet-tests.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. - * The Universal Permissive License (UPL), Version 1.0 - */ -import "ojs/ojcore"; -import "ojs/ojinputtext"; -import "ojs/ojinputnumber"; - -/** - * @public - * @export - */ -class Test { - value: string; - - constructor() { - let self = this; - self.value = "Good Morning"; - - let textInput = document.getElementById('text-input') as oj.ojInputText; - //test a custom API of the component - let rawVal: string = textInput.rawValue; - } -} - -export = Test; \ No newline at end of file diff --git a/types/@oracle/tslint.json b/types/@oracle/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/@oracle/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } diff --git a/types/oraclejet/index.d.ts b/types/oraclejet/index.d.ts new file mode 100644 index 0000000000..dd99802419 --- /dev/null +++ b/types/oraclejet/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for oraclejet 6.0 +// Project: https://github.com/oracle/oraclejet +// Definitions by: Naizam Olakara +// Jing Wu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 +import { Model, Collection } from './ojmodel'; +export namespace oj { + let revision: string; + let version: string; + function ajax(settings?: object): object; + function sync(method: string, model: Model | Collection, options?: object): object; +} +export interface baseComponent extends JetElement { + translations: object | null; + onTranslationsChanged: ((event: JetElementCustomEvent["translations"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: baseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): baseComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: baseComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: baseComponentSettablePropertiesLenient): void; + refresh(): void; +} +export interface baseComponentEventMap extends HTMLElementEventMap { + 'translationsChanged': JetElementCustomEvent["translations"]>; +} +export interface baseComponentSettableProperties extends JetSettableProperties { + translations: object | null; +} +export interface baseComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: keyof SP): void; +} +export interface JetElement extends HTMLElement, GenericSetter { + set(propertyName: K, propertyValue: SP[K]): void; + unset(propertyName: keyof SP): void; +} +export interface JetElementCustomEvent extends CustomEvent<{ + value: V; + previousValue: V; + updatedFrom: 'external' | 'internal'; + subproperty: { + path: string; + value: any; + previousValue: any; + [key: string]: any; + }; + [key: string]: any; +}> { +} +// This interfaces is empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface JetSettableProperties { +} +export type JetSetPropertyType = K extends keyof U ? U[K] : any; diff --git a/types/oraclejet/ojaccordion/index.d.ts b/types/oraclejet/ojaccordion/index.d.ts new file mode 100644 index 0000000000..15d843d90e --- /dev/null +++ b/types/oraclejet/ojaccordion/index.d.ts @@ -0,0 +1,66 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojAccordion extends baseComponent { + expanded: Array<{ + id?: string; + index?: number; + }> | null; + multiple: boolean; + onExpandedChanged: ((event: JetElementCustomEvent) => any) | null; + onMultipleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeCollapse: ((event: ojAccordion.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojAccordion.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojAccordion.ojCollapse) => any) | null; + onOjExpand: ((event: ojAccordion.ojExpand) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAccordionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojAccordion[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojAccordionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojAccordionSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojAccordion { + interface ojBeforeCollapse extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + toCollapsible: Element; + fromCollapsible: Element; + [propName: string]: any; + }> { + } +} +export interface ojAccordionEventMap extends baseComponentEventMap { + 'ojBeforeCollapse': ojAccordion.ojBeforeCollapse; + 'ojBeforeExpand': ojAccordion.ojBeforeExpand; + 'ojCollapse': ojAccordion.ojCollapse; + 'ojExpand': ojAccordion.ojExpand; + 'expandedChanged': JetElementCustomEvent; + 'multipleChanged': JetElementCustomEvent; +} +export interface ojAccordionSettableProperties extends baseComponentSettableProperties { + expanded: string[] | number[] | Array<{ + id?: string; + index?: number; + }> | null; + multiple: boolean; +} +export interface ojAccordionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojanimation/index.d.ts b/types/oraclejet/ojanimation/index.d.ts new file mode 100644 index 0000000000..e4b1d6dbc2 --- /dev/null +++ b/types/oraclejet/ojanimation/index.d.ts @@ -0,0 +1,111 @@ +export function collapse(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + startMaxHeight?: string; + endMaxHeight?: string; + startMaxWidth?: string; + endMaxWidth?: string; +}): Promise; +export function expand(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + startMaxHeight?: string; + endMaxHeight?: string; + startMaxWidth?: string; + endMaxWidth?: string; +}): Promise; +export function fadeIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function fadeOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function flipIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + startAngle?: string; + endAngle?: string; + backfaceVisibility?: string; + perspective?: string; + transformOrigin?: string; + flipTarget?: string; +}): Promise; +export function flipOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + startAngle?: string; + endAngle?: string; + backfaceVisibility?: string; + perspective?: string; + transformOrigin?: string; + flipTarget?: string; +}): Promise; +export function ripple(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + offsetX?: string; + offsetY?: string; + color?: string; + diameter?: string; + startOpacity?: number; + endOpacity?: number; +}): Promise; +export function slideIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + offsetX?: string; + offsetY?: string; +}): Promise; +export function slideOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + direction?: string; + offsetX?: string; + offsetY?: string; +}): Promise; +export function zoomIn(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + transformOrigin?: string; +}): Promise; +export function zoomOut(element: Element, options?: { + delay?: string; + duration?: string; + timingFunction?: string; + persist?: string; + axis?: string; + transformOrigin?: string; +}): Promise; +// tslint:disable-next-line interface-over-type-literal +export type AnimationMethods = 'collapse' | 'expand' | 'fadeIn' | 'fadeOut' | 'flipIn' | 'flipOut' | 'ripple' | 'slideIn' | 'slideOut' | 'zoomIn' | 'zoomOut'; diff --git a/types/oraclejet/ojarraydataprovider/index.d.ts b/types/oraclejet/ojarraydataprovider/index.d.ts new file mode 100644 index 0000000000..884920c03e --- /dev/null +++ b/types/oraclejet/ojarraydataprovider/index.d.ts @@ -0,0 +1,27 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class ArrayDataProvider implements DataProvider { + constructor(data: any[] | (() => any[]), options?: { + sortComparators?: ArrayDataProvider.SortComparators; + implicitSort?: Array>; + keys?: any[] | (() => any[]); + idAttribute?: string | string[]; + keyAttributes?: string | string[]; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ArrayDataProvider; +declare namespace ArrayDataProvider { + interface SortComparators { + comparators: Map number>; + } +} diff --git a/types/oraclejet/ojarraytreedataprovider/index.d.ts b/types/oraclejet/ojarraytreedataprovider/index.d.ts new file mode 100644 index 0000000000..452b47a910 --- /dev/null +++ b/types/oraclejet/ojarraytreedataprovider/index.d.ts @@ -0,0 +1,25 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +import ArrayDataProvider = require('../ojarraydataprovider'); +import TreeDataProvider = require('../ojtreedataprovider'); +declare class ArrayTreeDataProvider implements TreeDataProvider { + constructor(data: any[] | (() => any[]), options?: { + sortComparators?: ArrayDataProvider.SortComparators; + implicitSort?: Array>; + keyAttributes?: string | string[]; + keyAttributesScope?: 'global' | 'siblings'; + childrenAttribute?: string; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getChildDataProvider(parentKey: any): ArrayTreeDataProvider; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ArrayTreeDataProvider; diff --git a/types/oraclejet/ojattributegrouphandler/index.d.ts b/types/oraclejet/ojattributegrouphandler/index.d.ts new file mode 100644 index 0000000000..3442581069 --- /dev/null +++ b/types/oraclejet/ojattributegrouphandler/index.d.ts @@ -0,0 +1,23 @@ +export class AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + addMatchRule(category: string, attributeValue: any): void; + getCategoryAssignments(): Array<{ + [propName: string]: any; + }>; + getValue(category: string): any; + getValueRamp(): any[]; +} +export class ColorAttributeGroupHandler extends AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + getValueRamp(): string[]; +} +export class ShapeAttributeGroupHandler extends AttributeGroupHandler { + constructor(matchRules?: { + [propName: string]: any; + }); + getValueRamp(): string[]; +} diff --git a/types/oraclejet/ojavatar/index.d.ts b/types/oraclejet/ojavatar/index.d.ts new file mode 100644 index 0000000000..ed82db0a5e --- /dev/null +++ b/types/oraclejet/ojavatar/index.d.ts @@ -0,0 +1,29 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojAvatar extends JetElement { + initials: string; + size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; + src: string; + onInitialsChanged: ((event: JetElementCustomEvent) => any) | null; + onSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSrcChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojAvatarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojAvatar[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojAvatarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojAvatarSettablePropertiesLenient): void; +} +export interface ojAvatarEventMap extends HTMLElementEventMap { + 'initialsChanged': JetElementCustomEvent; + 'sizeChanged': JetElementCustomEvent; + 'srcChanged': JetElementCustomEvent; +} +export interface ojAvatarSettableProperties extends JetSettableProperties { + initials: string; + size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; + src: string; +} +export interface ojAvatarSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojbutton/index.d.ts b/types/oraclejet/ojbutton/index.d.ts new file mode 100644 index 0000000000..542f5eec9e --- /dev/null +++ b/types/oraclejet/ojbutton/index.d.ts @@ -0,0 +1,165 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojButton extends baseComponent { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + onChromingChanged: ((event: JetElementCustomEvent["chroming"]>) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onOjAction: ((event: ojButton.ojAction) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButton[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonSettablePropertiesLenient): void; +} +export namespace ojButton { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojButtonEventMap extends baseComponentEventMap { + 'ojAction': ojButton.ojAction; + 'chromingChanged': JetElementCustomEvent["chroming"]>; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'displayChanged': JetElementCustomEvent["display"]>; +} +export interface ojButtonSettableProperties extends baseComponentSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; +} +export interface ojButtonSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonset extends baseComponent { + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojButtonsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojButtonsetEventMap extends baseComponentEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojButtonsetSettableProperties extends baseComponentSettableProperties { +} +export interface ojButtonsetSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonsetMany extends ojButtonset { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any[] | null; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onFocusManagementChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonsetMany[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetManySettablePropertiesLenient): void; +} +export interface ojButtonsetManyEventMap extends ojButtonsetEventMap { + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; + 'focusManagementChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojButtonsetManySettableProperties extends ojButtonsetSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any[] | null; +} +export interface ojButtonsetManySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojButtonsetOne extends ojButtonset { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onFocusManagementChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojButtonsetOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojButtonsetOne[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojButtonsetOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojButtonsetOneSettablePropertiesLenient): void; +} +export interface ojButtonsetOneEventMap extends ojButtonsetEventMap { + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; + 'focusManagementChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojButtonsetOneSettableProperties extends ojButtonsetSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + focusManagement: 'oneTabstop' | 'none'; + value: any; +} +export interface ojButtonsetOneSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojMenuButton extends ojButton { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAction: ((event: ojMenuButton.ojAction) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuButtonEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenuButton[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuButtonSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuButtonSettablePropertiesLenient): void; +} +export namespace ojMenuButton { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojMenuButtonEventMap extends ojButtonEventMap { + 'ojAction': ojMenuButton.ojAction; + 'chromingChanged': JetElementCustomEvent; + 'disabledChanged': JetElementCustomEvent; + 'displayChanged': JetElementCustomEvent; +} +export interface ojMenuButtonSettableProperties extends ojButtonSettableProperties { + chroming: 'full' | 'half' | 'outlined'; + disabled: boolean; + display: 'all' | 'icons'; +} +export interface ojMenuButtonSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojchart/index.d.ts b/types/oraclejet/ojchart/index.d.ts new file mode 100644 index 0000000000..25970f316e --- /dev/null +++ b/types/oraclejet/ojchart/index.d.ts @@ -0,0 +1,2104 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojChart extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'slideToLeft' | 'slideToRight' | 'none'; + animationOnDisplay: 'auto' | 'alphaFade' | 'zoom' | 'none'; + as: string; + coordinateSystem: 'polar' | 'cartesian'; + data: DataProvider | null; + dataCursor: 'off' | 'on' | 'auto'; + dataCursorBehavior: 'smooth' | 'snap' | 'auto'; + dataCursorPosition: { + x: number | string; + y: number; + y2: number; + }; + dataLabel: ((context: ojChart.DataLabelContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + dnd: { + drag: { + groups: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + items: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + series: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + }; + drop: { + legend: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + plotArea: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + xAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + y2Axis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + yAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + }; + }; + dragMode: 'pan' | 'zoom' | 'select' | 'off' | 'user'; + drilling: 'on' | 'seriesOnly' | 'groupsOnly' | 'off'; + groupComparator: ((param0: object, param1: object) => number) | null; + hiddenCategories: string[]; + hideAndShowBehavior: 'withRescale' | 'withoutRescale' | 'none'; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + initialZooming: 'first' | 'last' | 'none'; + legend: { + backgroundColor: string; + borderColor: string; + maxSize: string; + position: 'start' | 'end' | 'bottom' | 'top' | 'auto'; + referenceObjectSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + rendered: 'on' | 'off' | 'auto'; + scrolling: 'off' | 'asNeeded'; + sections: Array<{ + items: Array<{ + borderColor: string; + categories: string[]; + categoryVisibility: 'hidden' | 'visible'; + color: string; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc: string; + source: string; + symbolType: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + }>; + sections: object[]; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }>; + seriesSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + size: string; + symbolHeight: number; + symbolWidth: number; + textStyle: object; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + orientation: 'horizontal' | 'vertical'; + otherThreshold: number; + overview: { + content: object; + height: string; + rendered: 'on' | 'off'; + }; + pieCenter: { + converter: object; + label: string; + labelStyle: object; + renderer: ((context: ojChart.PieCenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + plotArea: { + backgroundColor: string; + borderColor: string; + borderWidth: number; + rendered: 'off' | 'on'; + }; + polarGridShape: 'polygon' | 'circle'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + seriesComparator: ((param0: object, param1: object) => number) | null; + sorting: 'ascending' | 'descending' | 'off'; + splitDualY: 'on' | 'off' | 'auto'; + splitterPosition: number; + stack: 'on' | 'off'; + stackLabel: 'on' | 'off'; + styleDefaults: { + animationDownColor: string; + animationDuration: number; + animationIndicators: 'none' | 'all'; + animationUpColor: string; + barGapRatio: number; + borderColor: string; + borderWidth: number; + boxPlot: { + medianSvgClassName: string; + medianSvgStyle: object; + whiskerEndLength: string; + whiskerEndSvgClassName: string; + whiskerEndSvgStyle: object; + whiskerSvgClassName: string; + whiskerSvgStyle: object; + }; + colors: string[]; + dataCursor: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'off' | 'on'; + markerSize: number; + }; + dataItemGaps: string; + dataLabelPosition: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + dataLabelStyle: object | object[]; + funnelBackgroundColor: string; + groupSeparators: { + color: string; + rendered: 'off' | 'auto'; + }; + hoverBehaviorDelay: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'on' | 'off' | 'auto'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + marqueeBorderColor: string; + marqueeColor: string; + maxBarWidth: number; + otherColor: string; + patterns: string[]; + pieFeelerColor: string; + pieInnerRadius: number; + selectionEffect: 'explode' | 'highlightAndExplode' | 'highlight'; + seriesEffect: 'color' | 'pattern' | 'gradient'; + shapes: string[]; + stackLabelStyle: object; + stockFallingColor: string; + stockRangeColor: string; + stockRisingColor: string; + stockVolumeColor: string; + threeDEffect: 'on' | 'off'; + tooltipLabelStyle: object; + tooltipValueStyle: object; + }; + timeAxisType: 'enabled' | 'mixedFrequency' | 'skipGaps' | 'disabled' | 'auto'; + tooltip: { + renderer: ((context: ojChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + type: 'line' | 'area' | 'lineWithArea' | 'stock' | 'boxPlot' | 'combo' | 'pie' | 'scatter' | 'bubble' | 'funnel' | 'pyramid' | 'bar'; + valueFormats: { + close: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + group: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string | string[]; + }; + high: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + label: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + low: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + open: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q1: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q3: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + series: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + targetValue: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + value: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + volume: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + x: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + z: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + }; + xAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'off' | 'on'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number | string; + maxSize: string; + min: number | string; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + rendered: 'off' | 'on'; + rotation: 'none' | 'auto'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportEndGroup: number | string; + viewportMax: number | string; + viewportMin: number | string; + viewportStartGroup: number | string; + }; + y2Axis: { + alignTickMarks: 'off' | 'on'; + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + }; + yAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportMax: number; + viewportMin: number; + }; + zoomAndScroll: 'delayedScrollOnly' | 'liveScrollOnly' | 'delayed' | 'live' | 'off'; + zoomDirection: 'x' | 'y' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelClose?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelDefaultGroupName?: string; + labelGroup?: string; + labelHigh?: string; + labelInvalidData?: string; + labelLow?: string; + labelNoData?: string; + labelOpen?: string; + labelOther?: string; + labelPercentage?: string; + labelQ1?: string; + labelQ2?: string; + labelQ3?: string; + labelSeries?: string; + labelTargetValue?: string; + labelValue?: string; + labelVolume?: string; + labelX?: string; + labelY?: string; + labelZ?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipPan?: string; + tooltipSelect?: string; + tooltipZoom?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCoordinateSystemChanged: ((event: JetElementCustomEvent["coordinateSystem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDataCursorChanged: ((event: JetElementCustomEvent["dataCursor"]>) => any) | null; + onDataCursorBehaviorChanged: ((event: JetElementCustomEvent["dataCursorBehavior"]>) => any) | null; + onDataCursorPositionChanged: ((event: JetElementCustomEvent["dataCursorPosition"]>) => any) | null; + onDataLabelChanged: ((event: JetElementCustomEvent["dataLabel"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onDragModeChanged: ((event: JetElementCustomEvent["dragMode"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onGroupComparatorChanged: ((event: JetElementCustomEvent["groupComparator"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHideAndShowBehaviorChanged: ((event: JetElementCustomEvent["hideAndShowBehavior"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onInitialZoomingChanged: ((event: JetElementCustomEvent["initialZooming"]>) => any) | null; + onLegendChanged: ((event: JetElementCustomEvent["legend"]>) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent["orientation"]>) => any) | null; + onOtherThresholdChanged: ((event: JetElementCustomEvent["otherThreshold"]>) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent["overview"]>) => any) | null; + onPieCenterChanged: ((event: JetElementCustomEvent["pieCenter"]>) => any) | null; + onPlotAreaChanged: ((event: JetElementCustomEvent["plotArea"]>) => any) | null; + onPolarGridShapeChanged: ((event: JetElementCustomEvent["polarGridShape"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSeriesComparatorChanged: ((event: JetElementCustomEvent["seriesComparator"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onSplitDualYChanged: ((event: JetElementCustomEvent["splitDualY"]>) => any) | null; + onSplitterPositionChanged: ((event: JetElementCustomEvent["splitterPosition"]>) => any) | null; + onStackChanged: ((event: JetElementCustomEvent["stack"]>) => any) | null; + onStackLabelChanged: ((event: JetElementCustomEvent["stackLabel"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTimeAxisTypeChanged: ((event: JetElementCustomEvent["timeAxisType"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent["type"]>) => any) | null; + onValueFormatsChanged: ((event: JetElementCustomEvent["valueFormats"]>) => any) | null; + onXAxisChanged: ((event: JetElementCustomEvent["xAxis"]>) => any) | null; + onY2AxisChanged: ((event: JetElementCustomEvent["y2Axis"]>) => any) | null; + onYAxisChanged: ((event: JetElementCustomEvent["yAxis"]>) => any) | null; + onZoomAndScrollChanged: ((event: JetElementCustomEvent["zoomAndScroll"]>) => any) | null; + onZoomDirectionChanged: ((event: JetElementCustomEvent["zoomDirection"]>) => any) | null; + onOjDrill: ((event: ojChart.ojDrill) => any) | null; + onOjSelectInput: ((event: ojChart.ojSelectInput) => any) | null; + onOjViewportChange: ((event: ojChart.ojViewportChange) => any) | null; + onOjViewportChangeInput: ((event: ojChart.ojViewportChangeInput) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojChartSettablePropertiesLenient): void; + getContextByNode(node: Element): ojChart.PieCenterLabelContext | ojChart.LegendItemContext | ojChart.ReferenceObject | ojChart.GroupContext | ojChart.AxisTitleContext | ojChart.ItemContext | + ojChart.SeriesContext; + getDataItem(seriesIndex: number, groupIndex: number): object | null; + getGroup(groupIndex: string): string; + getGroupCount(): number; + getLegend(): object; + getPlotArea(): object; + getSeries(seriesIndex: string): string; + getSeriesCount(): number; + getValuesAt(x: number, y: number): object; + getXAxis(): object; + getY2Axis(): object; + getYAxis(): object; +} +export namespace ojChart { + interface ojDrill extends CustomEvent<{ + id: string; + series: string; + group: string; + data: object; + itemData: object; + seriesData: object; + groupData: any[]; + [propName: string]: any; + }> { + } + interface ojSelectInput extends CustomEvent<{ + items: any[]; + selectionData: Array<{ + data: object; + itemData: object; + groupData: any[]; + seriesData: object; + }>; + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + interface ojViewportChange extends CustomEvent<{ + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + interface ojViewportChangeInput extends CustomEvent<{ + endGroup: string; + startGroup: string; + xMax: number; + xMin: number; + yMax: number; + yMin: number; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type AxisTitleContext = { + axis: 'xAxis' | 'yAxis' | 'y2Axis'; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type DataLabelContext = { + id: any; + series: string; + group: string | string[]; + value: number; + targetValue: number; + x: number | string; + y: number; + z: number; + low: number; + high: number; + open: number; + close: number; + volume: number; + label: string; + totalValue: number; + data: object | null; + itemData: object | null; + seriesData: object | null; + groupData: object | null; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type GroupContext = { + indexPath: any[]; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + seriesIndex: number; + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type LegendItemContext = { + sectionIndexPath: any[]; + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type PieCenterContext = { + outerBounds: object; + innerBounds: object; + label: string; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type PieCenterLabelContext = { + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + axis: 'xAxis' | 'yAxis' | 'y2Axis'; + index: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type SeriesContext = { + itemIndex: number; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: any; + series: string; + group: string | string[]; + label: string; + value: number; + x: number | string; + y: number; + z: number; + low: number; + high: number; + open: number; + close: number; + volume: number; + targetValue: number; + data: object | null; + itemData: object | null; + seriesData: object | null; + groupData: object | null; + componentElement: Element; + color: string; + }; +} +export interface ojChartEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojChart.ojDrill; + 'ojSelectInput': ojChart.ojSelectInput; + 'ojViewportChange': ojChart.ojViewportChange; + 'ojViewportChangeInput': ojChart.ojViewportChangeInput; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'coordinateSystemChanged': JetElementCustomEvent["coordinateSystem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dataCursorChanged': JetElementCustomEvent["dataCursor"]>; + 'dataCursorBehaviorChanged': JetElementCustomEvent["dataCursorBehavior"]>; + 'dataCursorPositionChanged': JetElementCustomEvent["dataCursorPosition"]>; + 'dataLabelChanged': JetElementCustomEvent["dataLabel"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'dragModeChanged': JetElementCustomEvent["dragMode"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'groupComparatorChanged': JetElementCustomEvent["groupComparator"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'hideAndShowBehaviorChanged': JetElementCustomEvent["hideAndShowBehavior"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'initialZoomingChanged': JetElementCustomEvent["initialZooming"]>; + 'legendChanged': JetElementCustomEvent["legend"]>; + 'orientationChanged': JetElementCustomEvent["orientation"]>; + 'otherThresholdChanged': JetElementCustomEvent["otherThreshold"]>; + 'overviewChanged': JetElementCustomEvent["overview"]>; + 'pieCenterChanged': JetElementCustomEvent["pieCenter"]>; + 'plotAreaChanged': JetElementCustomEvent["plotArea"]>; + 'polarGridShapeChanged': JetElementCustomEvent["polarGridShape"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'seriesComparatorChanged': JetElementCustomEvent["seriesComparator"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'splitDualYChanged': JetElementCustomEvent["splitDualY"]>; + 'splitterPositionChanged': JetElementCustomEvent["splitterPosition"]>; + 'stackChanged': JetElementCustomEvent["stack"]>; + 'stackLabelChanged': JetElementCustomEvent["stackLabel"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'timeAxisTypeChanged': JetElementCustomEvent["timeAxisType"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'typeChanged': JetElementCustomEvent["type"]>; + 'valueFormatsChanged': JetElementCustomEvent["valueFormats"]>; + 'xAxisChanged': JetElementCustomEvent["xAxis"]>; + 'y2AxisChanged': JetElementCustomEvent["y2Axis"]>; + 'yAxisChanged': JetElementCustomEvent["yAxis"]>; + 'zoomAndScrollChanged': JetElementCustomEvent["zoomAndScroll"]>; + 'zoomDirectionChanged': JetElementCustomEvent["zoomDirection"]>; +} +export interface ojChartSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'slideToLeft' | 'slideToRight' | 'none'; + animationOnDisplay: 'auto' | 'alphaFade' | 'zoom' | 'none'; + as: string; + coordinateSystem: 'polar' | 'cartesian'; + data: DataProvider | null; + dataCursor: 'off' | 'on' | 'auto'; + dataCursorBehavior: 'smooth' | 'snap' | 'auto'; + dataCursorPosition: { + x: number | string; + y: number; + y2: number; + }; + dataLabel: ((context: ojChart.DataLabelContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + dnd: { + drag: { + groups: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + items: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + series: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + }; + drop: { + legend: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + plotArea: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + xAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + y2Axis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + yAxis: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + }; + }; + dragMode: 'pan' | 'zoom' | 'select' | 'off' | 'user'; + drilling: 'on' | 'seriesOnly' | 'groupsOnly' | 'off'; + groupComparator: ((param0: object, param1: object) => number) | null; + hiddenCategories: string[]; + hideAndShowBehavior: 'withRescale' | 'withoutRescale' | 'none'; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + initialZooming: 'first' | 'last' | 'none'; + legend: { + backgroundColor: string; + borderColor: string; + maxSize: string; + position: 'start' | 'end' | 'bottom' | 'top' | 'auto'; + referenceObjectSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + rendered: 'on' | 'off' | 'auto'; + scrolling: 'off' | 'asNeeded'; + sections: Array<{ + items: Array<{ + borderColor: string; + categories: string[]; + categoryVisibility: 'hidden' | 'visible'; + color: string; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc: string; + source: string; + symbolType: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + }>; + sections: object[]; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }>; + seriesSection: { + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + size: string; + symbolHeight: number; + symbolWidth: number; + textStyle: object; + title: string; + titleHalign: 'center' | 'end' | 'start'; + titleStyle: object; + }; + orientation: 'horizontal' | 'vertical'; + otherThreshold: number; + overview: { + content: object; + height: string; + rendered: 'on' | 'off'; + }; + pieCenter: { + converter: object; + label: string; + labelStyle: object; + renderer: ((context: ojChart.PieCenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + plotArea: { + backgroundColor: string; + borderColor: string; + borderWidth: number; + rendered: 'off' | 'on'; + }; + polarGridShape: 'polygon' | 'circle'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + seriesComparator: ((param0: object, param1: object) => number) | null; + sorting: 'ascending' | 'descending' | 'off'; + splitDualY: 'on' | 'off' | 'auto'; + splitterPosition: number; + stack: 'on' | 'off'; + stackLabel: 'on' | 'off'; + styleDefaults: { + animationDownColor: string; + animationDuration: number; + animationIndicators: 'none' | 'all'; + animationUpColor: string; + barGapRatio: number; + borderColor: string; + borderWidth: number; + boxPlot: { + medianSvgClassName: string; + medianSvgStyle: object; + whiskerEndLength: string; + whiskerEndSvgClassName: string; + whiskerEndSvgStyle: object; + whiskerSvgClassName: string; + whiskerSvgStyle: object; + }; + colors: string[]; + dataCursor: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'off' | 'on'; + markerSize: number; + }; + dataItemGaps: string; + dataLabelPosition: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + dataLabelStyle: object | object[]; + funnelBackgroundColor: string; + groupSeparators: { + color: string; + rendered: 'off' | 'auto'; + }; + hoverBehaviorDelay: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth: number; + markerColor: string; + markerDisplayed: 'on' | 'off' | 'auto'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + marqueeBorderColor: string; + marqueeColor: string; + maxBarWidth: number; + otherColor: string; + patterns: string[]; + pieFeelerColor: string; + pieInnerRadius: number; + selectionEffect: 'explode' | 'highlightAndExplode' | 'highlight'; + seriesEffect: 'color' | 'pattern' | 'gradient'; + shapes: string[]; + stackLabelStyle: object; + stockFallingColor: string; + stockRangeColor: string; + stockRisingColor: string; + stockVolumeColor: string; + threeDEffect: 'on' | 'off'; + tooltipLabelStyle: object; + tooltipValueStyle: object; + }; + timeAxisType: 'enabled' | 'mixedFrequency' | 'skipGaps' | 'disabled' | 'auto'; + tooltip: { + renderer: ((context: ojChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + type: 'line' | 'area' | 'lineWithArea' | 'stock' | 'boxPlot' | 'combo' | 'pie' | 'scatter' | 'bubble' | 'funnel' | 'pyramid' | 'bar'; + valueFormats: { + close: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + group: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string | string[]; + }; + high: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + label: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + }; + low: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + open: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q1: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + q3: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + series: { + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + targetValue: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + value: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + volume: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + x: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + y2: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + z: { + converter: object; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + tooltipDisplay: 'off' | 'auto'; + tooltipLabel: string; + }; + }; + xAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'off' | 'on'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number | string; + maxSize: string; + min: number | string; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + rendered: 'off' | 'on'; + rotation: 'none' | 'auto'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportEndGroup: number | string; + viewportMax: number | string; + viewportMin: number | string; + viewportStartGroup: number | string; + }; + y2Axis: { + alignTickMarks: 'off' | 'on'; + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + }; + yAxis: { + axisLine: { + lineColor: string; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + baselineScaling: 'min' | 'zero'; + dataMax: number; + dataMin: number; + majorTick: { + baselineColor: 'inherit' | 'auto'; + baselineStyle: 'dotted' | 'dashed' | 'solid'; + baselineWidth: number; + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + max: number; + maxSize: string; + min: number; + minStep: number; + minorStep: number; + minorTick: { + lineColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineWidth: number; + rendered: 'on' | 'off' | 'auto'; + }; + position: 'start' | 'end' | 'top' | 'bottom' | 'auto'; + referenceObjects: Array<{ + categories: string[]; + color: string; + displayInLegend: 'on' | 'off'; + high: number; + id: string; + items: Array<{ + high: number; + low: number; + value: number; + x: number | string; + }>; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'straight'; + lineWidth: number; + location: 'front' | 'back'; + low: number; + shortDesc: string; + svgClassName: string; + svgStyle: object; + text: string; + type: 'area' | 'line'; + value: number; + }>; + rendered: 'off' | 'on'; + scale: 'log' | 'linear'; + size: string; + step: number; + tickLabel: { + converter: object; + position: 'inside' | 'outside'; + rendered: 'off' | 'on'; + scaling: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style: object; + }; + title: string; + titleStyle: object; + viewportMax: number; + viewportMin: number; + }; + zoomAndScroll: 'delayedScrollOnly' | 'liveScrollOnly' | 'delayed' | 'live' | 'off'; + zoomDirection: 'x' | 'y' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelClose?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelDefaultGroupName?: string; + labelGroup?: string; + labelHigh?: string; + labelInvalidData?: string; + labelLow?: string; + labelNoData?: string; + labelOpen?: string; + labelOther?: string; + labelPercentage?: string; + labelQ1?: string; + labelQ2?: string; + labelQ3?: string; + labelSeries?: string; + labelTargetValue?: string; + labelValue?: string; + labelVolume?: string; + labelX?: string; + labelY?: string; + labelZ?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipPan?: string; + tooltipSelect?: string; + tooltipZoom?: string; + }; +} +export interface ojChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojChartGroup extends JetElement { + drilling?: 'on' | 'off' | 'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartGroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartGroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartGroupSettablePropertiesLenient): void; +} +export interface ojChartGroupEventMap extends HTMLElementEventMap { + 'drillingChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; +} +export interface ojChartGroupSettableProperties extends JetSettableProperties { + drilling?: 'on' | 'off' | 'inherit'; + labelStyle?: object; + name?: string; + shortDesc?: string; +} +export interface ojChartGroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojChartItem extends JetElement { + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + close?: number; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupId: string[]; + high?: number; + items?: object[] | number[]; + label?: string | string[]; + labelPosition?: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + labelStyle?: object | object[]; + low?: number; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number | string; + y?: number; + z?: number; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onBoxPlotChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onCloseChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupIdChanged: ((event: JetElementCustomEvent) => any) | null; + onHighChanged: ((event: JetElementCustomEvent) => any) | null; + onItemsChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLowChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onOpenChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onQ1Changed: ((event: JetElementCustomEvent) => any) | null; + onQ2Changed: ((event: JetElementCustomEvent) => any) | null; + onQ3Changed: ((event: JetElementCustomEvent) => any) | null; + onSeriesIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTargetValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVolumeChanged: ((event: JetElementCustomEvent) => any) | null; + onXChanged: ((event: JetElementCustomEvent) => any) | null; + onYChanged: ((event: JetElementCustomEvent) => any) | null; + onZChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartItemSettablePropertiesLenient): void; +} +export interface ojChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'boxPlotChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'closeChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'groupIdChanged': JetElementCustomEvent; + 'highChanged': JetElementCustomEvent; + 'itemsChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'lowChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'openChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'q1Changed': JetElementCustomEvent; + 'q2Changed': JetElementCustomEvent; + 'q3Changed': JetElementCustomEvent; + 'seriesIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'targetValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'volumeChanged': JetElementCustomEvent; + 'xChanged': JetElementCustomEvent; + 'yChanged': JetElementCustomEvent; + 'zChanged': JetElementCustomEvent; +} +export interface ojChartItemSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + close?: number; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupId: string[]; + high?: number; + items?: object[] | number[]; + label?: string | string[]; + labelPosition?: 'center' | 'outsideSlice' | 'aboveMarker' | 'belowMarker' | 'beforeMarker' | 'afterMarker' | 'insideBarEdge' | 'outsideBarEdge' | 'none' | 'auto'; + labelStyle?: object | object[]; + low?: number; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + open?: number; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + q1?: number; + q2?: number; + q3?: number; + seriesId: string; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + targetValue?: number; + value?: number; + volume?: number; + x?: number | string; + y?: number; + z?: number; +} +export interface ojChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojChartSeries extends JetElement { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on' | 'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3Color?: string; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + color?: string; + displayInLegend?: 'on' | 'off' | 'auto'; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineType?: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar' | 'line' | 'area' | 'lineWithArea' | 'candlestick' | 'boxPlot' | 'auto'; + onAreaColorChanged: ((event: JetElementCustomEvent) => any) | null; + onAreaSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onAreaSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onAssignedToY2Changed: ((event: JetElementCustomEvent) => any) | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onBoxPlotChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDisplayInLegendChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLineTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerColorChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onPieSliceExplodeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onStackCategoryChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojChartSeriesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojChartSeries[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojChartSeriesSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojChartSeriesSettablePropertiesLenient): void; +} +export interface ojChartSeriesEventMap extends HTMLElementEventMap { + 'areaColorChanged': JetElementCustomEvent; + 'areaSvgClassNameChanged': JetElementCustomEvent; + 'areaSvgStyleChanged': JetElementCustomEvent; + 'assignedToY2Changed': JetElementCustomEvent; + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'boxPlotChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'displayInLegendChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'lineStyleChanged': JetElementCustomEvent; + 'lineTypeChanged': JetElementCustomEvent; + 'lineWidthChanged': JetElementCustomEvent; + 'markerColorChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'markerSvgClassNameChanged': JetElementCustomEvent; + 'markerSvgStyleChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'pieSliceExplodeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'stackCategoryChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojChartSeriesSettableProperties extends JetSettableProperties { + areaColor?: string; + areaSvgClassName?: string; + areaSvgStyle?: object; + assignedToY2?: 'on' | 'off'; + borderColor?: string; + borderWidth?: number; + boxPlot?: { + medianSvgClassName?: string; + medianSvgStyle?: object; + q2Color?: string; + q2SvgClassName?: string; + q2SvgStyle?: object; + q3Color?: string; + q3SvgClassName?: string; + q3SvgStyle?: object; + whiskerEndLength?: string; + whiskerEndSvgClassName?: string; + whiskerEndSvgStyle?: object; + whiskerSvgClassName?: string; + whiskerSvgStyle?: object; + }; + categories?: string[]; + color?: string; + displayInLegend?: 'on' | 'off' | 'auto'; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineType?: 'straight' | 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'auto'; + lineWidth?: number; + markerColor?: string; + markerDisplayed?: 'on' | 'off' | 'auto'; + markerShape?: 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'auto' | string; + markerSize?: number; + markerSvgClassName?: string; + markerSvgStyle?: object; + name?: string; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'auto'; + pieSliceExplode?: number; + shortDesc?: string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + stackCategory?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'bar' | 'line' | 'area' | 'lineWithArea' | 'candlestick' | 'boxPlot' | 'auto'; +} +export interface ojChartSeriesSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojSparkChart extends dvtBaseComponent> { + animationDuration: number | null; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero' | 'min'; + color: string; + data: DataProvider | null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + referenceObjects: ojSparkChart.ReferenceObject[]; + svgClassName: string; + svgStyle: object; + tooltip: { + renderer: ((context: ojSparkChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + type: 'area' | 'lineWithArea' | 'bar' | 'line'; + visualEffects: 'none' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAreaColorChanged: ((event: JetElementCustomEvent["areaColor"]>) => any) | null; + onAreaSvgClassNameChanged: ((event: JetElementCustomEvent["areaSvgClassName"]>) => any) | null; + onAreaSvgStyleChanged: ((event: JetElementCustomEvent["areaSvgStyle"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onBarGapRatioChanged: ((event: JetElementCustomEvent["barGapRatio"]>) => any) | null; + onBaselineScalingChanged: ((event: JetElementCustomEvent["baselineScaling"]>) => any) | null; + onColorChanged: ((event: JetElementCustomEvent["color"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onFirstColorChanged: ((event: JetElementCustomEvent["firstColor"]>) => any) | null; + onHighColorChanged: ((event: JetElementCustomEvent["highColor"]>) => any) | null; + onLastColorChanged: ((event: JetElementCustomEvent["lastColor"]>) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent["lineStyle"]>) => any) | null; + onLineTypeChanged: ((event: JetElementCustomEvent["lineType"]>) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent["lineWidth"]>) => any) | null; + onLowColorChanged: ((event: JetElementCustomEvent["lowColor"]>) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent["markerShape"]>) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent["markerSize"]>) => any) | null; + onReferenceObjectsChanged: ((event: JetElementCustomEvent["referenceObjects"]>) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent["svgClassName"]>) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent["svgStyle"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent["type"]>) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent["visualEffects"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSparkChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSparkChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSparkChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSparkChartSettablePropertiesLenient): void; + getDataItem(itemIndex: number): ojSparkChart.ItemContext | null; +} +export interface ojSparkChartEventMap extends dvtBaseComponentEventMap> { + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'areaColorChanged': JetElementCustomEvent["areaColor"]>; + 'areaSvgClassNameChanged': JetElementCustomEvent["areaSvgClassName"]>; + 'areaSvgStyleChanged': JetElementCustomEvent["areaSvgStyle"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'barGapRatioChanged': JetElementCustomEvent["barGapRatio"]>; + 'baselineScalingChanged': JetElementCustomEvent["baselineScaling"]>; + 'colorChanged': JetElementCustomEvent["color"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'firstColorChanged': JetElementCustomEvent["firstColor"]>; + 'highColorChanged': JetElementCustomEvent["highColor"]>; + 'lastColorChanged': JetElementCustomEvent["lastColor"]>; + 'lineStyleChanged': JetElementCustomEvent["lineStyle"]>; + 'lineTypeChanged': JetElementCustomEvent["lineType"]>; + 'lineWidthChanged': JetElementCustomEvent["lineWidth"]>; + 'lowColorChanged': JetElementCustomEvent["lowColor"]>; + 'markerShapeChanged': JetElementCustomEvent["markerShape"]>; + 'markerSizeChanged': JetElementCustomEvent["markerSize"]>; + 'referenceObjectsChanged': JetElementCustomEvent["referenceObjects"]>; + 'svgClassNameChanged': JetElementCustomEvent["svgClassName"]>; + 'svgStyleChanged': JetElementCustomEvent["svgStyle"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'typeChanged': JetElementCustomEvent["type"]>; + 'visualEffectsChanged': JetElementCustomEvent["visualEffects"]>; +} +export interface ojSparkChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number | null; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + areaColor: string; + areaSvgClassName: string; + areaSvgStyle: object; + as: string; + barGapRatio: number; + baselineScaling: 'zero' | 'min'; + color: string; + data: DataProvider | null; + firstColor: string; + highColor: string; + lastColor: string; + lineStyle: 'dotted' | 'dashed' | 'solid'; + lineType: 'curved' | 'stepped' | 'centeredStepped' | 'segmented' | 'centeredSegmented' | 'none' | 'straight'; + lineWidth: number; + lowColor: string; + markerShape: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + referenceObjects: ojSparkChart.ReferenceObject[]; + svgClassName: string; + svgStyle: object; + tooltip: { + renderer: ((context: ojSparkChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + type: 'area' | 'lineWithArea' | 'bar' | 'line'; + visualEffects: 'none' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojSparkChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojSparkChart { + // tslint:disable-next-line interface-over-type-literal + type Item = { + borderColor: string; + color: string; + date: Date; + high: number; + low: number; + markerDisplayed: 'on' | 'off'; + markerShape: 'square' | 'circle' | 'diamond' | 'plus' | 'triangleDown' | 'triangleUp' | 'human' | 'star' | 'auto' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + borderColor: string; + color: string; + date: Date; + high: number; + low: number; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + color?: string; + high?: number; + lineWidth?: number; + lineStyle: 'dotted' | 'dashed' | 'solid'; + location: 'front' | 'back'; + low?: number; + svgClassName?: string; + svgStyle?: object; + type: 'area' | 'line'; + value?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + parentElement: Element; + }; +} +export interface ojSparkChartItem extends JetElement { + borderColor: string; + color: string; + date: string; + high: number | null; + low: number | null; + markerDisplayed: 'off' | 'on'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDateChanged: ((event: JetElementCustomEvent) => any) | null; + onHighChanged: ((event: JetElementCustomEvent) => any) | null; + onLowChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerDisplayedChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSparkChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSparkChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSparkChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSparkChartItemSettablePropertiesLenient): void; +} +export interface ojSparkChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'dateChanged': JetElementCustomEvent; + 'highChanged': JetElementCustomEvent; + 'lowChanged': JetElementCustomEvent; + 'markerDisplayedChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSizeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSparkChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + color: string; + date: string; + high: number | null; + low: number | null; + markerDisplayed: 'off' | 'on'; + markerShape?: 'auto' | 'circle' | 'diamond' | 'human' | 'plus' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSize: number; + svgClassName: string; + svgStyle: object; + value: number | null; +} +export interface ojSparkChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcheckboxset/index.d.ts b/types/oraclejet/ojcheckboxset/index.d.ts new file mode 100644 index 0000000000..afed42d51c --- /dev/null +++ b/types/oraclejet/ojcheckboxset/index.d.ts @@ -0,0 +1,69 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCheckboxset extends editableValue { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any[]; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojCheckboxset.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojCheckboxset.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCheckboxsetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojCheckboxset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojCheckboxsetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojCheckboxsetSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojCheckboxset { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojCheckboxsetEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojCheckboxset.ojAnimateEnd; + 'ojAnimateStart': ojCheckboxset.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojCheckboxsetSettableProperties extends editableValueSettableProperties { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any[]; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojCheckboxsetSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcollapsible/index.d.ts b/types/oraclejet/ojcollapsible/index.d.ts new file mode 100644 index 0000000000..1d677ed1c1 --- /dev/null +++ b/types/oraclejet/ojcollapsible/index.d.ts @@ -0,0 +1,64 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCollapsible extends baseComponent { + disabled: boolean; + expandArea: 'header' | 'disclosureIcon'; + expanded: boolean; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onExpandAreaChanged: ((event: JetElementCustomEvent) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeCollapse: ((event: ojCollapsible.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojCollapsible.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojCollapsible.ojCollapse) => any) | null; + onOjExpand: ((event: ojCollapsible.ojExpand) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojCollapsibleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojCollapsible[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojCollapsibleSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojCollapsibleSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojCollapsible { + interface ojBeforeCollapse extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + header: Element; + content: Element; + [propName: string]: any; + }> { + } +} +export interface ojCollapsibleEventMap extends baseComponentEventMap { + 'ojBeforeCollapse': ojCollapsible.ojBeforeCollapse; + 'ojBeforeExpand': ojCollapsible.ojBeforeExpand; + 'ojCollapse': ojCollapsible.ojCollapse; + 'ojExpand': ojCollapsible.ojExpand; + 'disabledChanged': JetElementCustomEvent; + 'expandAreaChanged': JetElementCustomEvent; + 'expandedChanged': JetElementCustomEvent; +} +export interface ojCollapsibleSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + expandArea: 'header' | 'disclosureIcon'; + expanded: boolean; +} +export interface ojCollapsibleSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcollectiondataprovider/index.d.ts b/types/oraclejet/ojcollectiondataprovider/index.d.ts new file mode 100644 index 0000000000..19b87d4f8a --- /dev/null +++ b/types/oraclejet/ojcollectiondataprovider/index.d.ts @@ -0,0 +1,16 @@ +import { Collection } from '../ojmodel'; +import { DataProvider, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, FetchListParameters } from '../ojdataprovider'; +declare class CollectionDataProvider implements DataProvider { + constructor(collection: Collection); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName?: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = CollectionDataProvider; diff --git a/types/oraclejet/ojcolor/index.d.ts b/types/oraclejet/ojcolor/index.d.ts new file mode 100644 index 0000000000..b252df9ab7 --- /dev/null +++ b/types/oraclejet/ojcolor/index.d.ts @@ -0,0 +1,182 @@ +declare class Color { + static ALICEBLUE: Color; + static ANTIQUEWHITE: Color; + static AQUA: Color; + static AQUAMARINE: Color; + static AZURE: Color; + static BEIGE: Color; + static BISQUE: Color; + static BLACK: Color; + static BLANCHEDALMOND: Color; + static BLUE: Color; + static BLUEVIOLET: Color; + static BROWN: Color; + static BURLYWOOD: Color; + static CADETBLUE: Color; + static CHARTREUSE: Color; + static CHOCOLATE: Color; + static CORAL: Color; + static CORNFLOWERBLUE: Color; + static CORNSILK: Color; + static CRIMSON: Color; + static CYAN: Color; + static DARKBLUE: Color; + static DARKCYAN: Color; + static DARKGOLDENROD: Color; + static DARKGRAY: Color; + static DARKGREEN: Color; + static DARKGREY: Color; + static DARKKHAKI: Color; + static DARKMAGENTA: Color; + static DARKOLIVEGREEN: Color; + static DARKORANGE: Color; + static DARKORCHID: Color; + static DARKRED: Color; + static DARKSALMON: Color; + static DARKSEAGREEN: Color; + static DARKSLATEBLUE: Color; + static DARKSLATEGRAY: Color; + static DARKSLATEGREY: Color; + static DARKTURQUOISE: Color; + static DARKVIOLET: Color; + static DEEPPINK: Color; + static DEEPSKYBLUE: Color; + static DIMGRAY: Color; + static DIMGREY: Color; + static DODGERBLUE: Color; + static FIREBRICK: Color; + static FLORALWHITE: Color; + static FORESTGREEN: Color; + static FUCHSIA: Color; + static GAINSBORO: Color; + static GHOSTWHITE: Color; + static GOLD: Color; + static GOLDENROD: Color; + static GRAY: Color; + static GREEN: Color; + static GREENYELLOW: Color; + static GREY: Color; + static HONEYDEW: Color; + static HOTPINK: Color; + static INDIANRED: Color; + static INDIGO: Color; + static IVORY: Color; + static KHAKI: Color; + static LAVENDER: Color; + static LAVENDERBLUSH: Color; + static LAWNGREEN: Color; + static LEMONCHIFFON: Color; + static LIGHTBLUE: Color; + static LIGHTCORAL: Color; + static LIGHTCYAN: Color; + static LIGHTGOLDENRODYELLOW: Color; + static LIGHTGRAY: Color; + static LIGHTGREEN: Color; + static LIGHTGREY: Color; + static LIGHTPINK: Color; + static LIGHTSALMON: Color; + static LIGHTSEAGREEN: Color; + static LIGHTSKYBLUE: Color; + static LIGHTSLATEGRAY: Color; + static LIGHTSLATEGREY: Color; + static LIGHTSTEELBLUE: Color; + static LIGHTYELLOW: Color; + static LIME: Color; + static LIMEGREEN: Color; + static LINEN: Color; + static MAGENTA: Color; + static MAROON: Color; + static MEDIUMAQUAMARINE: Color; + static MEDIUMBLUE: Color; + static MEDIUMORCHID: Color; + static MEDIUMPURPLE: Color; + static MEDIUMSEAGREEN: Color; + static MEDIUMSLATEBLUE: Color; + static MEDIUMSPRINGGREEN: Color; + static MEDIUMTURQUOISE: Color; + static MEDIUMVIOLETRED: Color; + static MIDNIGHTBLUE: Color; + static MINTCREAM: Color; + static MISTYROSE: Color; + static MOCCASIN: Color; + static NAVAJOWHITE: Color; + static NAVY: Color; + static OLDLACE: Color; + static OLIVE: Color; + static OLIVEDRAB: Color; + static ORANGE: Color; + static ORANGERED: Color; + static ORCHID: Color; + static PALEGOLDENROD: Color; + static PALEGREEN: Color; + static PALETURQUOISE: Color; + static PALEVIOLETRED: Color; + static PAPAYAWHIP: Color; + static PEACHPUFF: Color; + static PERU: Color; + static PINK: Color; + static PLUM: Color; + static POWDERBLUE: Color; + static PURPLE: Color; + static REBECCAPURPLE: Color; + static RED: Color; + static ROSYBROWN: Color; + static ROYALBLUE: Color; + static SADDLEBROWN: Color; + static SALMON: Color; + static SANDYBROWN: Color; + static SEAGREEN: Color; + static SEASHELL: Color; + static SIENNA: Color; + static SILVER: Color; + static SKYBLUE: Color; + static SLATEBLUE: Color; + static SLATEGRAY: Color; + static SLATEGREY: Color; + static SNOW: Color; + static SPRINGGREEN: Color; + static STEELBLUE: Color; + static TAN: Color; + static TEAL: Color; + static THISTLE: Color; + static TOMATO: Color; + static TRANSPARENT: Color; + static TURQUOISE: Color; + static VIOLET: Color; + static WHEAT: Color; + static WHITE: Color; + static WHITESMOKE: Color; + static YELLOW: Color; + static YELLOWGREEN: Color; + constructor(color: string | Color.RGBA | Color.HSLA | Color.HSVA); + getAlpha(): number; + getBlue(doNotRound?: boolean): number; + getGreen(doNotRound?: boolean): number; + getRed(doNotRound?: boolean): number; + isEqual(color: Color): boolean; + toString(): string; +} +declare namespace Color { + // tslint:disable-next-line interface-over-type-literal + type HSLA = { + h: number; + s: number; + l: number; + a?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type HSVA = { + h: number; + s: number; + v: number; + a?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RGBA = { + r: number; + g: number; + b: number; + a?: number; + }; +} +export = Color; diff --git a/types/oraclejet/ojcolorpalette/index.d.ts b/types/oraclejet/ojcolorpalette/index.d.ts new file mode 100644 index 0000000000..5e0b278199 --- /dev/null +++ b/types/oraclejet/ojcolorpalette/index.d.ts @@ -0,0 +1,74 @@ +import Color = require('../ojcolor'); +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojColorPalette extends editableValue { + labelDisplay: 'auto' | 'off'; + labelledBy: string | null; + layout: 'grid' | 'list'; + palette: Array<{ + color: Color; + label?: string; + }>; + swatchSize: 'xs' | 'sm' | 'lg'; + value: Color; + translations: { + labelNone?: string; + }; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent) => any) | null; + onPaletteChanged: ((event: JetElementCustomEvent) => any) | null; + onSwatchSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojColorPalette.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojColorPalette.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorPaletteEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojColorPalette[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojColorPaletteSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojColorPaletteSettablePropertiesLenient): void; +} +export namespace ojColorPalette { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojColorPaletteEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojColorPalette.ojAnimateEnd; + 'ojAnimateStart': ojColorPalette.ojAnimateStart; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'layoutChanged': JetElementCustomEvent; + 'paletteChanged': JetElementCustomEvent; + 'swatchSizeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojColorPaletteSettableProperties extends editableValueSettableProperties { + labelDisplay: 'auto' | 'off'; + labelledBy: string | null; + layout: 'grid' | 'list'; + palette: Array<{ + color: Color; + label?: string; + }>; + swatchSize: 'xs' | 'sm' | 'lg'; + value: Color; + translations: { + labelNone?: string; + }; +} +export interface ojColorPaletteSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcolorspectrum/index.d.ts b/types/oraclejet/ojcolorspectrum/index.d.ts new file mode 100644 index 0000000000..a96f0c1977 --- /dev/null +++ b/types/oraclejet/ojcolorspectrum/index.d.ts @@ -0,0 +1,62 @@ +import Color = require('../ojcolor'); +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojColorSpectrum extends editableValue { + labelledBy: string | null; + readonly transientValue: Color; + value: Color; + translations: { + labelHue?: string; + labelOpacity?: string; + labelSatLum?: string; + labelThumbDesc?: string; + }; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojColorSpectrum.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojColorSpectrum.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojColorSpectrumEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojColorSpectrum[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojColorSpectrumSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojColorSpectrumSettablePropertiesLenient): void; +} +export namespace ojColorSpectrum { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojColorSpectrumEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojColorSpectrum.ojAnimateEnd; + 'ojAnimateStart': ojColorSpectrum.ojAnimateStart; + 'labelledByChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojColorSpectrumSettableProperties extends editableValueSettableProperties { + labelledBy: string | null; + readonly transientValue: Color; + value: Color; + translations: { + labelHue?: string; + labelOpacity?: string; + labelSatLum?: string; + labelThumbDesc?: string; + }; +} +export interface ojColorSpectrumSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojcomponentcore/index.d.ts b/types/oraclejet/ojcomponentcore/index.d.ts new file mode 100644 index 0000000000..17ab67c7b9 --- /dev/null +++ b/types/oraclejet/ojcomponentcore/index.d.ts @@ -0,0 +1,6 @@ +export function subtreeAttached(node: Element): void; +export function subtreeDetached(node: Element): void; +export function subtreeHidden(node: Element): void; +export function subtreeShown(node: Element, options?: { + initialRender: boolean; +}): void; diff --git a/types/oraclejet/ojcomposite/index.d.ts b/types/oraclejet/ojcomposite/index.d.ts new file mode 100644 index 0000000000..d8ed0bbb4e --- /dev/null +++ b/types/oraclejet/ojcomposite/index.d.ts @@ -0,0 +1,45 @@ +export function getComponentMetadata(name: string): Metadata | null; +export function register(name: string, descriptor: { + metadata: Metadata; + view: string; + viewModel: ((param0: ViewModelContext) => void | object); + parseFunction: ((value: string, name: string, meta: object, defaultParseFunction: (value: string) => any) => any); +}): void; +// tslint:disable-next-line interface-over-type-literal +export type Metadata = { + name: string; + version: string; + jetVersion: string; + properties?: object; + methods?: object; + events?: object; + slots?: object; +}; +// tslint:disable-next-line interface-over-type-literal +export type PropertyChangedContext = { + property: string; + value: any; + previousValue: any; + updatedFrom: 'external' | 'internal'; + subproperty?: { + path: string; + value: any; + previousValue: any; + }; +}; +// tslint:disable-next-line interface-over-type-literal +export type ViewModel = { + activated: ((param0: ViewModelContext) => Promise | void); + connected: ((param0: ViewModelContext) => void); + bindingsApplied: ((param0: ViewModelContext) => void); + propertyChanged: ((param0: PropertyChangedContext) => void); + disconnected: ((param0: Element) => void); +}; +// tslint:disable-next-line interface-over-type-literal +export type ViewModelContext = { + element: Element; + properties: object; + slotCounts: object; + unique: string; + uniqueId: string; +}; diff --git a/types/oraclejet/ojconfig/index.d.ts b/types/oraclejet/ojconfig/index.d.ts new file mode 100644 index 0000000000..6fefb1406c --- /dev/null +++ b/types/oraclejet/ojconfig/index.d.ts @@ -0,0 +1,9 @@ +export function getAutomationMode(): string; +export function getDeviceType(): 'phone' | 'tablet' | 'others'; +export function getLocale(): string; +export function getResourceUrl(relativePath: string): string; +export function getVersionInfo(): string; +export function logVersionInfo(): undefined; +export function setAutomationMode(mode: string): undefined; +export function setLocale(locale: string, callback?: (() => void)): undefined; +export function setResourceBaseUrl(baseUrl: string): undefined; diff --git a/types/oraclejet/ojcontext/index.d.ts b/types/oraclejet/ojcontext/index.d.ts new file mode 100644 index 0000000000..0bb6a856c7 --- /dev/null +++ b/types/oraclejet/ojcontext/index.d.ts @@ -0,0 +1,39 @@ +declare class BusyContext { + addBusyState(options: { + description: object | (() => string); + }): (() => void); + applicationBootstrapComplete(): undefined; + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{ + id: string; + description: string; + }>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean | Error)>; +} +declare namespace Context { + interface BusyContext { + addBusyState(options: { + description: object | (() => string); + }): (() => void); + applicationBootstrapComplete(): undefined; + clear(): undefined; + dump(message?: string): undefined; + getBusyStates(): Array<{ + id: string; + description: string; + }>; + isReady(): boolean; + toString(): string; + whenReady(timeout?: number): Promise<(boolean | Error)>; + } +} +declare class Context { + static getContext(node: Element): Context; + static getPageContext(): Context; + static setBusyContextDefaultTimeout(timeout: number): any; + getBusyContext(): BusyContext; +} +export = Context; diff --git a/types/oraclejet/ojconveyorbelt/index.d.ts b/types/oraclejet/ojconveyorbelt/index.d.ts new file mode 100644 index 0000000000..bacc5f7a7f --- /dev/null +++ b/types/oraclejet/ojconveyorbelt/index.d.ts @@ -0,0 +1,26 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojConveyorBelt extends baseComponent { + contentParent: string | null; + orientation: 'horizontal' | 'vertical'; + onContentParentChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojConveyorBeltEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojConveyorBelt[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojConveyorBeltSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojConveyorBeltSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojConveyorBeltEventMap extends baseComponentEventMap { + 'contentParentChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; +} +export interface ojConveyorBeltSettableProperties extends baseComponentSettableProperties { + contentParent: string | null; + orientation: 'horizontal' | 'vertical'; +} +export interface ojConveyorBeltSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdatagrid/index.d.ts b/types/oraclejet/ojdatagrid/index.d.ts new file mode 100644 index 0000000000..073f5de2af --- /dev/null +++ b/types/oraclejet/ojdatagrid/index.d.ts @@ -0,0 +1,520 @@ +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDataGrid extends baseComponent> { + bandingInterval: { + column: number; + row: number; + }; + cell: { + className?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.CellContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + }; + currentCell: ojDataGrid.CurrentCell | null; + data: DataProvider; + dnd: { + reorder: { + row: 'enable' | 'disable'; + }; + }; + editMode: 'none' | 'cellNavigation' | 'cellEdit'; + gridlines: { + horizontal: 'visible' | 'hidden'; + vertical: 'visible' | 'hidden'; + }; + header: { + column: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + columnEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + row: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + rowEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll' | 'scroll'; + scrollPolicyOptions: { + maxColumnCount: number; + maxRowCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + rowIndex?: number; + columnIndex?: number; + rowKey?: K; + columnKey?: K; + offsetX?: number; + offsetY?: number; + }; + selection: Array>; + selectionMode: { + cell: 'none' | 'single' | 'multiple'; + row: 'none' | 'single' | 'multiple'; + }; + translations: { + accessibleActionableMode?: string; + accessibleColumnContext?: string; + accessibleColumnEndHeaderContext?: string; + accessibleColumnHeaderContext?: string; + accessibleColumnSelected?: string; + accessibleColumnSpanContext?: string; + accessibleFirstColumn?: string; + accessibleFirstRow?: string; + accessibleLastColumn?: string; + accessibleLastRow?: string; + accessibleLevelContext?: string; + accessibleMultiCellSelected?: string; + accessibleNavigationMode?: string; + accessibleRangeSelectModeOff?: string; + accessibleRangeSelectModeOn?: string; + accessibleRowCollapsed?: string; + accessibleRowContext?: string; + accessibleRowEndHeaderContext?: string; + accessibleRowExpanded?: string; + accessibleRowHeaderContext?: string; + accessibleRowSelected?: string; + accessibleRowSpanContext?: string; + accessibleSelectionAffordanceBottom?: string; + accessibleSelectionAffordanceTop?: string; + accessibleSortAscending?: string; + accessibleSortDescending?: string; + accessibleStateSelected?: string; + accessibleSummaryEstimate?: string; + accessibleSummaryExact?: string; + accessibleSummaryExpanded?: string; + labelCut?: string; + labelDisableNonContiguous?: string; + labelEnableNonContiguous?: string; + labelPaste?: string; + labelResize?: string; + labelResizeDialogSubmit?: string; + labelResizeHeight?: string; + labelResizeWidth?: string; + labelSortCol?: string; + labelSortColAsc?: string; + labelSortColDsc?: string; + labelSortRow?: string; + labelSortRowAsc?: string; + labelSortRowDsc?: string; + msgFetchingData?: string; + msgNoData?: string; + }; + onBandingIntervalChanged: ((event: JetElementCustomEvent["bandingInterval"]>) => any) | null; + onCellChanged: ((event: JetElementCustomEvent["cell"]>) => any) | null; + onCurrentCellChanged: ((event: JetElementCustomEvent["currentCell"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEditModeChanged: ((event: JetElementCustomEvent["editMode"]>) => any) | null; + onGridlinesChanged: ((event: JetElementCustomEvent["gridlines"]>) => any) | null; + onHeaderChanged: ((event: JetElementCustomEvent["header"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onOjBeforeCurrentCell: ((event: ojDataGrid.ojBeforeCurrentCell) => any) | null; + onOjBeforeEdit: ((event: ojDataGrid.ojBeforeEdit) => any) | null; + onOjBeforeEditEnd: ((event: ojDataGrid.ojBeforeEditEnd) => any) | null; + onOjResize: ((event: ojDataGrid.ojResize) => any) | null; + onOjScroll: ((event: ojDataGrid.ojScroll) => any) | null; + onOjSort: ((event: ojDataGrid.ojSort) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojDataGridEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojDataGrid[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojDataGridSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojDataGridSettablePropertiesLenient): void; + getContextByNode(node: Element): ojDataGrid.CellContext & { + subId: 'oj-datagrid-cell'; + } | ojDataGrid.HeaderContext & { + subId: 'oj-datagrid-header'; + } | ojDataGrid.LabelContext & { + subId: 'oj-datagrid-header-label'; + }; + refresh(): void; +} +export namespace ojDataGrid { + interface ojBeforeCurrentCell extends CustomEvent<{ + currentCell: CurrentCell; + previousCurrentCell: CurrentCell; + [propName: string]: any; + }> { + } + interface ojBeforeEdit extends CustomEvent<{ + cellContext: CellContext; + [propName: string]: any; + }> { + } + interface ojBeforeEditEnd extends CustomEvent<{ + cellContext: CellContext; + cancelEdit: boolean; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + header: string | number; + oldDimensions: { + width: number; + height: number; + }; + newDimensions: { + width: number; + height: number; + }; + [propName: string]: any; + }> { + } + interface ojScroll extends CustomEvent<{ + scrollX: number; + scrollY: number; + [propName: string]: any; + }> { + } + interface ojSort extends CustomEvent<{ + header: any; + direction: 'ascending' | 'descending'; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type CellContext = { + componentElement: Element; + parentElement: Element; + cell: D; + data: D; + datasource: DataProvider | null; + indexes: { + row: number; + column: number; + }; + keys: { + row: K; + column: K; + }; + extents: { + row: number; + column: number; + }; + mode: 'edit' | 'navigation'; + }; + // tslint:disable-next-line interface-over-type-literal + type CurrentCell = { + type: 'cell' | 'header' | 'label'; + axis?: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + index?: number; + level?: number; + key?: any; + indexes?: { + row: number; + column: number; + }; + keys?: { + row: K; + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type HeaderContext = { + componentElement: Element; + parentElement: Element; + data: D; + datasource: DataProvider | null; + axis: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + index: number; + key: K; + level: number; + extent: number; + depth: number; + }; + // tslint:disable-next-line interface-over-type-literal + type LabelContext = { + componentElement: Element; + parentElement: Element; + datasource: DataProvider | null; + axis: 'column' | 'columnEnd' | 'row' | 'rowEnd'; + key: K; + level: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Selection = { + startIndex?: { + row: number; + column?: number; + }; + startKey?: { + row: K; + column?: K; + }; + endIndex?: { + row: number; + column?: number; + }; + endKey?: { + row: K; + column?: K; + }; + }; +} +export interface ojDataGridEventMap extends baseComponentEventMap> { + 'ojBeforeCurrentCell': ojDataGrid.ojBeforeCurrentCell; + 'ojBeforeEdit': ojDataGrid.ojBeforeEdit; + 'ojBeforeEditEnd': ojDataGrid.ojBeforeEditEnd; + 'ojResize': ojDataGrid.ojResize; + 'ojScroll': ojDataGrid.ojScroll; + 'ojSort': ojDataGrid.ojSort; + 'bandingIntervalChanged': JetElementCustomEvent["bandingInterval"]>; + 'cellChanged': JetElementCustomEvent["cell"]>; + 'currentCellChanged': JetElementCustomEvent["currentCell"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'editModeChanged': JetElementCustomEvent["editMode"]>; + 'gridlinesChanged': JetElementCustomEvent["gridlines"]>; + 'headerChanged': JetElementCustomEvent["header"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; +} +export interface ojDataGridSettableProperties extends baseComponentSettableProperties { + bandingInterval: { + column: number; + row: number; + }; + cell: { + className?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.CellContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.CellContext) => string | void | null) | string | null; + }; + currentCell: ojDataGrid.CurrentCell | null; + data: DataProvider | null; + dnd: { + reorder: { + row: 'enable' | 'disable'; + }; + }; + editMode: 'none' | 'cellNavigation' | 'cellEdit'; + gridlines: { + horizontal: 'visible' | 'hidden'; + vertical: 'visible' | 'hidden'; + }; + header: { + column: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + columnEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height: 'enable' | 'disable'; + width?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + row: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + sortable?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + rowEnd: { + className?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + label: { + className?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + renderer?: ((context: ojDataGrid.LabelContext) => { + insert: HTMLElement | string; + } | void | null) | null; + style?: ((context: ojDataGrid.LabelContext) => string | void | null) | string | null; + }; + renderer?: ((context: ojDataGrid.HeaderContext) => { + insert: HTMLElement | string; + } | void | null) | null; + resizable: { + height?: ((context: ojDataGrid.HeaderContext) => string) | string | null; + width: 'enable' | 'disable'; + }; + style?: ((context: ojDataGrid.HeaderContext) => string | void | null) | string | null; + }; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll' | 'scroll'; + scrollPolicyOptions: { + maxColumnCount: number; + maxRowCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + rowIndex?: number; + columnIndex?: number; + rowKey?: K; + columnKey?: K; + offsetX?: number; + offsetY?: number; + }; + selection: Array>; + selectionMode: { + cell: 'none' | 'single' | 'multiple'; + row: 'none' | 'single' | 'multiple'; + }; + translations: { + accessibleActionableMode?: string; + accessibleColumnContext?: string; + accessibleColumnEndHeaderContext?: string; + accessibleColumnHeaderContext?: string; + accessibleColumnSelected?: string; + accessibleColumnSpanContext?: string; + accessibleFirstColumn?: string; + accessibleFirstRow?: string; + accessibleLastColumn?: string; + accessibleLastRow?: string; + accessibleLevelContext?: string; + accessibleMultiCellSelected?: string; + accessibleNavigationMode?: string; + accessibleRangeSelectModeOff?: string; + accessibleRangeSelectModeOn?: string; + accessibleRowCollapsed?: string; + accessibleRowContext?: string; + accessibleRowEndHeaderContext?: string; + accessibleRowExpanded?: string; + accessibleRowHeaderContext?: string; + accessibleRowSelected?: string; + accessibleRowSpanContext?: string; + accessibleSelectionAffordanceBottom?: string; + accessibleSelectionAffordanceTop?: string; + accessibleSortAscending?: string; + accessibleSortDescending?: string; + accessibleStateSelected?: string; + accessibleSummaryEstimate?: string; + accessibleSummaryExact?: string; + accessibleSummaryExpanded?: string; + labelCut?: string; + labelDisableNonContiguous?: string; + labelEnableNonContiguous?: string; + labelPaste?: string; + labelResize?: string; + labelResizeDialogSubmit?: string; + labelResizeHeight?: string; + labelResizeWidth?: string; + labelSortCol?: string; + labelSortColAsc?: string; + labelSortColDsc?: string; + labelSortRow?: string; + labelSortRowAsc?: string; + labelSortRowDsc?: string; + msgFetchingData?: string; + msgNoData?: string; + }; +} +export interface ojDataGridSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojdataprovider/index.d.ts b/types/oraclejet/ojdataprovider/index.d.ts new file mode 100644 index 0000000000..accc1f25bc --- /dev/null +++ b/types/oraclejet/ojdataprovider/index.d.ts @@ -0,0 +1,111 @@ +export interface AttributeFilterOperator { + attribute: string; + op: AttributeFilterOperator.AttributeOperator; + value: any; +} +export namespace AttributeFilterOperator { + type AttributeOperator = "$co" | "$eq" | "$ew" | "$pr" | "$gt" | "$ge" | "$lt" | "$le" | "$ne" | "$regex" | "$sw"; +} +export interface CompoundFilterOperator { + criteria: Array>; + op: CompoundFilterOperator.CompoundOperator; +} +export namespace CompoundFilterOperator { + type CompoundOperator = "$and" | "$or"; +} +export interface ContainsKeysResults { + containsParameters: FetchByKeysParameters; + results: Set; +} +export interface DataMapping { + mapFields: (item: Item) => Item; + mapFilterCriterion?: (filterCriterion: Array>) => Array>; + mapSortCriteria?: (sortCriteria: Array>) => Array>; + unmapSortCriteria?: (sortCriteria: Array>) => Array>; +} +export interface DataProvider extends EventTarget { + containsKeys(parameters: FetchByKeysParameters): Promise>; + fetchByKeys(parameters: FetchByKeysParameters): Promise>; + fetchByOffset(parameters: FetchByOffsetParameters): Promise>; + fetchFirst(parameters?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; +} +export interface DataProviderAddOperationEventDetail extends DataProviderOperationEventDetail { + addBeforeKeys?: K[]; + parentKeys?: K[]; +} +export interface DataProviderMutationEventDetail { + add?: DataProviderAddOperationEventDetail; + remove?: DataProviderOperationEventDetail; + update?: DataProviderOperationEventDetail; +} +export interface DataProviderOperationEventDetail { + data?: D[]; + indexes?: number[]; + keys: Set; + metadata?: Array>; +} +export interface FetchByKeysCapability { + implementation: 'iteration' | 'lookup'; +} +export namespace FetchByKeysMixin { + function applyMixin(derivedCtor: { + new (): DataProvider; + }): any; +} +export interface FetchByKeysParameters { + keys: Set; +} +export interface FetchByKeysResults { + fetchParameters: FetchByKeysParameters; + results: Map>; +} +export interface FetchByOffsetCapability { + implementation: 'iteration' | 'randomAccess'; +} +export namespace FetchByOffsetMixin { + function applyMixin(derivedCtor: { + new (): DataProvider; + }): any; +} +export interface FetchByOffsetParameters extends FetchListParameters { + offset: number; +} +export interface FetchByOffsetResults { + done: boolean; + fetchParameters: FetchByOffsetParameters; + results: Array>; +} +export interface FetchListParameters { + filterCriterion?: FilterOperator; + size: number; + sortCriteria?: Array>; +} +export interface FetchListResult { + data: D[]; + fetchParameters: FetchListParameters; + metadata: Array>; +} +export interface FilterCapability { + operators: string[]; +} +export interface FilterOperator { + op: AttributeFilterOperator.AttributeOperator | CompoundFilterOperator.CompoundOperator; + filter(data: any[]): any[]; +} +export interface Item { + data: D; + metadata: ItemMetadata; +} +export interface ItemMetadata { + key: K; +} +export interface SortCapability { + attributes: 'none' | 'single' | 'multiple'; +} +export interface SortCriterion { + attribute: keyof D; + direction: string; +} diff --git a/types/oraclejet/ojdatetimepicker/index.d.ts b/types/oraclejet/ojdatetimepicker/index.d.ts new file mode 100644 index 0000000000..914dd06df7 --- /dev/null +++ b/types/oraclejet/ojdatetimepicker/index.d.ts @@ -0,0 +1,639 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +import { inputBase, inputBaseEventMap, inputBaseSettableProperties } from '../ojinputtext'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDatePicker extends ojInputDate { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDatePicker.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDatePicker.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDatePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDatePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDatePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDatePickerSettablePropertiesLenient): void; +} +export namespace ojDatePicker { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojDatePickerEventMap extends ojInputDateEventMap { + 'ojAnimateEnd': ojDatePicker.ojAnimateEnd; + 'ojAnimateStart': ojDatePicker.ojAnimateStart; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojDatePickerSettableProperties extends ojInputDateSettableProperties { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; +} +export interface ojDatePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojDateTimePicker extends ojInputDateTime { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDateTimePicker.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDateTimePicker.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDateTimePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDateTimePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDateTimePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDateTimePickerSettablePropertiesLenient): void; +} +export namespace ojDateTimePicker { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojDateTimePickerEventMap extends ojInputDateTimeEventMap { + 'ojAnimateEnd': ojDateTimePicker.ojAnimateEnd; + 'ojAnimateStart': ojDateTimePicker.ojAnimateStart; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojDateTimePickerSettableProperties extends ojInputDateTimeSettableProperties { + keyboardEdit: 'disabled'; + max: string | null; + min: string | null; + renderMode: 'jet'; + value: string; +} +export interface ojDateTimePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputDate extends inputBase { + converter: Converter | Validation.RegisteredConverter; + datePicker: { + changeMonth: 'select' | 'none'; + changeYear: 'select' | 'none'; + currentMonthPos: number; + daysOutsideMonth: 'hidden' | 'visible' | 'selectable'; + footerLayout: '' | 'today'; + numberOfMonths: number; + showOn: 'focus' | 'image'; + stepBigMonths: number; + stepMonths: 'numberOfMonths' | number; + weekDisplay: 'number' | 'none'; + yearRange: string; + }; + dayFormatter: (param: ojInputDate.DayFormatterInput) => (null | 'all' | ojInputDate.DayFormatterOutput); + dayMetaData: { + [key: string]: { + [key: string]: { + [key: string]: { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + }; + }; + }; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onDatePickerChanged: ((event: JetElementCustomEvent["datePicker"]>) => any) | null; + onDayFormatterChanged: ((event: JetElementCustomEvent["dayFormatter"]>) => any) | null; + onDayMetaDataChanged: ((event: JetElementCustomEvent["dayMetaData"]>) => any) | null; + onKeyboardEditChanged: ((event: JetElementCustomEvent["keyboardEdit"]>) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent["max"]>) => any) | null; + onMinChanged: ((event: JetElementCustomEvent["min"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: ojInputDate.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputDate.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojInputDateEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputDate[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputDateSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputDateSettablePropertiesLenient): void; + hide(): void; + refresh(): void; + show(): void; +} +export namespace ojInputDate { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DayFormatterInput = { + fullYear: number; + month: number; + date: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DayFormatterOutput = { + disabled?: boolean; + className?: string; + tooltip?: string; + }; +} +export interface ojInputDateEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputDate.ojAnimateEnd; + 'ojAnimateStart': ojInputDate.ojAnimateStart; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'datePickerChanged': JetElementCustomEvent["datePicker"]>; + 'dayFormatterChanged': JetElementCustomEvent["dayFormatter"]>; + 'dayMetaDataChanged': JetElementCustomEvent["dayMetaData"]>; + 'keyboardEditChanged': JetElementCustomEvent["keyboardEdit"]>; + 'maxChanged': JetElementCustomEvent["max"]>; + 'minChanged': JetElementCustomEvent["min"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface ojInputDateSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter; + datePicker: { + changeMonth: 'select' | 'none'; + changeYear: 'select' | 'none'; + currentMonthPos: number; + daysOutsideMonth: 'hidden' | 'visible' | 'selectable'; + footerLayout: '' | 'today'; + numberOfMonths: number; + showOn: 'focus' | 'image'; + stepBigMonths: number; + stepMonths: 'numberOfMonths' | number; + weekDisplay: 'number' | 'none'; + yearRange: string; + }; + dayFormatter: (param: ojInputDate.DayFormatterInput) => (null | 'all' | ojInputDate.DayFormatterOutput); + dayMetaData: { + [key: string]: { + [key: string]: { + [key: string]: { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + }; + }; + }; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; +} +export interface ojInputDateSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputDateTime extends ojInputDate { + converter: Converter | Validation.RegisteredConverter; + max: string | null; + min: string | null; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + cancel?: string; + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + done?: string; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent["max"]>) => any) | null; + onMinChanged: ((event: JetElementCustomEvent["min"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onTimePickerChanged: ((event: JetElementCustomEvent["timePicker"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: ojInputDateTime.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputDateTime.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojInputDateTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputDateTime[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputDateTimeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputDateTimeSettablePropertiesLenient): void; + hideTimePicker(): void; + show(): void; + showTimePicker(): void; +} +export namespace ojInputDateTime { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputDateTimeEventMap extends ojInputDateEventMap { + 'ojAnimateEnd': ojInputDateTime.ojAnimateEnd; + 'ojAnimateStart': ojInputDateTime.ojAnimateStart; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'maxChanged': JetElementCustomEvent["max"]>; + 'minChanged': JetElementCustomEvent["min"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'timePickerChanged': JetElementCustomEvent["timePicker"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface ojInputDateTimeSettableProperties extends ojInputDateSettableProperties { + converter: Converter | Validation.RegisteredConverter; + max: string | null; + min: string | null; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + cancel?: string; + currentText?: string; + dateRestriction?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + done?: string; + nextText?: string; + prevText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipCalendar?: string; + tooltipCalendarDisabled?: string; + tooltipCalendarTime?: string; + tooltipCalendarTimeDisabled?: string; + weekHeader?: string; + }; +} +export interface ojInputDateTimeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputTime extends inputBase { + converter: Converter | Validation.RegisteredConverter; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + ampmWheelLabel?: string; + cancelText?: string; + currentTimeText?: string; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + hourWheelLabel?: string; + minuteWheelLabel?: string; + okText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipTime?: string; + tooltipTimeDisabled?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onKeyboardEditChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent) => any) | null; + onTimePickerChanged: ((event: JetElementCustomEvent) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputTime.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputTime.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTimeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputTime[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputTimeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputTimeSettablePropertiesLenient): void; + hide(): void; + refresh(): void; + show(): void; +} +export namespace ojInputTime { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputTimeEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputTime.ojAnimateEnd; + 'ojAnimateStart': ojInputTime.ojAnimateStart; + 'converterChanged': JetElementCustomEvent; + 'keyboardEditChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'pickerAttributesChanged': JetElementCustomEvent; + 'renderModeChanged': JetElementCustomEvent; + 'timePickerChanged': JetElementCustomEvent; + 'validatorsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojInputTimeSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter; + keyboardEdit: 'enabled' | 'disabled'; + max: string | null; + min: string | null; + pickerAttributes: { + style?: string; + class?: string; + }; + renderMode: 'jet' | 'native'; + timePicker: { + footerLayout: '' | 'now'; + showOn: 'focus' | 'image'; + timeIncrement: string; + }; + validators: Array | Validation.RegisteredValidator> | null; + value: string; + translations: { + ampmWheelLabel?: string; + cancelText?: string; + currentTimeText?: string; + dateTimeRange?: { + hint?: { + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + hourWheelLabel?: string; + minuteWheelLabel?: string; + okText?: string; + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipTime?: string; + tooltipTimeDisabled?: string; + }; +} +export interface ojInputTimeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdefer/index.d.ts b/types/oraclejet/ojdefer/index.d.ts new file mode 100644 index 0000000000..03eefbd714 --- /dev/null +++ b/types/oraclejet/ojdefer/index.d.ts @@ -0,0 +1,21 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDefer extends JetElement { + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDeferEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDefer[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDeferSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDeferSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojDeferEventMap extends HTMLElementEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojDeferSettableProperties extends JetSettableProperties { +} +export interface ojDeferSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdeferreddataprovider/index.d.ts b/types/oraclejet/ojdeferreddataprovider/index.d.ts new file mode 100644 index 0000000000..e2332cac46 --- /dev/null +++ b/types/oraclejet/ojdeferreddataprovider/index.d.ts @@ -0,0 +1,16 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class DeferredDataProvider implements DataProvider { + constructor(dataProvider: Promise>, capabilityFunc: (capabilityName: string) => any); + addEventListener(eventType: string, listener: EventListener): any; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): object; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): any; +} +export = DeferredDataProvider; diff --git a/types/oraclejet/ojdiagram/index.d.ts b/types/oraclejet/ojdiagram/index.d.ts new file mode 100644 index 0000000000..db79f4b2be --- /dev/null +++ b/types/oraclejet/ojdiagram/index.d.ts @@ -0,0 +1,790 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface DvtDiagramLayoutContext { + getCommonContainer(nodeId1: any, nodeId2: any): any; + getComponentSize(): { + x: number; + y: number; + w: number; + h: number; + }; + getCurrentViewport(): { + x: number; + y: number; + w: number; + h: number; + }; + getEventData(): object; + getLinkById(id: any): DvtDiagramLayoutContextLink; + getLinkByIndex(index: number): DvtDiagramLayoutContextLink; + getLinkCount(): number; + getNodeById(id: any): DvtDiagramLayoutContextNode; + getNodeByIndex(index: number): DvtDiagramLayoutContextNode; + getNodeCount(): number; + getViewport(): { + x: number; + y: number; + w: number; + h: number; + }; + isLocaleR2L(): boolean; + setViewport(viewport: { + x: number; + y: number; + w: number; + h: number; + }): void; +} +export interface DvtDiagramLayoutContextLink { + getCoordinateSpace(): any; + getData(): object | any[]; + getEndConnectorOffset(): number; + getEndId(): any; + getId(): any; + getLabelBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getLabelHalign(): 'left' | 'center' | 'right'; + getLabelPosition(): { + x: number; + y: number; + }; + getLabelRotationAngle(): number; + getLabelRotationPoint(): { + x: number; + y: number; + }; + getLabelValign(): 'top' | 'middle' | 'bottom' | 'baseline'; + getLinkWidth(): number; + getPoints(): any[]; + getSelected(): boolean; + getStartConnectorOffset(): number; + getStartId(): any; + isPromoted(): boolean; + setCoordinateSpace(containerId: any): void; + setLabelHalign(halign: 'left' | 'center' | 'right'): void; + setLabelPosition(pos: { + x: number; + y: number; + }): void; + setLabelRotationAngle(angle: number): void; + setLabelRotationPoint(point: { + x: number; + y: number; + }): void; + setLabelValign(valign: 'top' | 'middle' | 'bottom' | 'baseline'): void; + setPoints(points: any[]): void; +} +export interface DvtDiagramLayoutContextNode { + getBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getChildNodes(): any[]; + getContentBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getData(): object; + getId(): any; + getLabelBounds(): { + x: number; + y: number; + w: number; + h: number; + }; + getLabelHalign(): 'left' | 'center' | 'right'; + getLabelPosition(): { + x: number; + y: number; + }; + getLabelRotationAngle(): number; + getLabelRotationPoint(): { + x: number; + y: number; + }; + getLabelValign(): 'top' | 'middle' | 'bottom' | 'baseline'; + getPosition(): { + x: number; + y: number; + }; + getRelativePosition(containerId: any): { + x: number; + y: number; + }; + getSelected(): boolean; + isDisclosed(): boolean; + setLabelHalign(halign: 'left' | 'center' | 'right'): void; + setLabelPosition(pos: { + x: number; + y: number; + }): void; + setLabelRotationAngle(angle: number): void; + setLabelRotationPoint(point: { + x: number; + y: number; + }): void; + setLabelValign(valign: 'top' | 'middle' | 'bottom' | 'baseline'): void; + setPosition(pos: { + x: number; + y: number; + }): void; +} +export interface ojDiagram extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + dnd: { + drag: { + nodes: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + linkStyle: ((param0: object) => void); + selector: string; + }; + }; + drop: { + background: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + links: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + nodes: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + selector: string; + }; + }; + }; + expanded: KeySet; + focusRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + layout: ((param0: DvtDiagramLayoutContext) => void); + linkData: DataProvider | null; + linkHighlightMode: 'linkAndNodes' | 'link'; + maxZoom: number; + minZoom: number; + nodeData: DataProvider | null; + nodeHighlightMode: 'nodeAndIncomingLinks' | 'nodeAndOutgoingLinks' | 'nodeAndLinks' | 'node'; + overview: { + halign: 'start' | 'end' | 'center'; + height: number; + rendered: 'on' | 'off'; + valign: 'top' | 'bottom' | 'middle'; + width: number; + }; + panDirection: 'x' | 'y' | 'auto'; + panning: 'auto' | 'none'; + promotedLinkBehavior: 'none' | 'full' | 'lazy'; + renderer: ((context: ojDiagram.RendererContext) => ({ + insert: SVGElement; + })); + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + animationDuration: number; + hoverBehaviorDelay: number; + linkDefaults: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + labelStyle: object; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + nodeDefaults: { + icon: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + width: number; + }; + labelStyle: object; + showDisclosure: 'off' | 'on'; + }; + promotedLink: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + }; + tooltip: { + renderer: ((context: ojDiagram.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + zoomRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + zooming: 'auto' | 'none'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + promotedLink?: string; + promotedLinkAriaDesc?: string; + promotedLinks?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onFocusRendererChanged: ((event: JetElementCustomEvent["focusRenderer"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverRendererChanged: ((event: JetElementCustomEvent["hoverRenderer"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onLinkDataChanged: ((event: JetElementCustomEvent["linkData"]>) => any) | null; + onLinkHighlightModeChanged: ((event: JetElementCustomEvent["linkHighlightMode"]>) => any) | null; + onMaxZoomChanged: ((event: JetElementCustomEvent["maxZoom"]>) => any) | null; + onMinZoomChanged: ((event: JetElementCustomEvent["minZoom"]>) => any) | null; + onNodeDataChanged: ((event: JetElementCustomEvent["nodeData"]>) => any) | null; + onNodeHighlightModeChanged: ((event: JetElementCustomEvent["nodeHighlightMode"]>) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent["overview"]>) => any) | null; + onPanDirectionChanged: ((event: JetElementCustomEvent["panDirection"]>) => any) | null; + onPanningChanged: ((event: JetElementCustomEvent["panning"]>) => any) | null; + onPromotedLinkBehaviorChanged: ((event: JetElementCustomEvent["promotedLinkBehavior"]>) => any) | null; + onRendererChanged: ((event: JetElementCustomEvent["renderer"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRendererChanged: ((event: JetElementCustomEvent["selectionRenderer"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onZoomRendererChanged: ((event: JetElementCustomEvent["zoomRenderer"]>) => any) | null; + onZoomingChanged: ((event: JetElementCustomEvent["zooming"]>) => any) | null; + onOjBeforeCollapse: ((event: ojDiagram.ojBeforeCollapse) => any) | null; + onOjBeforeExpand: ((event: ojDiagram.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojDiagram.ojCollapse) => any) | null; + onOjExpand: ((event: ojDiagram.ojExpand) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojDiagramEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojDiagram[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojDiagramSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojDiagramSettablePropertiesLenient): void; + getContextByNode(node: Element): object | null; + getLink(linkIndex: number): object | null; + getLinkCount(): number; + getNode(nodeIndex: number): object | null; + getNodeCount(): number; + getPromotedLink(startNodeIndex: number, endNodeIndex: number): object | null; +} +export namespace ojDiagram { + interface ojBeforeCollapse extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + nodeId: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type RendererContext = { + parentElement: Element; + componentElement: Element; + data: object; + itemData: D1; + content: { + element: Element; + width: number; + height: number; + }; + state: { + hovered: boolean; + selected: boolean; + focused: boolean; + expanded: boolean; + zoom: number; + }; + previousState: { + hovered: boolean; + selected: boolean; + focused: boolean; + expanded: boolean; + zoom: number; + }; + id: K1; + type: string; + renderDefaultFocus: (() => void); + renderDefaultHover: (() => void); + renderDefaultSelection: (() => void); + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + componentElement: Element; + id: K1 | K2; + type: string; + label: string; + data: object | object[]; + itemData: D1 | D2 | D2[]; + }; +} +export interface ojDiagramEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeCollapse': ojDiagram.ojBeforeCollapse; + 'ojBeforeExpand': ojDiagram.ojBeforeExpand; + 'ojCollapse': ojDiagram.ojCollapse; + 'ojExpand': ojDiagram.ojExpand; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'focusRendererChanged': JetElementCustomEvent["focusRenderer"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverRendererChanged': JetElementCustomEvent["hoverRenderer"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'linkDataChanged': JetElementCustomEvent["linkData"]>; + 'linkHighlightModeChanged': JetElementCustomEvent["linkHighlightMode"]>; + 'maxZoomChanged': JetElementCustomEvent["maxZoom"]>; + 'minZoomChanged': JetElementCustomEvent["minZoom"]>; + 'nodeDataChanged': JetElementCustomEvent["nodeData"]>; + 'nodeHighlightModeChanged': JetElementCustomEvent["nodeHighlightMode"]>; + 'overviewChanged': JetElementCustomEvent["overview"]>; + 'panDirectionChanged': JetElementCustomEvent["panDirection"]>; + 'panningChanged': JetElementCustomEvent["panning"]>; + 'promotedLinkBehaviorChanged': JetElementCustomEvent["promotedLinkBehavior"]>; + 'rendererChanged': JetElementCustomEvent["renderer"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRendererChanged': JetElementCustomEvent["selectionRenderer"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'zoomRendererChanged': JetElementCustomEvent["zoomRenderer"]>; + 'zoomingChanged': JetElementCustomEvent["zooming"]>; +} +export interface ojDiagramSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + dnd: { + drag: { + nodes: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + drag: ((param0: Event) => void); + dragEnd: ((param0: Event) => void); + dragStart: ((param0: Event, param1: object) => void); + linkStyle: ((param0: object) => void); + selector: string; + }; + }; + drop: { + background: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + links: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + nodes: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + }; + ports: { + dataTypes: string | string[]; + dragEnter: ((param0: Event, param1: object) => void); + dragLeave: ((param0: Event, param1: object) => void); + dragOver: ((param0: Event, param1: object) => void); + drop: ((param0: Event, param1: object) => void); + selector: string; + }; + }; + }; + expanded: KeySet; + focusRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + layout: ((param0: DvtDiagramLayoutContext) => void); + linkData: DataProvider | null; + linkHighlightMode: 'linkAndNodes' | 'link'; + maxZoom: number; + minZoom: number; + nodeData: DataProvider | null; + nodeHighlightMode: 'nodeAndIncomingLinks' | 'nodeAndOutgoingLinks' | 'nodeAndLinks' | 'node'; + overview: { + halign: 'start' | 'end' | 'center'; + height: number; + rendered: 'on' | 'off'; + valign: 'top' | 'bottom' | 'middle'; + width: number; + }; + panDirection: 'x' | 'y' | 'auto'; + panning: 'auto' | 'none'; + promotedLinkBehavior: 'none' | 'full' | 'lazy'; + renderer: ((context: ojDiagram.RendererContext) => ({ + insert: SVGElement; + })); + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + animationDuration: number; + hoverBehaviorDelay: number; + linkDefaults: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + labelStyle: object; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + nodeDefaults: { + icon: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + width: number; + }; + labelStyle: object; + showDisclosure: 'off' | 'on'; + }; + promotedLink: { + color: string; + endConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + startConnectorType: 'arrowOpen' | 'arrow' | 'arrowConcave' | 'circle' | 'rectangle' | 'rectangleRounded' | 'none'; + svgClassName: string; + svgStyle: object; + width: number; + }; + }; + tooltip: { + renderer: ((context: ojDiagram.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + zoomRenderer: ((context: ojDiagram.RendererContext) => { + insert: SVGElement; + } | void) | null; + zooming: 'auto' | 'none'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + promotedLink?: string; + promotedLinkAriaDesc?: string; + promotedLinks?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojDiagramSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojDiagramLink extends JetElement { + categories: string[]; + color?: string; + endConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + endNode: any; + label?: string; + labelStyle?: object | null; + selectable?: 'auto' | 'off'; + shortDesc?: string; + startConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + startNode: any; + svgClassName?: string; + svgStyle?: object; + width?: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onEndConnectorTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onEndNodeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartConnectorTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onStartNodeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDiagramLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDiagramLink[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDiagramLinkSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDiagramLinkSettablePropertiesLenient): void; +} +export interface ojDiagramLinkEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'endConnectorTypeChanged': JetElementCustomEvent; + 'endNodeChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startConnectorTypeChanged': JetElementCustomEvent; + 'startNodeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; +} +export interface ojDiagramLinkSettableProperties extends JetSettableProperties { + categories: string[]; + color?: string; + endConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + endNode: any; + label?: string; + labelStyle?: object | null; + selectable?: 'auto' | 'off'; + shortDesc?: string; + startConnectorType?: 'arrow' | 'arrowConcave' | 'arrowOpen' | 'circle' | 'none' | 'rectangle' | 'rectangleRounded'; + startNode: any; + svgClassName?: string; + svgStyle?: object; + width?: number; +} +export interface ojDiagramLinkSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojDiagramNode extends JetElement { + categories?: string[]; + descendantsConnectivity?: 'connected' | 'disjoint' | 'unknown'; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth?: number; + color?: string; + height?: number; + opacity?: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + width?: number; + }; + label?: string; + labelStyle?: object | null; + overview?: { + icon?: { + shape?: 'inherit' | 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + svgClassName?: string; + svgStyle?: object; + }; + }; + selectable?: 'auto' | 'off'; + shortDesc?: string; + showDisclosure?: 'on' | 'off'; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onDescendantsConnectivityChanged: ((event: JetElementCustomEvent) => any) | null; + onIconChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onOverviewChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onShowDisclosureChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDiagramNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDiagramNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDiagramNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDiagramNodeSettablePropertiesLenient): void; +} +export interface ojDiagramNodeEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'descendantsConnectivityChanged': JetElementCustomEvent; + 'iconChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'overviewChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'showDisclosureChanged': JetElementCustomEvent; +} +export interface ojDiagramNodeSettableProperties extends JetSettableProperties { + categories?: string[]; + descendantsConnectivity?: 'connected' | 'disjoint' | 'unknown'; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth?: number; + color?: string; + height?: number; + opacity?: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + sourceHover?: string; + sourceHoverSelected?: string; + sourceSelected?: string; + svgClassName?: string; + svgStyle?: object; + width?: number; + }; + label?: string; + labelStyle?: object | null; + overview?: { + icon?: { + shape?: 'inherit' | 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + svgClassName?: string; + svgStyle?: object; + }; + }; + selectable?: 'auto' | 'off'; + shortDesc?: string; + showDisclosure?: 'on' | 'off'; +} +export interface ojDiagramNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdialog/index.d.ts b/types/oraclejet/ojdialog/index.d.ts new file mode 100644 index 0000000000..42a8569bd4 --- /dev/null +++ b/types/oraclejet/ojdialog/index.d.ts @@ -0,0 +1,148 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojDialog extends baseComponent { + cancelBehavior: 'icon' | 'escape' | 'none'; + dragAffordance: 'title-bar' | 'none'; + initialVisibility: 'hide' | 'show'; + modality: 'modal' | 'modeless'; + position: ojDialog.Position; + resizeBehavior: 'resizable' | 'none'; + role: string; + translations: { + labelCloseIcon?: string; + }; + onCancelBehaviorChanged: ((event: JetElementCustomEvent) => any) | null; + onDragAffordanceChanged: ((event: JetElementCustomEvent) => any) | null; + onInitialVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onModalityChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onResizeBehaviorChanged: ((event: JetElementCustomEvent) => any) | null; + onRoleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojDialog.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojDialog.ojAnimateStart) => any) | null; + onOjBeforeClose: ((event: ojDialog.ojBeforeClose) => any) | null; + onOjBeforeOpen: ((event: ojDialog.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojDialog.ojClose) => any) | null; + onOjFocus: ((event: ojDialog.ojFocus) => any) | null; + onOjOpen: ((event: ojDialog.ojOpen) => any) | null; + onOjResize: ((event: ojDialog.ojResize) => any) | null; + onOjResizeStart: ((event: ojDialog.ojResizeStart) => any) | null; + onOjResizeStop: ((event: ojDialog.ojResizeStop) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojDialogEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojDialog[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojDialogSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojDialogSettablePropertiesLenient): void; + close(): void; + isOpen(): boolean; + open(): void; + refresh(): void; +} +export namespace ojDialog { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojFocus extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResizeStart extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojResizeStop extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojDialogEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojDialog.ojAnimateEnd; + 'ojAnimateStart': ojDialog.ojAnimateStart; + 'ojBeforeClose': ojDialog.ojBeforeClose; + 'ojBeforeOpen': ojDialog.ojBeforeOpen; + 'ojClose': ojDialog.ojClose; + 'ojFocus': ojDialog.ojFocus; + 'ojOpen': ojDialog.ojOpen; + 'ojResize': ojDialog.ojResize; + 'ojResizeStart': ojDialog.ojResizeStart; + 'ojResizeStop': ojDialog.ojResizeStop; + 'cancelBehaviorChanged': JetElementCustomEvent; + 'dragAffordanceChanged': JetElementCustomEvent; + 'initialVisibilityChanged': JetElementCustomEvent; + 'modalityChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'resizeBehaviorChanged': JetElementCustomEvent; + 'roleChanged': JetElementCustomEvent; +} +export interface ojDialogSettableProperties extends baseComponentSettableProperties { + cancelBehavior: 'icon' | 'escape' | 'none'; + dragAffordance: 'title-bar' | 'none'; + initialVisibility: 'hide' | 'show'; + modality: 'modal' | 'modeless'; + position: ojDialog.Position; + resizeBehavior: 'resizable' | 'none'; + role: string; + translations: { + labelCloseIcon?: string; + }; +} +export interface ojDialogSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojdvt-base/index.d.ts b/types/oraclejet/ojdvt-base/index.d.ts new file mode 100644 index 0000000000..04e1cca484 --- /dev/null +++ b/types/oraclejet/ojdvt-base/index.d.ts @@ -0,0 +1,57 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtBaseComponent extends baseComponent { + trackResize: 'on' | 'off'; + translations: { + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onTrackResizeChanged: ((event: JetElementCustomEvent["trackResize"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtBaseComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtBaseComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtBaseComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtBaseComponentSettablePropertiesLenient): void; +} +export interface dvtBaseComponentEventMap extends baseComponentEventMap { + 'trackResizeChanged': JetElementCustomEvent["trackResize"]>; +} +export interface dvtBaseComponentSettableProperties extends baseComponentSettableProperties { + trackResize: 'on' | 'off'; + translations: { + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface dvtBaseComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojeditablevalue/index.d.ts b/types/oraclejet/ojeditablevalue/index.d.ts new file mode 100644 index 0000000000..44f714b3a7 --- /dev/null +++ b/types/oraclejet/ojeditablevalue/index.d.ts @@ -0,0 +1,96 @@ +import Message = require('../ojmessaging'); +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface editableValue, SV = V, RV = V> extends baseComponent { + describedBy: string | null; + disabled: boolean; + displayOptions: { + converterHint: Array<'placeholder' | 'notewindow' | 'none'> | 'placeholder' | 'notewindow' | 'none'; + helpInstruction: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + messages: Array<'inline' | 'notewindow' | 'none'> | 'inline' | 'notewindow' | 'none'; + validatorHint: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + }; + help: { + instruction?: string; + }; + helpHints: { + definition?: string; + source?: string; + }; + labelHint: string; + messagesCustom: Message[]; + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + value: V; + onDescribedByChanged: ((event: JetElementCustomEvent["describedBy"]>) => any) | null; + onDisabledChanged: ((event: JetElementCustomEvent["disabled"]>) => any) | null; + onDisplayOptionsChanged: ((event: JetElementCustomEvent["displayOptions"]>) => any) | null; + onHelpChanged: ((event: JetElementCustomEvent["help"]>) => any) | null; + onHelpHintsChanged: ((event: JetElementCustomEvent["helpHints"]>) => any) | null; + onLabelHintChanged: ((event: JetElementCustomEvent["labelHint"]>) => any) | null; + onMessagesCustomChanged: ((event: JetElementCustomEvent["messagesCustom"]>) => any) | null; + onValidChanged: ((event: JetElementCustomEvent["valid"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onOjAnimateEnd: ((event: editableValue.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: editableValue.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: editableValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): editableValue[T]; + getProperty(property: string): any; + setProperty>(property: T, value: editableValueSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: editableValueSettablePropertiesLenient): void; + refresh(): void; + reset(): void; + showMessages(): void; +} +export namespace editableValue { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface editableValueEventMap, SV = V, RV = V> extends baseComponentEventMap { + 'ojAnimateEnd': editableValue.ojAnimateEnd; + 'ojAnimateStart': editableValue.ojAnimateStart; + 'describedByChanged': JetElementCustomEvent["describedBy"]>; + 'disabledChanged': JetElementCustomEvent["disabled"]>; + 'displayOptionsChanged': JetElementCustomEvent["displayOptions"]>; + 'helpChanged': JetElementCustomEvent["help"]>; + 'helpHintsChanged': JetElementCustomEvent["helpHints"]>; + 'labelHintChanged': JetElementCustomEvent["labelHint"]>; + 'messagesCustomChanged': JetElementCustomEvent["messagesCustom"]>; + 'validChanged': JetElementCustomEvent["valid"]>; + 'valueChanged': JetElementCustomEvent["value"]>; +} +export interface editableValueSettableProperties extends baseComponentSettableProperties { + describedBy: string | null; + disabled: boolean; + displayOptions: { + converterHint: Array<'placeholder' | 'notewindow' | 'none'> | 'placeholder' | 'notewindow' | 'none'; + helpInstruction: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + messages: Array<'inline' | 'notewindow' | 'none'> | 'inline' | 'notewindow' | 'none'; + validatorHint: Array<'notewindow' | 'none'> | 'notewindow' | 'none'; + }; + help: { + instruction?: string; + }; + helpHints: { + definition?: string; + source?: string; + }; + labelHint: string; + messagesCustom: Message[]; + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + value: SV; +} +export interface editableValueSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojexpressionutils/index.d.ts b/types/oraclejet/ojexpressionutils/index.d.ts new file mode 100644 index 0000000000..e8c48ff994 --- /dev/null +++ b/types/oraclejet/ojexpressionutils/index.d.ts @@ -0,0 +1,5 @@ +export function createGenericExpressionEvaluator(expressionText: string): (context: any) => any; +export function getExpressionInfo(expression: string): { + expr: (null | string); + downstreamOnly: boolean; +}; diff --git a/types/oraclejet/ojfilepicker/index.d.ts b/types/oraclejet/ojfilepicker/index.d.ts new file mode 100644 index 0000000000..69f63531fa --- /dev/null +++ b/types/oraclejet/ojfilepicker/index.d.ts @@ -0,0 +1,43 @@ +import { ProgressItem } from '../ojprogresslist'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface FileUploadTransport { + flush(): void; + queue(fileList: FileList): ProgressItem[]; +} +export interface ojFilePicker extends JetElement { + accept: string[] | null; + selectOn: 'auto' | 'click' | 'drop' | 'clickAndDrop'; + selectionMode: 'multiple' | 'single'; + onAcceptChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectOnChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent) => any) | null; + onOjSelect: ((event: ojFilePicker.ojSelect) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilePickerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFilePicker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFilePickerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFilePickerSettablePropertiesLenient): void; +} +export namespace ojFilePicker { + interface ojSelect extends CustomEvent<{ + files: FileList; + [propName: string]: any; + }> { + } +} +export interface ojFilePickerEventMap extends HTMLElementEventMap { + 'ojSelect': ojFilePicker.ojSelect; + 'acceptChanged': JetElementCustomEvent; + 'selectOnChanged': JetElementCustomEvent; + 'selectionModeChanged': JetElementCustomEvent; +} +export interface ojFilePickerSettableProperties extends JetSettableProperties { + accept: string[] | null; + selectOn: 'auto' | 'click' | 'drop' | 'clickAndDrop'; + selectionMode: 'multiple' | 'single'; +} +export interface ojFilePickerSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojfilmstrip/index.d.ts b/types/oraclejet/ojfilmstrip/index.d.ts new file mode 100644 index 0000000000..35716daf3e --- /dev/null +++ b/types/oraclejet/ojfilmstrip/index.d.ts @@ -0,0 +1,63 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojFilmStrip extends baseComponent { + arrowPlacement: 'adjacent' | 'overlay'; + arrowVisibility: 'visible' | 'hidden' | 'hover' | 'auto'; + currentItem: { + id?: string; + index?: number; + }; + looping: 'off' | 'page'; + maxItemsPerPage: number; + orientation: 'horizontal' | 'vertical'; + translations: { + labelAccArrowNextPage?: string; + labelAccArrowPreviousPage?: string; + labelAccFilmStrip?: string; + tipArrowNextPage?: string; + tipArrowPreviousPage?: string; + }; + onArrowPlacementChanged: ((event: JetElementCustomEvent) => any) | null; + onArrowVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent) => any) | null; + onLoopingChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxItemsPerPageChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFilmStripEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFilmStrip[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFilmStripSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFilmStripSettablePropertiesLenient): void; + getItemsPerPage(): number; + refresh(): void; +} +export interface ojFilmStripEventMap extends baseComponentEventMap { + 'arrowPlacementChanged': JetElementCustomEvent; + 'arrowVisibilityChanged': JetElementCustomEvent; + 'currentItemChanged': JetElementCustomEvent; + 'loopingChanged': JetElementCustomEvent; + 'maxItemsPerPageChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; +} +export interface ojFilmStripSettableProperties extends baseComponentSettableProperties { + arrowPlacement: 'adjacent' | 'overlay'; + arrowVisibility: 'visible' | 'hidden' | 'hover' | 'auto'; + currentItem: { + id?: string; + index?: number; + }; + looping: 'off' | 'page'; + maxItemsPerPage: number; + orientation: 'horizontal' | 'vertical'; + translations: { + labelAccArrowNextPage?: string; + labelAccArrowPreviousPage?: string; + labelAccFilmStrip?: string; + tipArrowNextPage?: string; + tipArrowPreviousPage?: string; + }; +} +export interface ojFilmStripSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojformlayout/index.d.ts b/types/oraclejet/ojformlayout/index.d.ts new file mode 100644 index 0000000000..c9fe49b34a --- /dev/null +++ b/types/oraclejet/ojformlayout/index.d.ts @@ -0,0 +1,38 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojFormLayout extends JetElement { + direction: 'column' | 'row'; + labelEdge: 'start' | 'top'; + labelWidth: string; + labelWrapping: 'truncate' | 'wrap'; + maxColumns: number; + onDirectionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelEdgeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWrappingChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxColumnsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojFormLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojFormLayout[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojFormLayoutSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojFormLayoutSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojFormLayoutEventMap extends HTMLElementEventMap { + 'directionChanged': JetElementCustomEvent; + 'labelEdgeChanged': JetElementCustomEvent; + 'labelWidthChanged': JetElementCustomEvent; + 'labelWrappingChanged': JetElementCustomEvent; + 'maxColumnsChanged': JetElementCustomEvent; +} +export interface ojFormLayoutSettableProperties extends JetSettableProperties { + direction: 'column' | 'row'; + labelEdge: 'start' | 'top'; + labelWidth: string; + labelWrapping: 'truncate' | 'wrap'; + maxColumns: number; +} +export interface ojFormLayoutSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojgantt/index.d.ts b/types/oraclejet/ojgantt/index.d.ts new file mode 100644 index 0000000000..18ded2ebeb --- /dev/null +++ b/types/oraclejet/ojgantt/index.d.ts @@ -0,0 +1,679 @@ +import { ojTimeAxis } from '../ojtimeaxis'; +import { Converter } from '../ojvalidation-base'; +import { DataProvider } from '../ojdataprovider'; +import { dvtTimeComponent, dvtTimeComponentEventMap, dvtTimeComponentSettableProperties } from '../ojtime-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojGantt extends dvtTimeComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + axisPosition: 'bottom' | 'top'; + dependencyData?: (DataProvider); + dnd: { + move?: { + tasks?: 'disabled' | 'enabled'; + }; + }; + end: string; + gridlines: { + horizontal?: 'hidden' | 'visible' | 'auto'; + vertical?: 'hidden' | 'visible' | 'auto'; + }; + majorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + minorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + referenceObjects: ojGantt.ReferenceObject[]; + rowAxis: { + label?: { + renderer: ((context: ojGantt.RowAxisLabelRendererContext) => ({ + insert: Element; + })); + }; + maxWidth?: string; + rendered?: 'on' | 'off'; + width?: string; + }; + rowDefaults: { + height?: number; + }; + scrollPosition: { + offsetY?: number; + rowIndex?: number; + y?: number; + }; + selection: K2[]; + selectionMode: 'single' | 'multiple' | 'none'; + start: string; + taskData?: (DataProvider); + taskDefaults: { + baseline?: { + borderRadius?: string; + height?: number; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius?: string; + height?: number; + labelPosition?: (string | string[]); + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + }; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + }; + tooltip: { + renderer: ((context: ojGantt.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + valueFormats: { + baselineDate?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineEnd?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineStart?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + date?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + end?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + label?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + progress?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + row?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + start?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + }; + viewportEnd: string; + viewportStart: string; + translations: { + accessibleDependencyInfo?: string; + accessiblePredecessorInfo?: string; + accessibleSuccessorInfo?: string; + accessibleTaskTypeMilestone?: string; + accessibleTaskTypeSummary?: string; + componentName?: string; + finishFinishDependencyAriaDesc?: string; + finishStartDependencyAriaDesc?: string; + labelAndValue?: string; + labelBaselineDate?: string; + labelBaselineEnd?: string; + labelBaselineStart?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelEnd?: string; + labelInvalidData?: string; + labelLabel?: string; + labelMoveBy?: string; + labelNoData?: string; + labelProgress?: string; + labelRow?: string; + labelStart?: string; + startFinishDependencyAriaDesc?: string; + startStartDependencyAriaDesc?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + taskMoveCancelled?: string; + taskMoveFinalized?: string; + taskMoveInitiated?: string; + taskMoveInitiatedInstruction?: string; + taskMoveSelectionInfo?: string; + tooltipZoomIn?: string; + tooltipZoomOut?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onAxisPositionChanged: ((event: JetElementCustomEvent["axisPosition"]>) => any) | null; + onDependencyDataChanged: ((event: JetElementCustomEvent["dependencyData"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEndChanged: ((event: JetElementCustomEvent["end"]>) => any) | null; + onGridlinesChanged: ((event: JetElementCustomEvent["gridlines"]>) => any) | null; + onMajorAxisChanged: ((event: JetElementCustomEvent["majorAxis"]>) => any) | null; + onMinorAxisChanged: ((event: JetElementCustomEvent["minorAxis"]>) => any) | null; + onReferenceObjectsChanged: ((event: JetElementCustomEvent["referenceObjects"]>) => any) | null; + onRowAxisChanged: ((event: JetElementCustomEvent["rowAxis"]>) => any) | null; + onRowDefaultsChanged: ((event: JetElementCustomEvent["rowDefaults"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStartChanged: ((event: JetElementCustomEvent["start"]>) => any) | null; + onTaskDataChanged: ((event: JetElementCustomEvent["taskData"]>) => any) | null; + onTaskDefaultsChanged: ((event: JetElementCustomEvent["taskDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onValueFormatsChanged: ((event: JetElementCustomEvent["valueFormats"]>) => any) | null; + onViewportEndChanged: ((event: JetElementCustomEvent["viewportEnd"]>) => any) | null; + onViewportStartChanged: ((event: JetElementCustomEvent["viewportStart"]>) => any) | null; + onOjMove: ((event: ojGantt.ojMove) => any) | null; + onOjViewportChange: ((event: ojGantt.ojViewportChange) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojGanttEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojGantt[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojGanttSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojGanttSettablePropertiesLenient): void; + getContextByNode(node: Element): { + subId: 'oj-gantt-row-label'; + index: number; + } | { + subId: 'oj-gantt-taskbar'; + rowIndex: number; + index: number; + } | null; +} +export namespace ojGantt { + interface ojMove extends CustomEvent<{ + taskContexts: Array<{ + data: RowTask; + rowData: Row; + itemData: D2 | null; + color: string; + }>; + value: string; + start: string; + end: string; + baselineStart: string; + baselineEnd: string; + rowContext: { + rowData: Row; + componentElement: Element; + }; + [propName: string]: any; + }> { + } + interface ojViewportChange extends CustomEvent<{ + viewportStart: string; + viewportEnd: string; + majorAxisScale: string; + minorAxisScale: string; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Dependency = { + id: K1; + predecessorTaskId: K2; + shortDesc?: string; + successorTaskId: K2; + svgClassName?: string; + svgStyle?: object; + type?: 'startStart' | 'startFinish' | 'finishFinish' | 'finishStart'; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceObject = { + svgClassName?: string; + svgStyle?: object; + value?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type Row = { + id?: any; + label?: string; + labelStyle?: object; + tasks?: Array>; + }; + // tslint:disable-next-line interface-over-type-literal + type RowAxisLabelRendererContext = { + parentElement: Element; + rowData: Row; + itemData: D2[]; + componentElement: Element; + maxWidth: number; + maxHeight: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RowTask = { + borderRadius?: string; + end?: string; + height?: number; + id: K2; + label?: string; + labelPosition?: string | string[]; + labelStyle?: object; + start?: string; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + baseline?: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + data: RowTask; + rowData: Row; + itemData: D2; + componentElement: Element; + color: string; + }; +} +export interface ojGanttEventMap extends dvtTimeComponentEventMap> { + 'ojMove': ojGantt.ojMove; + 'ojViewportChange': ojGantt.ojViewportChange; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'axisPositionChanged': JetElementCustomEvent["axisPosition"]>; + 'dependencyDataChanged': JetElementCustomEvent["dependencyData"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'endChanged': JetElementCustomEvent["end"]>; + 'gridlinesChanged': JetElementCustomEvent["gridlines"]>; + 'majorAxisChanged': JetElementCustomEvent["majorAxis"]>; + 'minorAxisChanged': JetElementCustomEvent["minorAxis"]>; + 'referenceObjectsChanged': JetElementCustomEvent["referenceObjects"]>; + 'rowAxisChanged': JetElementCustomEvent["rowAxis"]>; + 'rowDefaultsChanged': JetElementCustomEvent["rowDefaults"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'startChanged': JetElementCustomEvent["start"]>; + 'taskDataChanged': JetElementCustomEvent["taskData"]>; + 'taskDefaultsChanged': JetElementCustomEvent["taskDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'valueFormatsChanged': JetElementCustomEvent["valueFormats"]>; + 'viewportEndChanged': JetElementCustomEvent["viewportEnd"]>; + 'viewportStartChanged': JetElementCustomEvent["viewportStart"]>; +} +export interface ojGanttSettableProperties extends dvtTimeComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + axisPosition: 'bottom' | 'top'; + dependencyData?: (DataProvider); + dnd: { + move?: { + tasks?: 'disabled' | 'enabled'; + }; + }; + end: string; + gridlines: { + horizontal?: 'hidden' | 'visible' | 'auto'; + vertical?: 'hidden' | 'visible' | 'auto'; + }; + majorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + minorAxis: { + converter?: (ojTimeAxis.Converters | Converter); + height?: number; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + zoomOrder?: string[]; + }; + referenceObjects: ojGantt.ReferenceObject[]; + rowAxis: { + label?: { + renderer: ((context: ojGantt.RowAxisLabelRendererContext) => ({ + insert: Element; + })); + }; + maxWidth?: string; + rendered?: 'on' | 'off'; + width?: string; + }; + rowDefaults: { + height?: number; + }; + scrollPosition: { + offsetY?: number; + rowIndex?: number; + y?: number; + }; + selection: K2[]; + selectionMode: 'single' | 'multiple' | 'none'; + start: string; + taskData?: (DataProvider); + taskDefaults: { + baseline?: { + borderRadius?: string; + height?: number; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius?: string; + height?: number; + labelPosition?: (string | string[]); + progress?: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + }; + svgClassName?: string; + svgStyle?: object; + type?: 'normal' | 'milestone' | 'summary' | 'auto'; + }; + tooltip: { + renderer: ((context: ojGantt.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + valueFormats: { + baselineDate?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineEnd?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + baselineStart?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + date?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + end?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + label?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + progress?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + row?: { + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + start?: { + converter?: (Converter); + tooltipDisplay?: 'off' | 'auto'; + tooltipLabel?: string; + }; + }; + viewportEnd: string; + viewportStart: string; + translations: { + accessibleDependencyInfo?: string; + accessiblePredecessorInfo?: string; + accessibleSuccessorInfo?: string; + accessibleTaskTypeMilestone?: string; + accessibleTaskTypeSummary?: string; + componentName?: string; + finishFinishDependencyAriaDesc?: string; + finishStartDependencyAriaDesc?: string; + labelAndValue?: string; + labelBaselineDate?: string; + labelBaselineEnd?: string; + labelBaselineStart?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelDate?: string; + labelEnd?: string; + labelInvalidData?: string; + labelLabel?: string; + labelMoveBy?: string; + labelNoData?: string; + labelProgress?: string; + labelRow?: string; + labelStart?: string; + startFinishDependencyAriaDesc?: string; + startStartDependencyAriaDesc?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + taskMoveCancelled?: string; + taskMoveFinalized?: string; + taskMoveInitiated?: string; + taskMoveInitiatedInstruction?: string; + taskMoveSelectionInfo?: string; + tooltipZoomIn?: string; + tooltipZoomOut?: string; + }; +} +export interface ojGanttSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojGanttDependency extends JetElement { + predecessorTaskId: any; + shortDesc: string | null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart' | 'finishFinish' | 'startStart' | 'startFinish'; + onPredecessorTaskIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSuccessorTaskIdChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttDependencyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttDependency[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttDependencySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttDependencySettablePropertiesLenient): void; +} +export interface ojGanttDependencyEventMap extends HTMLElementEventMap { + 'predecessorTaskIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'successorTaskIdChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojGanttDependencySettableProperties extends JetSettableProperties { + predecessorTaskId: any; + shortDesc: string | null; + successorTaskId: any; + svgClassName: string; + svgStyle: object; + type: 'finishStart' | 'finishFinish' | 'startStart' | 'startFinish'; +} +export interface ojGanttDependencySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojGanttRow extends JetElement { + label: string; + labelStyle: object; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttRowEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttRow[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttRowSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttRowSettablePropertiesLenient): void; +} +export interface ojGanttRowEventMap extends HTMLElementEventMap { + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; +} +export interface ojGanttRowSettableProperties extends JetSettableProperties { + label: string; + labelStyle: object; +} +export interface ojGanttRowSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojGanttTask extends JetElement { + baseline: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius: string; + end: string; + height: number | null; + label: string; + labelPosition: 'start' | 'innerCenter' | 'innerStart' | 'innerEnd' | 'end' | 'none'; + labelStyle: object; + progress: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + rowId?: any; + shortDesc: string | null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal' | 'milestone' | 'summary' | 'auto'; + onBaselineChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onEndChanged: ((event: JetElementCustomEvent) => any) | null; + onHeightChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onProgressChanged: ((event: JetElementCustomEvent) => any) | null; + onRowIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojGanttTaskEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojGanttTask[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojGanttTaskSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojGanttTaskSettablePropertiesLenient): void; +} +export interface ojGanttTaskEventMap extends HTMLElementEventMap { + 'baselineChanged': JetElementCustomEvent; + 'borderRadiusChanged': JetElementCustomEvent; + 'endChanged': JetElementCustomEvent; + 'heightChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'progressChanged': JetElementCustomEvent; + 'rowIdChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; +} +export interface ojGanttTaskSettableProperties extends JetSettableProperties { + baseline: { + borderRadius?: string; + end?: string; + height?: number; + start?: string; + svgClassName?: string; + svgStyle?: object; + }; + borderRadius: string; + end: string; + height: number | null; + label: string; + labelPosition: 'start' | 'innerCenter' | 'innerStart' | 'innerEnd' | 'end' | 'none'; + labelStyle: object; + progress: { + borderRadius?: string; + height?: string; + svgClassName?: string; + svgStyle?: object; + value?: number; + }; + rowId?: any; + shortDesc: string | null; + start: string; + svgClassName: string; + svgStyle: object; + type: 'normal' | 'milestone' | 'summary' | 'auto'; +} +export interface ojGanttTaskSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojganttutils/index.d.ts b/types/oraclejet/ojganttutils/index.d.ts new file mode 100644 index 0000000000..0eb146049c --- /dev/null +++ b/types/oraclejet/ojganttutils/index.d.ts @@ -0,0 +1,4 @@ +export function computeTableColumnHeaderHeight(table: Element, gantt: Element, axisInfo: { + majorAxis: object; + minorAxis: object; +}): number; diff --git a/types/oraclejet/ojgauge/index.d.ts b/types/oraclejet/ojgauge/index.d.ts new file mode 100644 index 0000000000..d3ccbbd487 --- /dev/null +++ b/types/oraclejet/ojgauge/index.d.ts @@ -0,0 +1,574 @@ +import { Converter } from '../ojvalidation-base'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtBaseGauge extends dvtBaseComponent { + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtBaseGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtBaseGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtBaseGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtBaseGaugeSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtBaseGaugeEventMap extends dvtBaseComponentEventMap { +} +export interface dvtBaseGaugeSettableProperties extends dvtBaseComponentSettableProperties { + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface dvtBaseGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojLedGauge extends dvtBaseGauge { + borderColor: string; + color: string; + label: { + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + rendered?: 'on' | 'off'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + rotation: 90 | 180 | 270 | 0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: ojLedGauge.Threshold[]; + tooltip: { + renderer: ((context: ojLedGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + type: 'arrow' | 'diamond' | 'square' | 'rectangle' | 'triangle' | 'star' | 'human' | 'circle'; + value: number | null; + visualEffects: 'none' | 'auto'; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMetricLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent) => any) | null; + onSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLedGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLedGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLedGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLedGaugeSettablePropertiesLenient): void; + getMetricLabel(): string; +} +export interface ojLedGaugeEventMap extends dvtBaseGaugeEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'metricLabelChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'rotationChanged': JetElementCustomEvent; + 'sizeChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojLedGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + borderColor: string; + color: string; + label: { + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + rendered?: 'on' | 'off'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + rotation: 90 | 180 | 270 | 0; + size: number; + svgClassName: string; + svgStyle: object; + thresholds: ojLedGauge.Threshold[]; + tooltip: { + renderer: ((context: ojLedGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + type: 'arrow' | 'diamond' | 'square' | 'rectangle' | 'triangle' | 'star' | 'human' | 'circle'; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojLedGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojLedGauge { + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} +export interface ojRatingGauge extends dvtBaseGauge { + changed: boolean; + changedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + hoverState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + max: number; + min: number; + orientation: 'vertical' | 'horizontal'; + preserveAspectRatio: 'none' | 'meet'; + readonly: boolean; + selectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + step: 0.5 | 1; + thresholds: ojRatingGauge.Threshold[]; + tooltip: { + renderer: ((context: ojRatingGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + unselectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + value: number | null; + visualEffects: 'none' | 'auto'; + onChangedChanged: ((event: JetElementCustomEvent) => any) | null; + onChangedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onHoverStateChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onPreserveAspectRatioChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onUnselectedStateChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRatingGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRatingGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRatingGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRatingGaugeSettablePropertiesLenient): void; +} +export interface ojRatingGaugeEventMap extends dvtBaseGaugeEventMap { + 'changedChanged': JetElementCustomEvent; + 'changedStateChanged': JetElementCustomEvent; + 'hoverStateChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'preserveAspectRatioChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'selectedStateChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'unselectedStateChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojRatingGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + changed: boolean; + changedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + hoverState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + max: number; + min: number; + orientation: 'vertical' | 'horizontal'; + preserveAspectRatio: 'none' | 'meet'; + readonly: boolean; + selectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + step: 0.5 | 1; + thresholds: ojRatingGauge.Threshold[]; + tooltip: { + renderer: ((context: ojRatingGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + unselectedState: { + borderColor?: string; + color?: string; + shape?: 'circle' | 'diamond' | 'human' | 'square' | 'star' | 'triangle' | string; + source?: string; + svgClassName?: string; + svgStyle?: object; + }; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojRatingGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojRatingGauge { + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} +export interface ojStatusMeterGauge extends dvtBaseGauge { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + borderColor: string; + borderRadius: string; + center: { + renderer: ((context: ojStatusMeterGauge.CenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + color: string; + indicatorSize: number; + innerRadius: number; + label: { + position?: 'center' | 'start' | 'auto'; + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + position?: 'center' | 'insideIndicatorEdge' | 'outsideIndicatorEdge' | 'outsidePlotArea' | 'withLabel' | 'auto'; + rendered?: 'on' | 'off' | 'auto'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + orientation: 'circular' | 'vertical' | 'horizontal'; + plotArea: { + borderColor?: string; + borderRadius?: string; + color?: string; + rendered?: 'on' | 'off' | 'auto'; + svgClassName?: string; + svgStyle?: object; + }; + readonly: boolean; + referenceLines: ojStatusMeterGauge.ReferenceLine[]; + startAngle: number; + step: number | null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly' | 'all' | 'onIndicator'; + thresholds: ojStatusMeterGauge.Threshold[]; + tooltip: { + renderer: ((context: ojStatusMeterGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + value: number | null; + visualEffects: 'none' | 'auto'; + onAngleExtentChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationDurationChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onCenterChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorSizeChanged: ((event: JetElementCustomEvent) => any) | null; + onInnerRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMetricLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onPlotAreaChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onReferenceLinesChanged: ((event: JetElementCustomEvent) => any) | null; + onStartAngleChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdsChanged: ((event: JetElementCustomEvent) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVisualEffectsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojStatusMeterGaugeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojStatusMeterGauge[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojStatusMeterGaugeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojStatusMeterGaugeSettablePropertiesLenient): void; + getMetricLabel(): string; +} +export interface ojStatusMeterGaugeEventMap extends dvtBaseGaugeEventMap { + 'angleExtentChanged': JetElementCustomEvent; + 'animationDurationChanged': JetElementCustomEvent; + 'animationOnDataChangeChanged': JetElementCustomEvent; + 'animationOnDisplayChanged': JetElementCustomEvent; + 'borderColorChanged': JetElementCustomEvent; + 'borderRadiusChanged': JetElementCustomEvent; + 'centerChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'indicatorSizeChanged': JetElementCustomEvent; + 'innerRadiusChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'metricLabelChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'plotAreaChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'referenceLinesChanged': JetElementCustomEvent; + 'startAngleChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'thresholdDisplayChanged': JetElementCustomEvent; + 'thresholdsChanged': JetElementCustomEvent; + 'tooltipChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'visualEffectsChanged': JetElementCustomEvent; +} +export interface ojStatusMeterGaugeSettableProperties extends dvtBaseGaugeSettableProperties { + angleExtent: number; + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + borderColor: string; + borderRadius: string; + center: { + renderer: ((context: ojStatusMeterGauge.CenterContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + color: string; + indicatorSize: number; + innerRadius: number; + label: { + position?: 'center' | 'start' | 'auto'; + style?: object; + text?: string; + }; + max: number; + metricLabel: { + converter?: Converter; + position?: 'center' | 'insideIndicatorEdge' | 'outsideIndicatorEdge' | 'outsidePlotArea' | 'withLabel' | 'auto'; + rendered?: 'on' | 'off' | 'auto'; + scaling?: 'none' | 'thousand' | 'million' | 'billion' | 'trillion' | 'quadrillion' | 'auto'; + style?: object; + text?: string; + textType?: 'percent' | 'number'; + }; + min: number; + orientation: 'circular' | 'vertical' | 'horizontal'; + plotArea: { + borderColor?: string; + borderRadius?: string; + color?: string; + rendered?: 'on' | 'off' | 'auto'; + svgClassName?: string; + svgStyle?: object; + }; + readonly: boolean; + referenceLines: ojStatusMeterGauge.ReferenceLine[]; + startAngle: number; + step: number | null; + svgClassName: string; + svgStyle: object; + thresholdDisplay: 'currentOnly' | 'all' | 'onIndicator'; + thresholds: ojStatusMeterGauge.Threshold[]; + tooltip: { + renderer: ((context: ojStatusMeterGauge.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + readonly transientValue: number | null; + value: number | null; + visualEffects: 'none' | 'auto'; +} +export interface ojStatusMeterGaugeSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojStatusMeterGauge { + // tslint:disable-next-line interface-over-type-literal + type Bounds = { + x: number; + y: number; + width: number; + height: number; + }; + // tslint:disable-next-line interface-over-type-literal + type CenterContext = { + componentElement: Element; + innerBounds: Bounds; + metricLabel: string; + outerBounds: Bounds; + }; + // tslint:disable-next-line interface-over-type-literal + type ReferenceLine = { + color?: string; + value?: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Threshold = { + borderColor?: string; + color?: string; + max?: number; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + label: string; + parentElement: Element; + }; +} diff --git a/types/oraclejet/ojinputnumber/index.d.ts b/types/oraclejet/ojinputnumber/index.d.ts new file mode 100644 index 0000000000..533ec04873 --- /dev/null +++ b/types/oraclejet/ojinputnumber/index.d.ts @@ -0,0 +1,150 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojInputNumber extends editableValue { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + converter: Converter | Validation.RegisteredConverter; + max: number | null; + min: number | null; + placeholder: string | null; + readonly rawValue: string; + readonly: boolean | null; + required: boolean; + step: number | null; + validators: Array | Validation.RegisteredValidator>; + value: number | null; + virtualKeyboard: 'auto' | 'number' | 'text'; + translations: { + numberRange?: { + hint?: { + exact?: string; + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + exact?: string; + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipDecrement?: string; + tooltipIncrement?: string; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onAutocompleteChanged: ((event: JetElementCustomEvent) => any) | null; + onAutofocusChanged: ((event: JetElementCustomEvent) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onVirtualKeyboardChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputNumber.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputNumber.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputNumberEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputNumber[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputNumberSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputNumberSettablePropertiesLenient): void; + refresh(): void; + stepDown(steps?: number): void; + stepUp(steps?: number): void; + validate(): Promise; +} +export namespace ojInputNumber { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputNumberEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojInputNumber.ojAnimateEnd; + 'ojAnimateStart': ojInputNumber.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent; + 'autocompleteChanged': JetElementCustomEvent; + 'autofocusChanged': JetElementCustomEvent; + 'converterChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'placeholderChanged': JetElementCustomEvent; + 'rawValueChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'validatorsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'virtualKeyboardChanged': JetElementCustomEvent; +} +export interface ojInputNumberSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + converter: Converter | Validation.RegisteredConverter; + max: number | null; + min: number | null; + placeholder: string | null; + readonly rawValue: string; + readonly: boolean | null; + required: boolean; + step: number | null; + validators: Array | Validation.RegisteredValidator>; + value: number | null; + virtualKeyboard: 'auto' | 'number' | 'text'; + translations: { + numberRange?: { + hint?: { + exact?: string; + inRange?: string; + max?: string; + min?: string; + }; + messageDetail?: { + exact?: string; + rangeOverflow?: string; + rangeUnderflow?: string; + }; + messageSummary?: { + rangeOverflow?: string; + rangeUnderflow?: string; + }; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + tooltipDecrement?: string; + tooltipIncrement?: string; + }; +} +export interface ojInputNumberSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojinputtext/index.d.ts b/types/oraclejet/ojinputtext/index.d.ts new file mode 100644 index 0000000000..6caca00923 --- /dev/null +++ b/types/oraclejet/ojinputtext/index.d.ts @@ -0,0 +1,249 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface inputBase, SV = V, RV = V> extends editableValue { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onAutocompleteChanged: ((event: JetElementCustomEvent["autocomplete"]>) => any) | null; + onAutofocusChanged: ((event: JetElementCustomEvent["autofocus"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent["readonly"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onOjAnimateEnd: ((event: inputBase.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: inputBase.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: inputBaseEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): inputBase[T]; + getProperty(property: string): any; + setProperty>(property: T, value: inputBaseSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: inputBaseSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise<'valid' | 'invalid'>; +} +export namespace inputBase { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface inputBaseEventMap, SV = V, RV = V> extends editableValueEventMap { + 'ojAnimateEnd': inputBase.ojAnimateEnd; + 'ojAnimateStart': inputBase.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'autocompleteChanged': JetElementCustomEvent["autocomplete"]>; + 'autofocusChanged': JetElementCustomEvent["autofocus"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'readonlyChanged': JetElementCustomEvent["readonly"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; +} +export interface inputBaseSettableProperties extends editableValueSettableProperties { + asyncValidators: Array>; + autocomplete: 'on' | 'off' | string; + autofocus: boolean; + placeholder: string; + readonly rawValue: RV; + readonly: boolean; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface inputBaseSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojInputPassword extends inputBase { + value: string | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputPassword.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputPassword.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputPasswordEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputPassword[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputPasswordSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputPasswordSettablePropertiesLenient): void; +} +export namespace ojInputPassword { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputPasswordEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputPassword.ojAnimateEnd; + 'ojAnimateStart': ojInputPassword.ojAnimateStart; + 'valueChanged': JetElementCustomEvent; +} +export interface ojInputPasswordSettableProperties extends inputBaseSettableProperties { + value: string | null; + translations: { + regexp?: { + messageDetail?: string; + messageSummary?: string; + }; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojInputPasswordSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojInputText extends inputBase { + clearIcon: 'never' | 'always' | 'conditional'; + converter: Converter | Validation.RegisteredConverter | null; + list: string; + virtualKeyboard: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url'; + onClearIconChanged: ((event: JetElementCustomEvent) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onListChanged: ((event: JetElementCustomEvent) => any) | null; + onVirtualKeyboardChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojInputText.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojInputText.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojInputTextEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojInputText[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojInputTextSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojInputTextSettablePropertiesLenient): void; +} +export namespace ojInputText { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojInputTextEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojInputText.ojAnimateEnd; + 'ojAnimateStart': ojInputText.ojAnimateStart; + 'clearIconChanged': JetElementCustomEvent; + 'converterChanged': JetElementCustomEvent; + 'listChanged': JetElementCustomEvent; + 'virtualKeyboardChanged': JetElementCustomEvent; +} +export interface ojInputTextSettableProperties extends inputBaseSettableProperties { + clearIcon: 'never' | 'always' | 'conditional'; + converter: Converter | Validation.RegisteredConverter | null; + list: string; + virtualKeyboard: 'auto' | 'email' | 'number' | 'search' | 'tel' | 'text' | 'url'; +} +export interface ojInputTextSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojTextArea extends inputBase { + converter: Converter | Validation.RegisteredConverter | null; + rows: number; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onRowsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojTextArea.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTextArea.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTextAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTextArea[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTextAreaSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTextAreaSettablePropertiesLenient): void; +} +export namespace ojTextArea { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojTextAreaEventMap extends inputBaseEventMap { + 'ojAnimateEnd': ojTextArea.ojAnimateEnd; + 'ojAnimateStart': ojTextArea.ojAnimateStart; + 'converterChanged': JetElementCustomEvent; + 'rowsChanged': JetElementCustomEvent; +} +export interface ojTextAreaSettableProperties extends inputBaseSettableProperties { + converter: Converter | Validation.RegisteredConverter | null; + rows: number; +} +export interface ojTextAreaSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojkeyset/index.d.ts b/types/oraclejet/ojkeyset/index.d.ts new file mode 100644 index 0000000000..7ffa8547b4 --- /dev/null +++ b/types/oraclejet/ojkeyset/index.d.ts @@ -0,0 +1,28 @@ +export class ExpandAllKeySet extends KeySet { + constructor(); + add(keys: Set | K[]): ExpandAllKeySet; + addAll(): ExpandAllKeySet; + clear(): ExpandedKeySet; + delete(keys: Set | K[]): ExpandAllKeySet; + deletedValues(): Set; + has(key: K): boolean; + isAddAll(): boolean; +} +export class ExpandedKeySet extends KeySet { + constructor(keys?: Set | K[]); + add(keys: Set | K[]): ExpandedKeySet; + addAll(): ExpandAllKeySet; + clear(): ExpandedKeySet; + delete(keys: Set | K[]): ExpandedKeySet; + has(key: K): boolean; + isAddAll(): boolean; + values(): Set; +} +export abstract class KeySet { + abstract add(keys: Set | K[]): KeySet; + abstract addAll(): KeySet; + abstract clear(): KeySet; + abstract delete(keys: Set | K[]): KeySet; + abstract has(key: K): boolean; + abstract isAddAll(): boolean; +} diff --git a/types/oraclejet/ojknockout-keyset/index.d.ts b/types/oraclejet/ojknockout-keyset/index.d.ts new file mode 100644 index 0000000000..55b1beebc0 --- /dev/null +++ b/types/oraclejet/ojknockout-keyset/index.d.ts @@ -0,0 +1,8 @@ +import { ExpandedKeySet, ExpandAllKeySet } from '../ojkeyset'; +export class ObservableExpandedKeySet { + constructor(initialValue?: ExpandedKeySet | ExpandAllKeySet); + add(keys: Set | K[]): ObservableExpandedKeySet; + addAll(): ObservableExpandedKeySet; + clear(): ObservableExpandedKeySet; + delete(keys: Set | K[]): ObservableExpandedKeySet; +} diff --git a/types/oraclejet/ojknockout-model/index.d.ts b/types/oraclejet/ojknockout-model/index.d.ts new file mode 100644 index 0000000000..f73c4773c7 --- /dev/null +++ b/types/oraclejet/ojknockout-model/index.d.ts @@ -0,0 +1,3 @@ +/// +/// +export function map(m: object, callback?: ((param0: object) => void), array?: boolean): Array> | KnockoutObservableArray; diff --git a/types/oraclejet/ojknockouttemplateutils/index.d.ts b/types/oraclejet/ojknockouttemplateutils/index.d.ts new file mode 100644 index 0000000000..3c307cb427 --- /dev/null +++ b/types/oraclejet/ojknockouttemplateutils/index.d.ts @@ -0,0 +1 @@ +export function getRenderer(template: string, bReplaceNode?: boolean): ((param0: object) => void); diff --git a/types/oraclejet/ojlabel/index.d.ts b/types/oraclejet/ojlabel/index.d.ts new file mode 100644 index 0000000000..f6b0de7c4f --- /dev/null +++ b/types/oraclejet/ojlabel/index.d.ts @@ -0,0 +1,48 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLabel extends baseComponent { + for: string | null; + help: { + definition?: string | null; + source?: string | null; + }; + labelId: string | null; + showRequired: boolean | null; + translations: { + tooltipHelp?: string; + tooltipRequired?: string; + }; + onForChanged: ((event: JetElementCustomEvent) => any) | null; + onHelpChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelIdChanged: ((event: JetElementCustomEvent) => any) | null; + onShowRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLabel[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLabelSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLabelSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojLabelEventMap extends baseComponentEventMap { + 'forChanged': JetElementCustomEvent; + 'helpChanged': JetElementCustomEvent; + 'labelIdChanged': JetElementCustomEvent; + 'showRequiredChanged': JetElementCustomEvent; +} +export interface ojLabelSettableProperties extends baseComponentSettableProperties { + for: string | null; + help: { + definition?: string | null; + source?: string | null; + }; + labelId: string | null; + showRequired: boolean | null; + translations: { + tooltipHelp?: string; + tooltipRequired?: string; + }; +} +export interface ojLabelSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlabelvalue/index.d.ts b/types/oraclejet/ojlabelvalue/index.d.ts new file mode 100644 index 0000000000..0f51f259a6 --- /dev/null +++ b/types/oraclejet/ojlabelvalue/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLabelValue extends JetElement { + labelEdge: 'start' | 'top' | 'inherit'; + labelWidth: string; + onLabelEdgeChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLabelValueEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLabelValue[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLabelValueSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLabelValueSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojLabelValueEventMap extends HTMLElementEventMap { + 'labelEdgeChanged': JetElementCustomEvent; + 'labelWidthChanged': JetElementCustomEvent; +} +export interface ojLabelValueSettableProperties extends JetSettableProperties { + labelEdge: 'start' | 'top' | 'inherit'; + labelWidth: string; +} +export interface ojLabelValueSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlegend/index.d.ts b/types/oraclejet/ojlegend/index.d.ts new file mode 100644 index 0000000000..609212c1a5 --- /dev/null +++ b/types/oraclejet/ojlegend/index.d.ts @@ -0,0 +1,286 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojLegend extends dvtBaseComponent> { + as: string; + data: DataProvider | null; + drilling: 'on' | 'off'; + expanded: KeySet | null; + halign: 'center' | 'end' | 'start'; + hiddenCategories: string[]; + hideAndShowBehavior: 'on' | 'off'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal' | 'vertical'; + scrolling: 'off' | 'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle' | 'bottom' | 'top'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHalignChanged: ((event: JetElementCustomEvent["halign"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHideAndShowBehaviorChanged: ((event: JetElementCustomEvent["hideAndShowBehavior"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent["orientation"]>) => any) | null; + onScrollingChanged: ((event: JetElementCustomEvent["scrolling"]>) => any) | null; + onSymbolHeightChanged: ((event: JetElementCustomEvent["symbolHeight"]>) => any) | null; + onSymbolWidthChanged: ((event: JetElementCustomEvent["symbolWidth"]>) => any) | null; + onTextStyleChanged: ((event: JetElementCustomEvent["textStyle"]>) => any) | null; + onValignChanged: ((event: JetElementCustomEvent["valign"]>) => any) | null; + onOjDrill: ((event: ojLegend.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojLegendEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojLegend[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojLegendSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojLegendSettablePropertiesLenient): void; + getContextByNode(node: Element): ojLegend.NodeContext | null; + getItem(subIdPath: any[]): ojLegend.ItemContext | null; + getPreferredSize(): ojLegend.PreferredSize | null; + getSection(subIdPath: any[]): ojLegend.SectionContext | null; +} +export namespace ojLegend { + interface ojDrill extends CustomEvent<{ + id: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + text: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + itemIndex: number; + sectionIndexPath: number[]; + subId: string; + }; + // tslint:disable-next-line interface-over-type-literal + type PreferredSize = { + width: number; + height: number; + }; + // tslint:disable-next-line interface-over-type-literal + type SectionContext = { + title: string; + sections: object[]; + items: object[]; + getSection: { + title: string; + sections: string; + items: boolean; + }; + getItems: { + text: string; + }; + }; +} +export interface ojLegendEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojLegend.ojDrill; + 'asChanged': JetElementCustomEvent["as"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'halignChanged': JetElementCustomEvent["halign"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'hideAndShowBehaviorChanged': JetElementCustomEvent["hideAndShowBehavior"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'orientationChanged': JetElementCustomEvent["orientation"]>; + 'scrollingChanged': JetElementCustomEvent["scrolling"]>; + 'symbolHeightChanged': JetElementCustomEvent["symbolHeight"]>; + 'symbolWidthChanged': JetElementCustomEvent["symbolWidth"]>; + 'textStyleChanged': JetElementCustomEvent["textStyle"]>; + 'valignChanged': JetElementCustomEvent["valign"]>; +} +export interface ojLegendSettableProperties extends dvtBaseComponentSettableProperties { + as: string; + data: DataProvider | null; + drilling: 'on' | 'off'; + expanded: KeySet | null; + halign: 'center' | 'end' | 'start'; + hiddenCategories: string[]; + hideAndShowBehavior: 'on' | 'off'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + orientation: 'horizontal' | 'vertical'; + scrolling: 'off' | 'asNeeded'; + symbolHeight: number; + symbolWidth: number; + textStyle?: object; + valign: 'middle' | 'bottom' | 'top'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojLegendSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojLegendItem extends JetElement { + borderColor?: string; + categories?: string[]; + categoryVisibility?: 'hidden' | 'visible'; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoryVisibilityChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLineStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLineWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerColorChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onMarkerSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onSymbolTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLegendItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLegendItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLegendItemSettablePropertiesLenient): void; +} +export interface ojLegendItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'categoryVisibilityChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'lineStyleChanged': JetElementCustomEvent; + 'lineWidthChanged': JetElementCustomEvent; + 'markerColorChanged': JetElementCustomEvent; + 'markerShapeChanged': JetElementCustomEvent; + 'markerSvgClassNameChanged': JetElementCustomEvent; + 'markerSvgStyleChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'symbolTypeChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; +} +export interface ojLegendItemSettableProperties extends JetSettableProperties { + borderColor?: string; + categories?: string[]; + categoryVisibility?: 'hidden' | 'visible'; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + lineStyle?: 'dotted' | 'dashed' | 'solid'; + lineWidth?: number; + markerColor?: string; + markerShape: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + markerSvgClassName?: string; + markerSvgStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shortDesc?: string; + source?: string; + svgClassName?: string; + svgStyle?: object; + symbolType?: 'line' | 'lineWithMarker' | 'image' | 'marker'; + text: string; +} +export interface ojLegendItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojLegendSection extends JetElement { + collapsible?: 'on' | 'off'; + text?: string; + textHalign?: 'center' | 'end' | 'start'; + textStyle?: object; + onCollapsibleChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + onTextHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onTextStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojLegendSectionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojLegendSection[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojLegendSectionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojLegendSectionSettablePropertiesLenient): void; +} +export interface ojLegendSectionEventMap extends HTMLElementEventMap { + 'collapsibleChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; + 'textHalignChanged': JetElementCustomEvent; + 'textStyleChanged': JetElementCustomEvent; +} +export interface ojLegendSectionSettableProperties extends JetSettableProperties { + collapsible?: 'on' | 'off'; + text?: string; + textHalign?: 'center' | 'end' | 'start'; + textStyle?: object; +} +export interface ojLegendSectionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojlistdataproviderview/index.d.ts b/types/oraclejet/ojlistdataproviderview/index.d.ts new file mode 100644 index 0000000000..031611e08e --- /dev/null +++ b/types/oraclejet/ojlistdataproviderview/index.d.ts @@ -0,0 +1,25 @@ +import { DataProvider, SortCriterion, FetchByKeysParameters, ContainsKeysResults, FetchByKeysResults, FetchByOffsetParameters, FetchByOffsetResults, DataMapping, FetchListResult, + FetchListParameters } from '../ojdataprovider'; +declare class ListDataProviderView implements DataProvider { + dataMapping: DataMapping; + from: any; + offset: number; + sortCriteria: Array>; + constructor(dataProvider: DataProvider, options?: { + from?: object; + offset?: number; + sortCriteria?: Array>; + dataMapping?: DataMapping; + }); + addEventListener(eventType: string, listener: EventListener): void; + containsKeys(params: FetchByKeysParameters): Promise>; + dispatchEvent(evt: Event): boolean; + fetchByKeys(params: FetchByKeysParameters): Promise>; + fetchByOffset(params: FetchByOffsetParameters): Promise>; + fetchFirst(params?: FetchListParameters): AsyncIterable>; + getCapability(capabilityName: string): any; + getTotalSize(): Promise; + isEmpty(): 'yes' | 'no' | 'unknown'; + removeEventListener(eventType: string, listener: EventListener): void; +} +export = ListDataProviderView; diff --git a/types/oraclejet/ojlistview/index.d.ts b/types/oraclejet/ojlistview/index.d.ts new file mode 100644 index 0000000000..97a77c52ea --- /dev/null +++ b/types/oraclejet/ojlistview/index.d.ts @@ -0,0 +1,335 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojListView extends baseComponent> { + as: string; + currentItem: K; + data: DataProvider; + dnd: { + drag?: { + items: { + dataTypes?: string | string[]; + drag?: ((param0: Event) => void); + dragEnd?: ((param0: Event) => void); + dragStart?: ((param0: Event, param1: { + items: Element[]; + }) => void); + }; + }; + drop?: { + items: { + dataTypes?: string | string[]; + dragEnter?: ((param0: Event, param1: { + item: Element; + }) => void); + dragLeave?: ((param0: Event, param1: { + item: Element; + }) => void); + dragOver?: ((param0: Event, param1: { + item: Element; + }) => void); + drop?: ((param0: Event, param1: ojListView.ItemsDropContext) => void); + }; + }; + reorder: { + items: 'enabled' | 'disabled'; + }; + }; + drillMode: 'collapsible' | 'none'; + expanded: KeySet; + readonly firstSelectedItem: { + key: K; + data: D; + }; + groupHeaderPosition: 'static' | 'sticky'; + item: { + focusable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + renderer?: ((param0: ojListView.ItemContext) => { + insert: Element | string; + } | undefined) | null; + selectable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize?: number; + maxCount?: number; + scroller?: Element; + }; + scrollPosition: { + x?: number; + y?: number; + index?: number; + parent?: K; + key?: K; + offsetX?: number; + offsetY?: number; + }; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + selectionRequired: boolean; + translations: { + accessibleNavigateSkipItems?: string; + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderInsideItem?: string; + accessibleReorderTouchInstructionText?: string; + indexerCharacters?: string; + labelCopy?: string; + labelCut?: string; + labelPaste?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + msgFetchingData?: string; + msgNoData?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onDrillModeChanged: ((event: JetElementCustomEvent["drillMode"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onFirstSelectedItemChanged: ((event: JetElementCustomEvent["firstSelectedItem"]>) => any) | null; + onGroupHeaderPositionChanged: ((event: JetElementCustomEvent["groupHeaderPosition"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRequiredChanged: ((event: JetElementCustomEvent["selectionRequired"]>) => any) | null; + onOjAnimateEnd: ((event: ojListView.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojListView.ojAnimateStart) => any) | null; + onOjBeforeCollapse: ((event: ojListView.ojBeforeCollapse) => any) | null; + onOjBeforeCurrentItem: ((event: ojListView.ojBeforeCurrentItem) => any) | null; + onOjBeforeExpand: ((event: ojListView.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojListView.ojCollapse) => any) | null; + onOjCopy: ((event: ojListView.ojCopy) => any) | null; + onOjCut: ((event: ojListView.ojCut) => any) | null; + onOjExpand: ((event: ojListView.ojExpand) => any) | null; + onOjPaste: ((event: ojListView.ojPaste) => any) | null; + onOjReorder: ((event: ojListView.ojReorder) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojListViewEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojListView[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojListViewSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojListViewSettablePropertiesLenient): void; + getContextByNode(node: Element): ojListView.ContextByNode | null; + getDataForVisibleItem(context: { + key?: K; + index?: number; + parent?: Element; + }): D; + refresh(): void; + scrollToItem(item: { + key: K; + }): void; +} +export namespace ojListView { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCollapse extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: K; + previousItem: Element; + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojCopy extends CustomEvent<{ + items: Element[]; + [propName: string]: any; + }> { + } + interface ojCut extends CustomEvent<{ + items: Element[]; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + key: K; + item: Element; + [propName: string]: any; + }> { + } + interface ojPaste extends CustomEvent<{ + item: Element; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + items: Element[]; + position: string; + reference: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ContextByNode = { + subId: string; + key: K; + index: number; + parent?: Element; + group?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + datasource: DataProvider; + index: number; + key: K; + data: D; + parentElement: Element; + depth?: number; + parentKey?: K; + leaf?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type ItemsDropContext = { + item: Element; + position: 'before' | 'after' | 'inside'; + reorder: boolean; + }; +} +export interface ojListViewEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojListView.ojAnimateEnd; + 'ojAnimateStart': ojListView.ojAnimateStart; + 'ojBeforeCollapse': ojListView.ojBeforeCollapse; + 'ojBeforeCurrentItem': ojListView.ojBeforeCurrentItem; + 'ojBeforeExpand': ojListView.ojBeforeExpand; + 'ojCollapse': ojListView.ojCollapse; + 'ojCopy': ojListView.ojCopy; + 'ojCut': ojListView.ojCut; + 'ojExpand': ojListView.ojExpand; + 'ojPaste': ojListView.ojPaste; + 'ojReorder': ojListView.ojReorder; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'drillModeChanged': JetElementCustomEvent["drillMode"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'firstSelectedItemChanged': JetElementCustomEvent["firstSelectedItem"]>; + 'groupHeaderPositionChanged': JetElementCustomEvent["groupHeaderPosition"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRequiredChanged': JetElementCustomEvent["selectionRequired"]>; +} +export interface ojListViewSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: DataProvider; + dnd: { + drag?: { + items: { + dataTypes?: string | string[]; + drag?: ((param0: Event) => void); + dragEnd?: ((param0: Event) => void); + dragStart?: ((param0: Event, param1: { + items: Element[]; + }) => void); + }; + }; + drop?: { + items: { + dataTypes?: string | string[]; + dragEnter?: ((param0: Event, param1: { + item: Element; + }) => void); + dragLeave?: ((param0: Event, param1: { + item: Element; + }) => void); + dragOver?: ((param0: Event, param1: { + item: Element; + }) => void); + drop?: ((param0: Event, param1: ojListView.ItemsDropContext) => void); + }; + }; + reorder: { + items: 'enabled' | 'disabled'; + }; + }; + drillMode: 'collapsible' | 'none'; + expanded: KeySet; + readonly firstSelectedItem: { + key: K; + data: D; + }; + groupHeaderPosition: 'static' | 'sticky'; + item: { + focusable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + renderer?: ((param0: ojListView.ItemContext) => { + insert: Element | string; + } | undefined) | null; + selectable?: ((param0: ojListView.ItemContext) => boolean) | boolean; + }; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize?: number; + maxCount?: number; + scroller?: Element; + }; + scrollPosition: { + x?: number; + y?: number; + index?: number; + parent?: K; + key?: K; + offsetX?: number; + offsetY?: number; + }; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + selectionRequired: boolean; + translations: { + accessibleNavigateSkipItems?: string; + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderInsideItem?: string; + accessibleReorderTouchInstructionText?: string; + indexerCharacters?: string; + labelCopy?: string; + labelCut?: string; + labelPaste?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + msgFetchingData?: string; + msgNoData?: string; + }; +} +export interface ojListViewSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojlocaledata/index.d.ts b/types/oraclejet/ojlocaledata/index.d.ts new file mode 100644 index 0000000000..980d4fa2de --- /dev/null +++ b/types/oraclejet/ojlocaledata/index.d.ts @@ -0,0 +1,7 @@ +export function getDayNames(type?: 'abbreviated' | 'narrow' | 'wide'): string[]; +export function getFirstDayOfWeek(): number; +export function getMonthNames(type?: 'abbreviated' | 'narrow' | 'wide'): string[]; +export function getWeekendEnd(): number; +export function getWeekendStart(): number; +export function isMonthPriorToYear(): boolean; +export function setBundle(bundle: object): void; diff --git a/types/oraclejet/ojlogger/index.d.ts b/types/oraclejet/ojlogger/index.d.ts new file mode 100644 index 0000000000..493f251f55 --- /dev/null +++ b/types/oraclejet/ojlogger/index.d.ts @@ -0,0 +1,10 @@ +export let LEVEL_ERROR: number; +export let LEVEL_INFO: number; +export let LEVEL_LOG: number; +export let LEVEL_NONE: number; +export let LEVEL_WARN: number; +export function error(...args: Array): void; +export function info(...args: Array): void; +export function log(...args: Array): void; +export function option(key?: object | string, value?: any): any; +export function warn(...args: Array): void; diff --git a/types/oraclejet/ojmasonrylayout/index.d.ts b/types/oraclejet/ojmasonrylayout/index.d.ts new file mode 100644 index 0000000000..0de1b7ccb7 --- /dev/null +++ b/types/oraclejet/ojmasonrylayout/index.d.ts @@ -0,0 +1,119 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMasonryLayout extends baseComponent { + reorderHandle: string | null; + translations: { + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + }; + onReorderHandleChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojMasonryLayout.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMasonryLayout.ojAnimateStart) => any) | null; + onOjBeforeInsert: ((event: ojMasonryLayout.ojBeforeInsert) => any) | null; + onOjBeforeRemove: ((event: ojMasonryLayout.ojBeforeRemove) => any) | null; + onOjBeforeReorder: ((event: ojMasonryLayout.ojBeforeReorder) => any) | null; + onOjBeforeResize: ((event: ojMasonryLayout.ojBeforeResize) => any) | null; + onOjInsert: ((event: ojMasonryLayout.ojInsert) => any) | null; + onOjRemove: ((event: ojMasonryLayout.ojRemove) => any) | null; + onOjReorder: ((event: ojMasonryLayout.ojReorder) => any) | null; + onOjResize: ((event: ojMasonryLayout.ojResize) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMasonryLayoutEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMasonryLayout[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMasonryLayoutSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMasonryLayoutSettablePropertiesLenient): void; + insertTile(selector: string, index: number): void; + refresh(): void; + removeTile(selector: string): void; + resizeTile(selector: string, sizeStyleClass: string): void; +} +export namespace ojMasonryLayout { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeInsert extends CustomEvent<{ + tile: Element; + index: number; + [propName: string]: any; + }> { + } + interface ojBeforeRemove extends CustomEvent<{ + tile: Element; + [propName: string]: any; + }> { + } + interface ojBeforeReorder extends CustomEvent<{ + tile: Element; + fromIndex: number; + [propName: string]: any; + }> { + } + interface ojBeforeResize extends CustomEvent<{ + tile: Element; + previousSizeStyleClass: string; + sizeStyleClass: string; + [propName: string]: any; + }> { + } + interface ojInsert extends CustomEvent<{ + tile: Element; + index: number; + [propName: string]: any; + }> { + } + interface ojRemove extends CustomEvent<{ + tile: Element; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + tile: Element; + fromIndex: number; + toIndex: number; + [propName: string]: any; + }> { + } + interface ojResize extends CustomEvent<{ + tile: Element; + previousSizeStyleClass: string; + sizeStyleClass: string; + [propName: string]: any; + }> { + } +} +export interface ojMasonryLayoutEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojMasonryLayout.ojAnimateEnd; + 'ojAnimateStart': ojMasonryLayout.ojAnimateStart; + 'ojBeforeInsert': ojMasonryLayout.ojBeforeInsert; + 'ojBeforeRemove': ojMasonryLayout.ojBeforeRemove; + 'ojBeforeReorder': ojMasonryLayout.ojBeforeReorder; + 'ojBeforeResize': ojMasonryLayout.ojBeforeResize; + 'ojInsert': ojMasonryLayout.ojInsert; + 'ojRemove': ojMasonryLayout.ojRemove; + 'ojReorder': ojMasonryLayout.ojReorder; + 'ojResize': ojMasonryLayout.ojResize; + 'reorderHandleChanged': JetElementCustomEvent; +} +export interface ojMasonryLayoutSettableProperties extends baseComponentSettableProperties { + reorderHandle: string | null; + translations: { + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + }; +} +export interface ojMasonryLayoutSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmenu/index.d.ts b/types/oraclejet/ojmenu/index.d.ts new file mode 100644 index 0000000000..b6b1c8a9cb --- /dev/null +++ b/types/oraclejet/ojmenu/index.d.ts @@ -0,0 +1,105 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMenu extends baseComponent { + disabled: boolean; + openOptions: ojMenu.OpenOptions; + translations: { + ariaFocusSkipLink?: string; + labelCancel?: string; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onOpenOptionsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAction: ((event: ojMenu.ojAction) => any) | null; + onOjAnimateEnd: ((event: ojMenu.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMenu.ojAnimateStart) => any) | null; + onOjBeforeOpen: ((event: ojMenu.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojMenu.ojClose) => any) | null; + onOjOpen: ((event: ojMenu.ojOpen) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenu[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuSettablePropertiesLenient): void; + open(event?: object, openOptions?: ojMenu.OpenOptions): void; + refresh(): void; +} +export namespace ojMenu { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + event: Event; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type OpenOptions = { + display?: string; + initialFocus?: string; + launcher?: string | Element; + position?: Position; + }; + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'flipcenter' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojMenuEventMap extends baseComponentEventMap { + 'ojAction': ojMenu.ojAction; + 'ojAnimateEnd': ojMenu.ojAnimateEnd; + 'ojAnimateStart': ojMenu.ojAnimateStart; + 'ojBeforeOpen': ojMenu.ojBeforeOpen; + 'ojClose': ojMenu.ojClose; + 'ojOpen': ojMenu.ojOpen; + 'disabledChanged': JetElementCustomEvent; + 'openOptionsChanged': JetElementCustomEvent; +} +export interface ojMenuSettableProperties extends baseComponentSettableProperties { + disabled: boolean; + openOptions: ojMenu.OpenOptions; + translations: { + ariaFocusSkipLink?: string; + labelCancel?: string; + }; +} +export interface ojMenuSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmenuselectmany/index.d.ts b/types/oraclejet/ojmenuselectmany/index.d.ts new file mode 100644 index 0000000000..f79a0b985d --- /dev/null +++ b/types/oraclejet/ojmenuselectmany/index.d.ts @@ -0,0 +1,39 @@ +import { DataProvider } from '../ojdataprovider'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMenuSelectMany extends JetElement { + disabled: boolean; + options: ojMenuSelectMany.Option[] | DataProvider | null; + value: any[]; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMenuSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMenuSelectMany[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMenuSelectManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMenuSelectManySettablePropertiesLenient): void; +} +export interface ojMenuSelectManyEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'optionsChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojMenuSelectManySettableProperties extends JetSettableProperties { + disabled: boolean; + options: ojMenuSelectMany.Option[] | DataProvider | null; + value: any[]; +} +export interface ojMenuSelectManySettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojMenuSelectMany { + // tslint:disable-next-line interface-over-type-literal + type Option = { + id?: string; + disabled?: boolean; + label: string; + value: any; + }; +} diff --git a/types/oraclejet/ojmessage/index.d.ts b/types/oraclejet/ojmessage/index.d.ts new file mode 100644 index 0000000000..55e905ba8d --- /dev/null +++ b/types/oraclejet/ojmessage/index.d.ts @@ -0,0 +1,80 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMessage extends JetElement { + message: ojMessage.Message; + translations: { + categories?: { + confirmation?: string; + error?: string; + info?: string; + warning?: string; + }; + labelCloseIcon?: string; + }; + onMessageChanged: ((event: JetElementCustomEvent) => any) | null; + onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojMessage.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojMessage.ojAnimateStart) => any) | null; + onOjClose: ((event: ojMessage.ojClose) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessageEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMessage[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMessageSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMessageSettablePropertiesLenient): void; + close(): void; +} +export namespace ojMessage { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + message: object; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Message = { + icon?: string; + category?: string; + severity?: 'error' | 'warning' | 'confirmation' | 'info' | 'none'; + timestamp?: string; + summary?: string; + detail?: string; + autoTimeout?: number; + closeAffordance?: 'none' | 'defaults'; + sound?: string; + }; +} +export interface ojMessageEventMap extends HTMLElementEventMap { + 'ojAnimateEnd': ojMessage.ojAnimateEnd; + 'ojAnimateStart': ojMessage.ojAnimateStart; + 'ojClose': ojMessage.ojClose; + 'messageChanged': JetElementCustomEvent; + 'translationsChanged': JetElementCustomEvent; +} +export interface ojMessageSettableProperties extends JetSettableProperties { + message: ojMessage.Message; + translations: { + categories?: { + confirmation?: string; + error?: string; + info?: string; + warning?: string; + }; + labelCloseIcon?: string; + }; +} +export interface ojMessageSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmessages/index.d.ts b/types/oraclejet/ojmessages/index.d.ts new file mode 100644 index 0000000000..0b410266a3 --- /dev/null +++ b/types/oraclejet/ojmessages/index.d.ts @@ -0,0 +1,73 @@ +import { DataProvider } from '../ojdataprovider'; +import { ojMessage } from '../ojmessage'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojMessages extends JetElement { + display: 'general' | 'notification'; + messages: ojMessage.Message[] | null | DataProvider; + position: ojMessages.Position | null; + translations: { + ariaLiveRegion?: { + navigationFromKeyboard?: string; + navigationToKeyboard?: string; + navigationToTouch?: string; + newMessage?: string; + }; + labelLandmark?: string; + }; + onDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onMessagesChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onTranslationsChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojMessagesEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojMessages[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojMessagesSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojMessagesSettablePropertiesLenient): void; + close(associated: object): void; + closeAll(closeFilter?: (message: ojMessage.Message) => boolean): void; +} +export interface ojMessagesEventMap extends HTMLElementEventMap { + 'displayChanged': JetElementCustomEvent; + 'messagesChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'translationsChanged': JetElementCustomEvent; +} +export interface ojMessagesSettableProperties extends JetSettableProperties { + display: 'general' | 'notification'; + messages: ojMessage.Message[] | null | DataProvider; + position: ojMessages.Position | null; + translations: { + ariaLiveRegion?: { + navigationFromKeyboard?: string; + navigationToKeyboard?: string; + navigationToTouch?: string; + newMessage?: string; + }; + labelLandmark?: string; + }; +} +export interface ojMessagesSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojMessages { + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} diff --git a/types/oraclejet/ojmessaging/index.d.ts b/types/oraclejet/ojmessaging/index.d.ts new file mode 100644 index 0000000000..0af2305ef7 --- /dev/null +++ b/types/oraclejet/ojmessaging/index.d.ts @@ -0,0 +1,15 @@ +declare class Message { + detail: string; + severity: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL; + summary: string; + constructor(summary: string, detail: string, severity?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL); + static getMaxSeverity(messages?: Message[]): Message.SEVERITY_LEVEL | -1; + static getSeverityLevel(severity?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL): Message.SEVERITY_LEVEL; + static getSeverityType(level?: Message.SEVERITY_TYPE | Message.SEVERITY_LEVEL): Message.SEVERITY_TYPE; + static isValid(messages: Message[]): boolean; +} +declare namespace Message { + type SEVERITY_LEVEL = 5 | 4 | 3 | 2 | 1; + type SEVERITY_TYPE = "confirmation" | "info" | "warning" | "error" | "fatal"; +} +export = Message; diff --git a/types/oraclejet/ojmodel/index.d.ts b/types/oraclejet/ojmodel/index.d.ts new file mode 100644 index 0000000000..d2ffaf54f6 --- /dev/null +++ b/types/oraclejet/ojmodel/index.d.ts @@ -0,0 +1,280 @@ +export class Collection { + changes: number[]; + comparator: null | string | ((param0: Model, param1?: Model) => number); + customPagingOptions: ((response: object) => Collection.CustomPagingOptionsReturn | null) | null; + customURL: ((param0: string, param1: Collection, param2: object) => string | object | null) | null; + fetchSize: number; + hasMore: boolean; + lastFetchCount: number; + lastFetchSize: number; + length: number; + model: object; + modelLimit: number; + models: Model[]; + offset: number; + omitLanguageHeader: boolean; + parse: ((param0: object) => object); + sortDirection: number; + totalResults: number; + url: null | string | (() => string); + constructor(models?: Model[], options?: object); + static extend(properties?: { + parse?: (data: any) => any; + model?: Model; + url?: string; + initialize?: (models: Model[], options: object) => void; + comparator?: null | string | ((model1: Model, model2?: Model) => number); + fetchSize?: number; + modelLimit?: number; + [propName: string]: any; + }, classProperties?: object): any; + abort(): Promise; + add(m: Model | object | object[] | Model[], options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | Model[]; + any(iterator: ((param0: object) => void), context?: object): boolean; + at(index: number, options?: { + fetchSize?: number; + deferred?: boolean; + [propName: string]: any; + }): Model | Promise | null; + clone(): Collection; + contains(model: object, options?: object): boolean | Promise; + create(attributes?: object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Model | boolean | Promise; + difference(...var_args: Model[][]): Model[]; + each(iterator: ((param0: Model) => void), context?: object): undefined; + fetch(options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + add?: boolean; + set?: boolean; + startIndex?: number; + startID?: any; + since?: any; + until?: any; + fetchSize?: number; + [propName: string]: any; + }): object; + filter(iterator: ((param0: Model) => void), context?: object): Model[]; + findWhere(attrs: object | object[], options?: { + deferred?: boolean; + [propName: string]: any; + }): Model | Promise; + first(n?: number, options?: object): Model[] | null | Promise; + get(id: object | string, options?: object): Model | null | Promise; + getByCid(clientId: string): Model | null; + groupBy(iterator: string | ((param0: Model) => object), context?: object): object; + include(model: object, options?: object): boolean | Promise; + indexBy(iterator: string | ((param0: Model) => void), context?: object): object; + indexOf(model: object, options?: object): number | Promise; + initial(n?: number): Model[]; + isEmpty(): boolean; + isRangeLocal(start: number, count: number): boolean; + last(n?: number, options?: object): Promise | Model[] | null; + lastIndexOf(model: Model, fromIndex?: number): number; + listenTo(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + listenToOnce(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + map(iterator: ((param0: Model) => object), context?: object): object[]; + max(iterator: ((param0: Model) => object), context?: object): object; + min(iterator: ((param0: object) => void), context?: object): object; + modelId(attrs: object): null | string; + next(n: number, options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + [propName: string]: any; + }): object | null; + off(eventType?: string | object, callback?: (eventType: string, data: object) => void, context?: object): undefined; + on(eventType: string | object, callback: (eventType: string, data: object) => void, context?: object): undefined; + once(eventType: string, callback: (eventType: string, data: object) => void, context?: object): undefined; + pluck(attr: string): object[]; + pop(options?: { + silent?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Model | Promise; + previous(n: number, options?: { + success?: (collection: Collection, response: any, options: object) => void; + error?: (collection: Collection, xhr: any, options: object) => void; + [propName: string]: any; + }): object; + push(m: Model | object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | undefined; + refresh(options?: { + silent?: boolean; + startIndex?: number; + [propName: string]: any; + }): Promise; + remove(m: Model | Model[], options?: object): Model[] | object; + reset(data?: object, options?: { + silent?: boolean; + [propName: string]: any; + }): Model | Model[]; + rest(n?: number, options?: object): object[] | Promise; + set(models: object, options?: { + add?: boolean; + remove?: boolean; + merge?: boolean; + silent?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | null; + setFetchSize(n: number): undefined; + setModelLimit(n: number): undefined; + setRangeLocal(start: number, count: number): Promise; + shift(options?: object): Model | Promise | null; + size(): number; + slice(start: number, end?: number, options?: object): Promise | Model[]; + sort(options?: { + silent?: boolean; + startIndex?: number; + [propName: string]: any; + }): Promise | null; + sortBy(iterator: string | ((param0: Model) => object), context?: object): Model[]; + sortedIndex(comparator: string | ((param0: Model, param1?: Model) => object)): number; + stopListening(otherObj?: object, eventType?: string, callback?: (eventType: string, data: object) => void): undefined; + sync(method: string, collection: Collection, options?: { + success?: (json?: any[]) => void; + error?: (xhr: any, status: any, error: any) => void; + [propName: string]: any; + }): object; + toJSON(): object[]; + trigger(eventType: string): undefined; + unshift(m: object, options?: { + silent?: boolean; + at?: number; + merge?: boolean; + sort?: boolean; + force?: boolean; + deferred?: boolean; + [propName: string]: any; + }): Promise | Model[]; + whenReady(): Promise; + where(attrs: object | object[], options?: object): Promise | Model[]; + whereToCollection(attrs: object | object[], options?: object): Collection | Promise; + without(...var_args: Model[]): Model[]; +} +export namespace Collection { + // tslint:disable-next-line interface-over-type-literal + type CustomPagingOptionsReturn = { + totalResults?: number; + limit?: number; + count?: number; + offset?: number; + hasMore?: boolean; + }; + // tslint:disable-next-line interface-over-type-literal + type SetRangeLocalPromise = { + start: number; + count: number; + models: Model[]; + }; +} +export class Model { + attributes: object; + customURL: ((param0: string, param1: Model, param2: object) => string | object | null) | null; + defaults: object; + id: string | null; + idAttribute: string | null; + omitLanguageHeader: boolean; + parse: ((param0: object) => object); + parseSave: ((param0: object) => object); + urlRoot: string | null; + validate: ((param0: object, param1: object) => string | object | null) | null; + validationError: string | object | null; + constructor(attributes?: object, options?: object); + static extend(properties?: { + parse?: (data: any) => any; + parseSave?: (data: any) => any; + urlRoot?: string; + initialize?: (models: Model[], options: object) => void; + validate?: null | object | string | ((attributes: object, options?: Model) => number); + [propName: string]: any; + }, classProperties?: object): any; + changedAttributes(attributes?: object): object | boolean; + clear(options?: object): Model | boolean; + clone(): Model; + destroy(options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + wait?: boolean; + [propName: string]: any; + }): boolean; + fetch(options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + [propName: string]: any; + }): object; + get(property: string): object; + has(property: string): boolean; + hasChanged(attribute?: string): boolean; + invert(): object; + isNew(): boolean; + isValid(): boolean; + keys(): object[]; + listenTo(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + listenToOnce(otherObj: object, eventType: string, callback: (eventType: string, data: object) => void): undefined; + matches(attrs: object): ((param0: Model) => boolean); + off(eventType?: string | object, callback?: (eventType: string, data: object) => void, context?: object): undefined; + omit(keys: object[] | object): object; + on(eventType: string | object, callback: (eventType: string, data: object) => void, context?: object): undefined; + once(eventType: string, callback: (eventType: string, data: object) => void, context?: object): undefined; + pairs(): object; + pick(keys: object[] | object): object; + previous(attr: string): object; + previousAttributes(): object; + save(attributes?: object, options?: { + success?: (model: Model, response: any, options: object) => void; + error?: (model: Model, xhr: any, options: object) => void; + contentType?: string; + valdiate?: boolean; + wait?: boolean; + patch?: boolean; + attrs?: object; + [propName: string]: any; + }): object | boolean; + set(property: string | object, value?: object, options?: object): Model | boolean; + stopListening(otherObj?: object, eventType?: string, callback?: (eventType: string, data: object) => void): undefined; + sync(method: string, model: Model, options?: object): object; + toJSON(): object; + trigger(eventType: string): undefined; + unset(property: string, options?: object): boolean; + url(): string | null; + values(): object[]; +} +export class OAuth { + constructor(attributes: object, header: string); + cleanAccessTokenRequest(): undefined; + cleanAccessTokenResponse(): undefined; + clientCredentialGrant(): undefined; + getAccessTokenRequest(): object; + getAccessTokenResponse(): object; + getHeader(): object; + isInitialized(): boolean; + setAccessTokenRequest(data: object): undefined; + setAccessTokenResponse(data: object): undefined; +} +// tslint:disable-next-line no-unnecessary-class +export class URLError { + constructor(); +} diff --git a/types/oraclejet/ojmodule-element-utils/index.d.ts b/types/oraclejet/ojmodule-element-utils/index.d.ts new file mode 100644 index 0000000000..4489ac1f28 --- /dev/null +++ b/types/oraclejet/ojmodule-element-utils/index.d.ts @@ -0,0 +1,8 @@ +export function createView(options: { + viewPath: string; + require?: ((module: string) => any) | ((modules: string[], ready?: any, errback?: any) => void); +}): Promise; +export function createViewModel(options: { + viewModelPath: string; + require?: ((module: string) => any) | ((modules: string[], ready?: any, errback?: any) => void); +}): Promise; diff --git a/types/oraclejet/ojmodule-element/index.d.ts b/types/oraclejet/ojmodule-element/index.d.ts new file mode 100644 index 0000000000..693cb518f6 --- /dev/null +++ b/types/oraclejet/ojmodule-element/index.d.ts @@ -0,0 +1,89 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ModuleElementAnimation { + animate(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + newViewParent: Node; + oldViewParent: Node; + removeOldView: () => undefined; + insertNewView: () => undefined; + oldDomNodes: any[]; + }): Promise; + canAnimate(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + }): boolean; + prepareAnimation(context: { + node: Node; + isInitial: boolean; + oldViewModel: object; + newViewModel: object; + }): object; +} +export interface ojModule extends JetElement { + animation: object; + config: { + cleanupMode: 'onDisconnect' | 'none'; + view: Node[]; + viewModel: object; + }; + onAnimationChanged: ((event: JetElementCustomEvent) => any) | null; + onConfigChanged: ((event: JetElementCustomEvent) => any) | null; + onOjTransitionEnd: ((event: ojModule.ojTransitionEnd) => any) | null; + onOjTransitionStart: ((event: ojModule.ojTransitionStart) => any) | null; + onOjViewConnected: ((event: ojModule.ojViewConnected) => any) | null; + onOjViewDisconnected: ((event: ojModule.ojViewDisconnected) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojModuleEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojModule[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojModuleSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojModuleSettablePropertiesLenient): void; +} +export namespace ojModule { + interface ojTransitionEnd extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojTransitionStart extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojViewConnected extends CustomEvent<{ + viewModel: object; + [propName: string]: any; + }> { + } + interface ojViewDisconnected extends CustomEvent<{ + viewModel: object; + view: Node[]; + [propName: string]: any; + }> { + } +} +export interface ojModuleEventMap extends HTMLElementEventMap { + 'ojTransitionEnd': ojModule.ojTransitionEnd; + 'ojTransitionStart': ojModule.ojTransitionStart; + 'ojViewConnected': ojModule.ojViewConnected; + 'ojViewDisconnected': ojModule.ojViewDisconnected; + 'animationChanged': JetElementCustomEvent; + 'configChanged': JetElementCustomEvent; +} +export interface ojModuleSettableProperties extends JetSettableProperties { + animation: object; + config: { + cleanupMode: 'onDisconnect' | 'none'; + view: Node[]; + viewModel: object; + }; +} +export interface ojModuleSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojmoduleanimations/index.d.ts b/types/oraclejet/ojmoduleanimations/index.d.ts new file mode 100644 index 0000000000..65e98ba0a7 --- /dev/null +++ b/types/oraclejet/ojmoduleanimations/index.d.ts @@ -0,0 +1,34 @@ +import { ModuleElementAnimation } from '../ojmodule-element'; +import AnimationUtils = require('../ojanimation'); +export let coverStart: ModuleElementAnimation; +export let coverUp: ModuleElementAnimation; +export let fade: ModuleElementAnimation; +export let navChild: ModuleElementAnimation; +export let navParent: ModuleElementAnimation; +export let navSiblingEarlier: ModuleElementAnimation; +export let navSiblingLater: ModuleElementAnimation; +export let pushEnd: ModuleElementAnimation; +export let pushStart: ModuleElementAnimation; +export let revealDown: ModuleElementAnimation; +export let revealEnd: ModuleElementAnimation; +export let zoomIn: ModuleElementAnimation; +export let zoomOut: ModuleElementAnimation; +export function createAnimation(oldViewEffect: { + effect: AnimationUtils.AnimationMethods; + [key: string]: any; +} | AnimationUtils.AnimationMethods | null, newViewEffect: { + effect: AnimationUtils.AnimationMethods; + [key: string]: any; +} | AnimationUtils.AnimationMethods | null, newViewOnTop: boolean): ModuleElementAnimation; +export function switcher(callback: (param0: SwitcherCallBackParam) => Animations): ModuleElementAnimation; +// tslint:disable-next-line interface-over-type-literal +export type Animations = 'coverStart' | 'coverUp' | 'fade' | 'navChild' | 'navParent' | 'navSiblingEarlier' | 'navSiblingLater' | 'pushEnd' | 'pushStart' | 'revealDown' | 'revealEnd' | 'zoomIn' | + 'zoomOut'; +// tslint:disable-next-line interface-over-type-literal +export type SwitcherCallBackParam = { + node: Element; + valueAccessor: (() => any); + isInitial: boolean; + oldViewModel: any; + newViewModel: any; +}; diff --git a/types/oraclejet/ojnavigationlist/index.d.ts b/types/oraclejet/ojnavigationlist/index.d.ts new file mode 100644 index 0000000000..d18459c5ba --- /dev/null +++ b/types/oraclejet/ojnavigationlist/index.d.ts @@ -0,0 +1,360 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojNavigationList extends baseComponent> { + as: string; + currentItem: K; + data: DataProvider | null; + display: 'all' | 'icons'; + drillMode: 'none' | 'collapsible' | 'sliding'; + edge: 'top' | 'start'; + expanded: KeySet; + hierarchyMenuThreshold: number; + item: { + renderer?: (((context: ojNavigationList.ItemContext) => void) | null); + selectable?: (((context: ojNavigationList.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + rootLabel: string | null; + selection: K; + translations: { + defaultRootLabel?: string; + hierMenuBtnLabel?: string; + previousIcon?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onDrillModeChanged: ((event: JetElementCustomEvent["drillMode"]>) => any) | null; + onEdgeChanged: ((event: JetElementCustomEvent["edge"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHierarchyMenuThresholdChanged: ((event: JetElementCustomEvent["hierarchyMenuThreshold"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onOverflowChanged: ((event: JetElementCustomEvent["overflow"]>) => any) | null; + onRootLabelChanged: ((event: JetElementCustomEvent["rootLabel"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onOjAnimateEnd: ((event: ojNavigationList.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojNavigationList.ojAnimateStart) => any) | null; + onOjBeforeCollapse: ((event: ojNavigationList.ojBeforeCollapse) => any) | null; + onOjBeforeCurrentItem: ((event: ojNavigationList.ojBeforeCurrentItem) => any) | null; + onOjBeforeExpand: ((event: ojNavigationList.ojBeforeExpand) => any) | null; + onOjBeforeSelect: ((event: ojNavigationList.ojBeforeSelect) => any) | null; + onOjCollapse: ((event: ojNavigationList.ojCollapse) => any) | null; + onOjExpand: ((event: ojNavigationList.ojExpand) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojNavigationListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojNavigationList[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojNavigationListSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojNavigationListSettablePropertiesLenient): void; + getContextByNode(node: Element): ojNavigationList.NodeContext | null; + refresh(): void; +} +export namespace ojNavigationList { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCollapse extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: any; + previousItem: Element; + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + componentElement: Element; + datasource?: DataProvider; + index: number; + key: any; + data: any; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + key: K; + group: boolean; + parent?: Element; + }; +} +export interface ojNavigationListEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojNavigationList.ojAnimateEnd; + 'ojAnimateStart': ojNavigationList.ojAnimateStart; + 'ojBeforeCollapse': ojNavigationList.ojBeforeCollapse; + 'ojBeforeCurrentItem': ojNavigationList.ojBeforeCurrentItem; + 'ojBeforeExpand': ojNavigationList.ojBeforeExpand; + 'ojBeforeSelect': ojNavigationList.ojBeforeSelect; + 'ojCollapse': ojNavigationList.ojCollapse; + 'ojExpand': ojNavigationList.ojExpand; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'drillModeChanged': JetElementCustomEvent["drillMode"]>; + 'edgeChanged': JetElementCustomEvent["edge"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'hierarchyMenuThresholdChanged': JetElementCustomEvent["hierarchyMenuThreshold"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'overflowChanged': JetElementCustomEvent["overflow"]>; + 'rootLabelChanged': JetElementCustomEvent["rootLabel"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; +} +export interface ojNavigationListSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: K; + data: DataProvider | null; + display: 'all' | 'icons'; + drillMode: 'none' | 'collapsible' | 'sliding'; + edge: 'top' | 'start'; + expanded: KeySet; + hierarchyMenuThreshold: number; + item: { + renderer?: (((context: ojNavigationList.ItemContext) => void) | null); + selectable?: (((context: ojNavigationList.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + rootLabel: string | null; + selection: K; + translations: { + defaultRootLabel?: string; + hierMenuBtnLabel?: string; + previousIcon?: string; + }; +} +export interface ojNavigationListSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojTabBar extends baseComponent> { + as: string; + currentItem: any; + data: DataProvider | null; + display: 'all' | 'icons'; + edge: 'top' | 'bottom' | 'start' | 'end'; + item: { + renderer?: (((context: ojTabBar.ItemContext) => void) | null); + selectable?: (((context: ojTabBar.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + reorderable: 'enabled' | 'disabled'; + selection: any; + truncation: 'none' | 'progressive'; + translations: { + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderTouchInstructionText?: string; + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + labelRemove?: string; + msgFetchingData?: string; + msgNoData?: string; + overflowItemLabel?: string; + removeCueText?: string; + selectedLabel?: string; + }; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCurrentItemChanged: ((event: JetElementCustomEvent["currentItem"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onEdgeChanged: ((event: JetElementCustomEvent["edge"]>) => any) | null; + onItemChanged: ((event: JetElementCustomEvent["item"]>) => any) | null; + onOverflowChanged: ((event: JetElementCustomEvent["overflow"]>) => any) | null; + onReorderableChanged: ((event: JetElementCustomEvent["reorderable"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onTruncationChanged: ((event: JetElementCustomEvent["truncation"]>) => any) | null; + onOjAnimateEnd: ((event: ojTabBar.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTabBar.ojAnimateStart) => any) | null; + onOjBeforeCurrentItem: ((event: ojTabBar.ojBeforeCurrentItem) => any) | null; + onOjBeforeDeselect: ((event: ojTabBar.ojBeforeDeselect) => any) | null; + onOjBeforeRemove: ((event: ojTabBar.ojBeforeRemove) => any) | null; + onOjBeforeSelect: ((event: ojTabBar.ojBeforeSelect) => any) | null; + onOjDeselect: ((event: ojTabBar.ojDeselect) => any) | null; + onOjRemove: ((event: ojTabBar.ojRemove) => any) | null; + onOjReorder: ((event: ojTabBar.ojReorder) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTabBarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTabBar[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTabBarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTabBarSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTabBar.NodeContext | null; + refresh(): void; +} +export namespace ojTabBar { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCurrentItem extends CustomEvent<{ + previousKey: any; + previousItem: Element; + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojBeforeDeselect extends CustomEvent<{ + fromKey: any; + fromItem: Element; + toKey: any; + toItem: Element; + [propName: string]: any; + }> { + } + interface ojBeforeRemove extends CustomEvent<{ + item: Element; + key: any; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + key: any; + item: Element; + [propName: string]: any; + }> { + } + interface ojDeselect extends CustomEvent<{ + fromKey: any; + fromItem: Element; + toKey: any; + toItem: Element; + [propName: string]: any; + }> { + } + interface ojRemove extends CustomEvent<{ + item: Element; + key: any; + [propName: string]: any; + }> { + } + interface ojReorder extends CustomEvent<{ + item: Element; + position: 'before' | 'after'; + reference: Element; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + componentElement: Element; + datasource?: DataProvider; + index: number; + key: K; + data: D; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + key: K; + }; +} +export interface ojTabBarEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojTabBar.ojAnimateEnd; + 'ojAnimateStart': ojTabBar.ojAnimateStart; + 'ojBeforeCurrentItem': ojTabBar.ojBeforeCurrentItem; + 'ojBeforeDeselect': ojTabBar.ojBeforeDeselect; + 'ojBeforeRemove': ojTabBar.ojBeforeRemove; + 'ojBeforeSelect': ojTabBar.ojBeforeSelect; + 'ojDeselect': ojTabBar.ojDeselect; + 'ojRemove': ojTabBar.ojRemove; + 'ojReorder': ojTabBar.ojReorder; + 'asChanged': JetElementCustomEvent["as"]>; + 'currentItemChanged': JetElementCustomEvent["currentItem"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'edgeChanged': JetElementCustomEvent["edge"]>; + 'itemChanged': JetElementCustomEvent["item"]>; + 'overflowChanged': JetElementCustomEvent["overflow"]>; + 'reorderableChanged': JetElementCustomEvent["reorderable"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'truncationChanged': JetElementCustomEvent["truncation"]>; +} +export interface ojTabBarSettableProperties extends baseComponentSettableProperties { + as: string; + currentItem: any; + data: DataProvider | null; + display: 'all' | 'icons'; + edge: 'top' | 'bottom' | 'start' | 'end'; + item: { + renderer?: (((context: ojTabBar.ItemContext) => void) | null); + selectable?: (((context: ojTabBar.ItemContext) => boolean) | boolean); + }; + overflow: 'popup' | 'hidden'; + reorderable: 'enabled' | 'disabled'; + selection: any; + truncation: 'none' | 'progressive'; + translations: { + accessibleReorderAfterItem?: string; + accessibleReorderBeforeItem?: string; + accessibleReorderTouchInstructionText?: string; + labelCut?: string; + labelPasteAfter?: string; + labelPasteBefore?: string; + labelRemove?: string; + msgFetchingData?: string; + msgNoData?: string; + overflowItemLabel?: string; + removeCueText?: string; + selectedLabel?: string; + }; +} +export interface ojTabBarSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojnbox/index.d.ts b/types/oraclejet/ojnbox/index.d.ts new file mode 100644 index 0000000000..9b7f31cdad --- /dev/null +++ b/types/oraclejet/ojnbox/index.d.ts @@ -0,0 +1,490 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojNBox extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + cellContent: 'counts' | 'auto'; + cellMaximize: 'off' | 'on'; + cells: Promise | null; + columns: Promise | null; + columnsTitle: string; + countLabel: ((context: ojNBox.CountLabelContext) => (string | null)); + data: DataProvider | null; + groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape'; + groupBehavior: 'acrossCells' | 'none' | 'withinCell'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + labelTruncation: 'ifRequired' | 'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: Promise | null; + rowsTitle: string; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + styleDefaults: { + animationDuration: number; + cellDefaults: { + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + maximizedSvgStyle: object; + minimizedSvgStyle: object; + showCount: 'on' | 'off' | 'auto'; + svgStyle: object; + }; + columnLabelStyle: object; + columnsTitleStyle: object; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + color: string; + iconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + indicatorColor: string; + indicatorIconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + labelStyle: object; + secondaryLabelStyle: object; + }; + rowLabelStyle: object; + rowsTitleStyle: object; + }; + tooltip: { + renderer: ((context: ojNBox.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + highlightedCount?: string; + labelAdditionalData?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelGroup?: string; + labelInvalidData?: string; + labelNoData?: string; + labelOther?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onCellContentChanged: ((event: JetElementCustomEvent["cellContent"]>) => any) | null; + onCellMaximizeChanged: ((event: JetElementCustomEvent["cellMaximize"]>) => any) | null; + onCellsChanged: ((event: JetElementCustomEvent["cells"]>) => any) | null; + onColumnsChanged: ((event: JetElementCustomEvent["columns"]>) => any) | null; + onColumnsTitleChanged: ((event: JetElementCustomEvent["columnsTitle"]>) => any) | null; + onCountLabelChanged: ((event: JetElementCustomEvent["countLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onGroupAttributesChanged: ((event: JetElementCustomEvent["groupAttributes"]>) => any) | null; + onGroupBehaviorChanged: ((event: JetElementCustomEvent["groupBehavior"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onLabelTruncationChanged: ((event: JetElementCustomEvent["labelTruncation"]>) => any) | null; + onMaximizedColumnChanged: ((event: JetElementCustomEvent["maximizedColumn"]>) => any) | null; + onMaximizedRowChanged: ((event: JetElementCustomEvent["maximizedRow"]>) => any) | null; + onOtherColorChanged: ((event: JetElementCustomEvent["otherColor"]>) => any) | null; + onOtherThresholdChanged: ((event: JetElementCustomEvent["otherThreshold"]>) => any) | null; + onRowsChanged: ((event: JetElementCustomEvent["rows"]>) => any) | null; + onRowsTitleChanged: ((event: JetElementCustomEvent["rowsTitle"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojNBoxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojNBox[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojNBoxSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojNBoxSettablePropertiesLenient): void; + getCell(rowValue: string, columnValue: string): object | null; + getColumn(columnValue: string): object | null; + getColumnCount(): number; + getColumnsTitle(): string; + getContextByNode(node: Element): object | null; + getDialog(): object | null; + getGroupBehavior(): string; + getGroupNode(groupCategory: string): object | null; + getRow(rowValue: string): object | null; + getRowCount(): number; + getRowsTitle(): string; +} +export interface ojNBoxEventMap extends dvtBaseComponentEventMap> { + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'cellContentChanged': JetElementCustomEvent["cellContent"]>; + 'cellMaximizeChanged': JetElementCustomEvent["cellMaximize"]>; + 'cellsChanged': JetElementCustomEvent["cells"]>; + 'columnsChanged': JetElementCustomEvent["columns"]>; + 'columnsTitleChanged': JetElementCustomEvent["columnsTitle"]>; + 'countLabelChanged': JetElementCustomEvent["countLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'groupAttributesChanged': JetElementCustomEvent["groupAttributes"]>; + 'groupBehaviorChanged': JetElementCustomEvent["groupBehavior"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'labelTruncationChanged': JetElementCustomEvent["labelTruncation"]>; + 'maximizedColumnChanged': JetElementCustomEvent["maximizedColumn"]>; + 'maximizedRowChanged': JetElementCustomEvent["maximizedRow"]>; + 'otherColorChanged': JetElementCustomEvent["otherColor"]>; + 'otherThresholdChanged': JetElementCustomEvent["otherThreshold"]>; + 'rowsChanged': JetElementCustomEvent["rows"]>; + 'rowsTitleChanged': JetElementCustomEvent["rowsTitle"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojNBoxSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + cellContent: 'counts' | 'auto'; + cellMaximize: 'off' | 'on'; + cells: ojNBox.Cell[] | Promise | null; + columns: ojNBox.Column[] | Promise | null; + columnsTitle: string; + countLabel: ((context: ojNBox.CountLabelContext) => (string | null)); + data: DataProvider | null; + groupAttributes: 'color' | 'indicatorColor' | 'indicatorIconColor' | 'indicatorIconPattern' | 'indicatorIconShape'; + groupBehavior: 'acrossCells' | 'none' | 'withinCell'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + labelTruncation: 'ifRequired' | 'on'; + maximizedColumn: string; + maximizedRow: string; + otherColor: string; + otherThreshold: number; + rows: ojNBox.Row[] | Promise | null; + rowsTitle: string; + selection: K[]; + selectionMode: 'none' | 'single' | 'multiple'; + styleDefaults: { + animationDuration: number; + cellDefaults: { + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + maximizedSvgStyle: object; + minimizedSvgStyle: object; + showCount: 'on' | 'off' | 'auto'; + svgStyle: object; + }; + columnLabelStyle: object; + columnsTitleStyle: object; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + color: string; + iconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + indicatorColor: string; + indicatorIconDefaults: { + borderColor: string; + borderRadius: string; + borderWidth: number; + color: string; + height: number; + opacity: number; + pattern: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + shape: 'circle' | 'ellipse' | 'square' | 'plus' | 'diamond' | 'triangleUp' | 'triangleDown' | 'human' | 'rectangle' | 'star'; + source: string; + width: number; + }; + labelStyle: object; + secondaryLabelStyle: object; + }; + rowLabelStyle: object; + rowsTitleStyle: object; + }; + tooltip: { + renderer: ((context: ojNBox.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + highlightedCount?: string; + labelAdditionalData?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelGroup?: string; + labelInvalidData?: string; + labelNoData?: string; + labelOther?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojNBoxSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojNBox { + // tslint:disable-next-line interface-over-type-literal + type Cell = { + label?: string; + column: string; + labelHalign?: string; + labelStyle?: object; + svgClassName?: string; + svgStyle?: object; + maximizedSvgStyle?: object; + maximizedSvgClassName?: string; + minimizedSvgStyle?: object; + minimizedSvgClassName?: string; + row: string; + showCount?: 'on' | 'off' | 'auto' | string; + shortDesc?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type Column = { + id: string; + label?: string; + labelStyle?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type CountLabelContext = { + row: string; + column: string; + nodeCount: number; + totalNodeCount: number; + highlightedNodeCount: number; + }; + // tslint:disable-next-line interface-over-type-literal + type Row = { + id: string; + label?: string; + labelStyle?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + secondaryLabel: string; + row: string; + column: string; + color: string; + indicatorColor: string; + componentElement: Element; + }; +} +export interface ojNBoxNode extends JetElement { + borderColor: string; + borderWidth: number; + categories: string[]; + color?: string; + column: string; + groupCategory?: string; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + svgClassName: string; + svgStyle?: object; + width?: number | null; + }; + indicatorColor?: string; + indicatorIcon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string | null; + svgClassName: string; + svgStyle?: object | null; + width?: number | null; + }; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object | null; + xPercentage?: number | null; + yPercentage?: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColumnChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupCategoryChanged: ((event: JetElementCustomEvent) => any) | null; + onIconChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorColorChanged: ((event: JetElementCustomEvent) => any) | null; + onIndicatorIconChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onRowChanged: ((event: JetElementCustomEvent) => any) | null; + onSecondaryLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onXPercentageChanged: ((event: JetElementCustomEvent) => any) | null; + onYPercentageChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojNBoxNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojNBoxNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojNBoxNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojNBoxNodeSettablePropertiesLenient): void; +} +export interface ojNBoxNodeEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'columnChanged': JetElementCustomEvent; + 'groupCategoryChanged': JetElementCustomEvent; + 'iconChanged': JetElementCustomEvent; + 'indicatorColorChanged': JetElementCustomEvent; + 'indicatorIconChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'rowChanged': JetElementCustomEvent; + 'secondaryLabelChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'xPercentageChanged': JetElementCustomEvent; + 'yPercentageChanged': JetElementCustomEvent; +} +export interface ojNBoxNodeSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: string[]; + color?: string; + column: string; + groupCategory?: string; + icon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'mallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string; + svgClassName: string; + svgStyle?: object; + width?: number | null; + }; + indicatorColor?: string; + indicatorIcon?: { + borderColor?: string; + borderRadius?: string; + borderWidth: number; + color?: string; + height?: number | null; + opacity: number; + pattern?: 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none' | 'smallChecker' | 'smallCrosshatch' | + 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + source?: string | null; + svgClassName: string; + svgStyle?: object | null; + width?: number | null; + }; + label: string; + row: string; + secondaryLabel: string; + shortDesc: string; + svgClassName: string; + svgStyle: object | null; + xPercentage?: number | null; + yPercentage?: number | null; +} +export interface ojNBoxNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojoptgroup/index.d.ts b/types/oraclejet/ojoptgroup/index.d.ts new file mode 100644 index 0000000000..af7d72e004 --- /dev/null +++ b/types/oraclejet/ojoptgroup/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojOptgroup extends JetElement { + disabled: boolean; + label: string; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptgroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojOptgroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojOptgroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojOptgroupSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojOptgroupEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; +} +export interface ojOptgroupSettableProperties extends JetSettableProperties { + disabled: boolean; + label: string; +} +export interface ojOptgroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojoption/index.d.ts b/types/oraclejet/ojoption/index.d.ts new file mode 100644 index 0000000000..f969e1e320 --- /dev/null +++ b/types/oraclejet/ojoption/index.d.ts @@ -0,0 +1,26 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojOption extends JetElement { + disabled: boolean; + value: any; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojOptionEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojOption[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojOptionSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojOptionSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojOptionEventMap extends HTMLElementEventMap { + 'disabledChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojOptionSettableProperties extends JetSettableProperties { + disabled: boolean; + value: any; +} +export interface ojOptionSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojpictochart/index.d.ts b/types/oraclejet/ojpictochart/index.d.ts new file mode 100644 index 0000000000..caf85f6dee --- /dev/null +++ b/types/oraclejet/ojpictochart/index.d.ts @@ -0,0 +1,268 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojPictoChart extends dvtBaseComponent> { + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'popIn' | 'alphaFade' | 'zoom' | 'none'; + as: string; + columnCount: number | null; + columnWidth: number | null; + data: DataProvider | null; + drilling: 'on' | 'off'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + layout: 'vertical' | 'horizontal'; + layoutOrigin: 'topEnd' | 'bottomStart' | 'bottomEnd' | 'topStart'; + rowCount: number | null; + rowHeight: number | null; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + tooltip: { + renderer: ((context: ojPictoChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColumnCountChanged: ((event: JetElementCustomEvent["columnCount"]>) => any) | null; + onColumnWidthChanged: ((event: JetElementCustomEvent["columnWidth"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onLayoutOriginChanged: ((event: JetElementCustomEvent["layoutOrigin"]>) => any) | null; + onRowCountChanged: ((event: JetElementCustomEvent["rowCount"]>) => any) | null; + onRowHeightChanged: ((event: JetElementCustomEvent["rowHeight"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onOjDrill: ((event: ojPictoChart.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojPictoChartEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojPictoChart[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojPictoChartSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojPictoChartSettablePropertiesLenient): void; + getContextByNode(node: Element): ojPictoChart.NodeContext | null; + getItem(index: number): ojPictoChart.ItemContext | null; + getItemCount(): number; +} +export namespace ojPictoChart { + interface ojDrill extends CustomEvent<{ + id: any; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + color: string; + count: number; + id: K; + name: string; + selected: boolean; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + name: string; + count: number; + color: string; + componentElement: Element; + }; +} +export interface ojPictoChartEventMap extends dvtBaseComponentEventMap> { + 'ojDrill': ojPictoChart.ojDrill; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'columnCountChanged': JetElementCustomEvent["columnCount"]>; + 'columnWidthChanged': JetElementCustomEvent["columnWidth"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'layoutOriginChanged': JetElementCustomEvent["layoutOrigin"]>; + 'rowCountChanged': JetElementCustomEvent["rowCount"]>; + 'rowHeightChanged': JetElementCustomEvent["rowHeight"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; +} +export interface ojPictoChartSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration?: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'popIn' | 'alphaFade' | 'zoom' | 'none'; + as: string; + columnCount: number | null; + columnWidth: number | null; + data: DataProvider | null; + drilling: 'on' | 'off'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + layout: 'vertical' | 'horizontal'; + layoutOrigin: 'topEnd' | 'bottomStart' | 'bottomEnd' | 'topStart'; + rowCount: number | null; + rowHeight: number | null; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + tooltip: { + renderer: ((context: ojPictoChart.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })) | null; + }; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojPictoChartSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojPictoChartItem extends JetElement { + borderColor: string; + borderWidth: number; + categories: string[]; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit' | 'off' | 'on'; + name: string; + rowSpan: number; + shape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'none' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onColumnSpanChanged: ((event: JetElementCustomEvent) => any) | null; + onCountChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onNameChanged: ((event: JetElementCustomEvent) => any) | null; + onRowSpanChanged: ((event: JetElementCustomEvent) => any) | null; + onShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPictoChartItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojPictoChartItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojPictoChartItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojPictoChartItemSettablePropertiesLenient): void; +} +export interface ojPictoChartItemEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'columnSpanChanged': JetElementCustomEvent; + 'countChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'nameChanged': JetElementCustomEvent; + 'rowSpanChanged': JetElementCustomEvent; + 'shapeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; +} +export interface ojPictoChartItemSettableProperties extends JetSettableProperties { + borderColor: string; + borderWidth: number; + categories: string[]; + color: string; + columnSpan: number; + count: number; + drilling: 'inherit' | 'off' | 'on'; + name: string; + rowSpan: number; + shape?: 'circle' | 'diamond' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | 'none' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; +} +export interface ojPictoChartItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojpopup/index.d.ts b/types/oraclejet/ojpopup/index.d.ts new file mode 100644 index 0000000000..9ade7e2c21 --- /dev/null +++ b/types/oraclejet/ojpopup/index.d.ts @@ -0,0 +1,128 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojPopup extends baseComponent { + autoDismiss: 'none' | 'focusLoss'; + chrome: 'default' | 'none'; + initialFocus: 'auto' | 'none' | 'firstFocusable' | 'popup'; + modality: 'modeless' | 'modal'; + position: ojPopup.Position; + tail: 'none' | 'simple'; + translations: { + ariaCloseSkipLink?: string; + ariaFocusSkipLink?: string; + ariaLiveRegionInitialFocusFirstFocusable?: string; + ariaLiveRegionInitialFocusFirstFocusableTouch?: string; + ariaLiveRegionInitialFocusNone?: string; + ariaLiveRegionInitialFocusNoneTouch?: string; + }; + onAutoDismissChanged: ((event: JetElementCustomEvent) => any) | null; + onChromeChanged: ((event: JetElementCustomEvent) => any) | null; + onInitialFocusChanged: ((event: JetElementCustomEvent) => any) | null; + onModalityChanged: ((event: JetElementCustomEvent) => any) | null; + onPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onTailChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojPopup.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojPopup.ojAnimateStart) => any) | null; + onOjBeforeClose: ((event: ojPopup.ojBeforeClose) => any) | null; + onOjBeforeOpen: ((event: ojPopup.ojBeforeOpen) => any) | null; + onOjClose: ((event: ojPopup.ojClose) => any) | null; + onOjFocus: ((event: ojPopup.ojFocus) => any) | null; + onOjOpen: ((event: ojPopup.ojOpen) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojPopupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojPopup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojPopupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojPopupSettablePropertiesLenient): void; + close(): void; + isOpen(): boolean; + open(launcher: string | Element, position?: ojPopup.Position): void; + refresh(): void; +} +export namespace ojPopup { + interface ojAnimateEnd extends CustomEvent<{ + element: Element; + action: 'open' | 'close'; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'open' | 'close'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeClose extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojBeforeOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojClose extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojFocus extends CustomEvent<{ + [propName: string]: any; + }> { + } + interface ojOpen extends CustomEvent<{ + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Position = { + my?: PositionAlign; + at?: PositionAlign; + offset?: PositionPoint; + of?: string | PositionPoint; + collision?: 'flip' | 'fit' | 'flipfit' | 'flipcenter' | 'none'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionAlign = { + vertical?: 'top' | 'bottom' | 'center'; + horizontal?: 'start' | 'end' | 'left' | 'center' | 'bottom'; + }; + // tslint:disable-next-line interface-over-type-literal + type PositionPoint = { + x?: number; + y?: number; + }; +} +export interface ojPopupEventMap extends baseComponentEventMap { + 'ojAnimateEnd': ojPopup.ojAnimateEnd; + 'ojAnimateStart': ojPopup.ojAnimateStart; + 'ojBeforeClose': ojPopup.ojBeforeClose; + 'ojBeforeOpen': ojPopup.ojBeforeOpen; + 'ojClose': ojPopup.ojClose; + 'ojFocus': ojPopup.ojFocus; + 'ojOpen': ojPopup.ojOpen; + 'autoDismissChanged': JetElementCustomEvent; + 'chromeChanged': JetElementCustomEvent; + 'initialFocusChanged': JetElementCustomEvent; + 'modalityChanged': JetElementCustomEvent; + 'positionChanged': JetElementCustomEvent; + 'tailChanged': JetElementCustomEvent; +} +export interface ojPopupSettableProperties extends baseComponentSettableProperties { + autoDismiss: 'none' | 'focusLoss'; + chrome: 'default' | 'none'; + initialFocus: 'auto' | 'none' | 'firstFocusable' | 'popup'; + modality: 'modeless' | 'modal'; + position: ojPopup.Position; + tail: 'none' | 'simple'; + translations: { + ariaCloseSkipLink?: string; + ariaFocusSkipLink?: string; + ariaLiveRegionInitialFocusFirstFocusable?: string; + ariaLiveRegionInitialFocusFirstFocusableTouch?: string; + ariaLiveRegionInitialFocusNone?: string; + ariaLiveRegionInitialFocusNoneTouch?: string; + }; +} +export interface ojPopupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojprogress/index.d.ts b/types/oraclejet/ojprogress/index.d.ts new file mode 100644 index 0000000000..779031816c --- /dev/null +++ b/types/oraclejet/ojprogress/index.d.ts @@ -0,0 +1,35 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojProgress extends baseComponent { + max: number; + type: 'bar' | 'circle'; + value: number; + translations: { + ariaIndeterminateProgressText?: string; + }; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojProgress[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojProgressSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojProgressSettablePropertiesLenient): void; +} +export interface ojProgressEventMap extends baseComponentEventMap { + 'maxChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojProgressSettableProperties extends baseComponentSettableProperties { + max: number; + type: 'bar' | 'circle'; + value: number; + translations: { + ariaIndeterminateProgressText?: string; + }; +} +export interface ojProgressSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojprogresslist/index.d.ts b/types/oraclejet/ojprogresslist/index.d.ts new file mode 100644 index 0000000000..22e91c465d --- /dev/null +++ b/types/oraclejet/ojprogresslist/index.d.ts @@ -0,0 +1,30 @@ +import { DataProvider } from '../ojdataprovider'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojProgressList extends JetElement { + data: DataProvider | null; + onDataChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojProgressListEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojProgressList[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojProgressListSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojProgressListSettablePropertiesLenient): void; +} +export interface ojProgressListEventMap extends HTMLElementEventMap { + 'dataChanged': JetElementCustomEvent; +} +export interface ojProgressListSettableProperties extends JetSettableProperties { + data: DataProvider | null; +} +export interface ojProgressListSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ProgressItem { + addEventListener(eventType: ProgressItem.EventType, listener: EventListener): void; + removeEventListener(eventType: ProgressItem.EventType, listener: EventListener): void; +} +export namespace ProgressItem { + type EventType = "loadstart" | "progress" | "abort" | "error" | "load" | "timeout" | "loadend"; + type Status = "queued" | "loadstarted" | "aborted" | "errored" | "timedout" | "loaded"; +} diff --git a/types/oraclejet/ojpulltorefresh/index.d.ts b/types/oraclejet/ojpulltorefresh/index.d.ts new file mode 100644 index 0000000000..86db5b3db1 --- /dev/null +++ b/types/oraclejet/ojpulltorefresh/index.d.ts @@ -0,0 +1,6 @@ +export function setupPullToRefresh(element: Element, refreshFunc: (() => Promise), options?: { + threshold?: number; + primaryText?: string; + secondaryText?: string; +}): void; +export function tearDownPullToRefresh(element: Element): void; diff --git a/types/oraclejet/ojradioset/index.d.ts b/types/oraclejet/ojradioset/index.d.ts new file mode 100644 index 0000000000..4b910c22fd --- /dev/null +++ b/types/oraclejet/ojradioset/index.d.ts @@ -0,0 +1,69 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojRadioset extends editableValue { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelledByChanged: ((event: JetElementCustomEvent) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojRadioset.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojRadioset.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRadiosetEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRadioset[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRadiosetSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRadiosetSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojRadioset { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojRadiosetEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojRadioset.ojAnimateEnd; + 'ojAnimateStart': ojRadioset.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'labelledByChanged': JetElementCustomEvent; + 'requiredChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojRadiosetSettableProperties extends editableValueSettableProperties { + disabled: boolean; + labelledBy: string | null; + required: boolean; + value: any; + translations: { + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojRadiosetSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojrefresher/index.d.ts b/types/oraclejet/ojrefresher/index.d.ts new file mode 100644 index 0000000000..a80f9cc805 --- /dev/null +++ b/types/oraclejet/ojrefresher/index.d.ts @@ -0,0 +1,33 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojRefresher extends baseComponent { + refreshContent: (() => Promise); + target: Element; + text: string; + threshold: number; + onRefreshContentChanged: ((event: JetElementCustomEvent) => any) | null; + onTargetChanged: ((event: JetElementCustomEvent) => any) | null; + onTextChanged: ((event: JetElementCustomEvent) => any) | null; + onThresholdChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojRefresherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojRefresher[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojRefresherSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojRefresherSettablePropertiesLenient): void; +} +export interface ojRefresherEventMap extends baseComponentEventMap { + 'refreshContentChanged': JetElementCustomEvent; + 'targetChanged': JetElementCustomEvent; + 'textChanged': JetElementCustomEvent; + 'thresholdChanged': JetElementCustomEvent; +} +export interface ojRefresherSettableProperties extends baseComponentSettableProperties { + refreshContent: (() => Promise); + target: Element; + text: string; + threshold: number; +} +export interface ojRefresherSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojresponsiveknockoututils/index.d.ts b/types/oraclejet/ojresponsiveknockoututils/index.d.ts new file mode 100644 index 0000000000..6969cc607c --- /dev/null +++ b/types/oraclejet/ojresponsiveknockoututils/index.d.ts @@ -0,0 +1,4 @@ +/// +/// +export function createMediaQueryObservable(queryString: string): KnockoutObservable; +export function createScreenRangeObservable(): KnockoutObservable; diff --git a/types/oraclejet/ojresponsiveutils/index.d.ts b/types/oraclejet/ojresponsiveutils/index.d.ts new file mode 100644 index 0000000000..3fa2d5dab5 --- /dev/null +++ b/types/oraclejet/ojresponsiveutils/index.d.ts @@ -0,0 +1,4 @@ +export function compare(size1: SCREEN_RANGE, size2: SCREEN_RANGE): number; +export function getFrameworkQuery(frameworkQueryKey: FRAMEWORK_QUERY_KEY): string | null; +export type FRAMEWORK_QUERY_KEY = "sm-up" | "md-up" | "lg-up" | "xl-up" | "xxl-up" | "sm-only" | "md-only" | "lg-only" | "xl-only" | "md-down" | "lg-down" | "xl-down" | "high-resolution"; +export type SCREEN_RANGE = "sm" | "md" | "lg" | "xl" | "xxl"; diff --git a/types/oraclejet/ojrouter/index.d.ts b/types/oraclejet/ojrouter/index.d.ts new file mode 100644 index 0000000000..afe93fb476 --- /dev/null +++ b/types/oraclejet/ojrouter/index.d.ts @@ -0,0 +1,131 @@ +/// +/// +declare class Router { + readonly currentState: (() => RouterState | undefined); + readonly currentValue: (() => string | undefined); + defaultStateId: string | undefined; + static defaults: { + urlAdapter?: Router.urlPathAdapter | Router.urlParamAdapter; + baseUrl?: string; + rootInstanceName?: string; + }; + readonly direction: string | undefined; + readonly moduleConfig: { + name: KnockoutObservable; + params: { + ojRouter: { + parentRouter: Router; + direction: string; + }; + }; + lifecycleListener: { + attached: ((param0: string) => void); + }; + }; + readonly name: string; + readonly observableModuleConfig: KnockoutObservable; + readonly parent: Router | undefined; + static readonly rootInstance: Router; + readonly stateId: ((param0?: string) => string); + readonly states: RouterState[] | null; + static readonly transitionedToState: object; + static sync(): Promise<{ + hasChanged: boolean; + }>; + configure(option: { + [key: string]: RouterState.ConfigOptions; + } | ((id: string) => RouterState | undefined | null)): any; + createChildRouter(name: string, parentStateId?: string): Router; + dispose(): undefined; + getChildRouter(name: string): Router | undefined; + getCurrentChildRouter(): Router | undefined; + getState(stateId: string): RouterState | undefined; + go(stateIdPath?: string | string[], options?: { + historyUpdate: string; + }): Promise<{ + hasChanged: boolean; + }>; + retrieve(): any; + store(data: object): undefined; +} +declare namespace Router { + // tslint:disable-next-line interface-over-type-literal + type ModuleConfigType = { + name: KnockoutObservable; + params: { + ojRouter: { + parentRouter: Router; + direction: string; + parameters: object; + }; + }; + lifecycleListener: { + attached: ((param0: object) => void); + }; + }; + // tslint:disable-next-line no-unnecessary-class + class urlParamAdapter { + constructor(); + } + // tslint:disable-next-line no-unnecessary-class + class urlPathAdapter { + constructor(); + } + interface RouterState { + canEnter: (() => boolean) | (() => Promise); + canExit: (() => boolean) | (() => Promise); + enter: (() => void) | (() => Promise); + exit: (() => void) | (() => Promise); + readonly id: string; + label: string | undefined; + parameters: object; + title: string | (() => string | undefined); + value: any; + // constructor(id: string, options?: RouterState.ConfigOptions, router?: Router); + go(): Promise<{ + hasChanged: boolean; + }>; + isCurrent(): boolean; + } + namespace RouterState { + // tslint:disable-next-line interface-over-type-literal + type ConfigOptions = { + label?: string; + value?: any; + isDefault?: boolean; + canEnter?: (() => boolean) | (() => Promise); + enter?: (() => void) | (() => Promise); + canExit?: (() => boolean) | (() => Promise); + exit?: (() => void) | (() => Promise); + }; + } +} +export = Router; +declare class RouterState { + canEnter: (() => boolean) | (() => Promise); + canExit: (() => boolean) | (() => Promise); + enter: (() => void) | (() => Promise); + exit: (() => void) | (() => Promise); + readonly id: string; + label: string | undefined; + parameters: object; + title: string | (() => string | undefined); + value: any; + constructor(id: string, options?: RouterState.ConfigOptions, router?: Router); + go(): Promise<{ + hasChanged: boolean; + }>; + isCurrent(): boolean; +} +declare namespace RouterState { + // tslint:disable-next-line interface-over-type-literal + type ConfigOptions = { + label?: string; + value?: any; + isDefault?: boolean; + canEnter?: (() => boolean) | (() => Promise); + enter?: (() => void) | (() => Promise); + canExit?: (() => boolean) | (() => Promise); + exit?: (() => void) | (() => Promise); + }; +} diff --git a/types/oraclejet/ojselectcombobox/index.d.ts b/types/oraclejet/ojselectcombobox/index.d.ts new file mode 100644 index 0000000000..2444c99c4c --- /dev/null +++ b/types/oraclejet/ojselectcombobox/index.d.ts @@ -0,0 +1,714 @@ +import { Converter, Validator, Validation, AsyncValidator } from '../ojvalidation-base'; +import { DataProvider } from '../ojdataprovider'; +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojCombobox, SV = V, RV = V> extends editableValue { + onOjAnimateEnd: ((event: ojCombobox.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojCombobox.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojCombobox[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojCombobox { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Optgroup = { + disabled?: boolean; + label: string; + children: Array<(Option | Optgroup)>; + }; + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + parent: Element; + index: number; + depth: number; + leaf: boolean; + data: object; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + children?: string; + childKeys?: OptionsKeys; + }; +} +export interface ojComboboxEventMap, SV = V, RV = V> extends editableValueEventMap { + 'ojAnimateEnd': ojCombobox.ojAnimateEnd; + 'ojAnimateStart': ojCombobox.ojAnimateStart; +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojComboboxSettableProperties extends editableValueSettableProperties { +} +export interface ojComboboxSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojComboboxMany extends ojCombobox, any[] | null, string> { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onMinLengthChanged: ((event: JetElementCustomEvent["minLength"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionsChanged: ((event: JetElementCustomEvent["valueOptions"]>) => any) | null; + onOjAnimateEnd: ((event: ojComboboxMany.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojComboboxMany.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojComboboxMany[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxManySettablePropertiesLenient): void; +} +export namespace ojComboboxMany { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojComboboxManyEventMap extends ojComboboxEventMap, any[] | null, string> { + 'ojAnimateEnd': ojComboboxMany.ojAnimateEnd; + 'ojAnimateStart': ojComboboxMany.ojAnimateStart; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'minLengthChanged': JetElementCustomEvent["minLength"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionsChanged': JetElementCustomEvent["valueOptions"]>; +} +export interface ojComboboxManySettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojComboboxManySettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojComboboxOne extends ojCombobox, any, string> { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + filterOnOpen: 'none' | 'rawValue'; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; + onAsyncValidatorsChanged: ((event: JetElementCustomEvent["asyncValidators"]>) => any) | null; + onConverterChanged: ((event: JetElementCustomEvent["converter"]>) => any) | null; + onFilterOnOpenChanged: ((event: JetElementCustomEvent["filterOnOpen"]>) => any) | null; + onMinLengthChanged: ((event: JetElementCustomEvent["minLength"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRawValueChanged: ((event: JetElementCustomEvent["rawValue"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValidatorsChanged: ((event: JetElementCustomEvent["validators"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionChanged: ((event: JetElementCustomEvent["valueOption"]>) => any) | null; + onOjAnimateEnd: ((event: ojComboboxOne.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojComboboxOne.ojAnimateStart) => any) | null; + onOjValueUpdated: ((event: ojComboboxOne.ojValueUpdated) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojComboboxOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojComboboxOne[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojComboboxOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojComboboxOneSettablePropertiesLenient): void; +} +export namespace ojComboboxOne { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojValueUpdated extends CustomEvent<{ + value: any; + previousValue: any; + [propName: string]: any; + }> { + } +} +export interface ojComboboxOneEventMap extends ojComboboxEventMap, any, string> { + 'ojAnimateEnd': ojComboboxOne.ojAnimateEnd; + 'ojAnimateStart': ojComboboxOne.ojAnimateStart; + 'ojValueUpdated': ojComboboxOne.ojValueUpdated; + 'asyncValidatorsChanged': JetElementCustomEvent["asyncValidators"]>; + 'converterChanged': JetElementCustomEvent["converter"]>; + 'filterOnOpenChanged': JetElementCustomEvent["filterOnOpen"]>; + 'minLengthChanged': JetElementCustomEvent["minLength"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'rawValueChanged': JetElementCustomEvent["rawValue"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'validatorsChanged': JetElementCustomEvent["validators"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionChanged': JetElementCustomEvent["valueOption"]>; +} +export interface ojComboboxOneSettableProperties extends ojComboboxSettableProperties { + asyncValidators: Array>; + converter: Converter | Validation.RegisteredConverter | null; + filterOnOpen: 'none' | 'rawValue'; + minLength: number; + optionRenderer?: ((param0: ojCombobox.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys: { + label?: string; + value?: string; + children?: string; + childKeys?: ojCombobox.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + readonly rawValue: string | null; + required: boolean; + validators: Array | Validation.RegisteredValidator> | null; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + noMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + }; +} +export interface ojComboboxOneSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelect, SV = V> extends editableValue { + onOjAnimateEnd: ((event: ojSelect.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelect.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelect[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectSettablePropertiesLenient): void; + refresh(): void; + validate(): Promise; +} +export namespace ojSelect { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Optgroup = { + disabled?: boolean; + label: string; + children: Array<(Option | Optgroup)>; + }; + // tslint:disable-next-line interface-over-type-literal + type Option = { + disabled?: boolean; + label?: string; + value: any; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionContext = { + component: Element; + parent: Element; + index: number; + depth: number; + leaf: boolean; + data: object; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type OptionsKeys = { + label?: string; + value?: string; + children?: string; + childKeys?: OptionsKeys; + }; +} +export interface ojSelectEventMap, SV = V> extends editableValueEventMap { + 'ojAnimateEnd': ojSelect.ojAnimateEnd; + 'ojAnimateStart': ojSelect.ojAnimateStart; +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface ojSelectSettableProperties extends editableValueSettableProperties { +} +export interface ojSelectSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelectMany extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; + onMinimumResultsForSearchChanged: ((event: JetElementCustomEvent["minimumResultsForSearch"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionsChanged: ((event: JetElementCustomEvent["valueOptions"]>) => any) | null; + onOjAnimateEnd: ((event: ojSelectMany.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelectMany.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectManyEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelectMany[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectManySettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectManySettablePropertiesLenient): void; +} +export namespace ojSelectMany { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSelectManyEventMap extends ojSelectEventMap> { + 'ojAnimateEnd': ojSelectMany.ojAnimateEnd; + 'ojAnimateStart': ojSelectMany.ojAnimateStart; + 'minimumResultsForSearchChanged': JetElementCustomEvent["minimumResultsForSearch"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionsChanged': JetElementCustomEvent["valueOptions"]>; +} +export interface ojSelectManySettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any[] | null; + valueOptions: Array<{ + value: any; + label?: string; + }> | null; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; +} +export interface ojSelectManySettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSelectOne extends ojSelect> { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; + onMinimumResultsForSearchChanged: ((event: JetElementCustomEvent["minimumResultsForSearch"]>) => any) | null; + onOptionRendererChanged: ((event: JetElementCustomEvent["optionRenderer"]>) => any) | null; + onOptionsChanged: ((event: JetElementCustomEvent["options"]>) => any) | null; + onOptionsKeysChanged: ((event: JetElementCustomEvent["optionsKeys"]>) => any) | null; + onPickerAttributesChanged: ((event: JetElementCustomEvent["pickerAttributes"]>) => any) | null; + onPlaceholderChanged: ((event: JetElementCustomEvent["placeholder"]>) => any) | null; + onRenderModeChanged: ((event: JetElementCustomEvent["renderMode"]>) => any) | null; + onRequiredChanged: ((event: JetElementCustomEvent["required"]>) => any) | null; + onValueChanged: ((event: JetElementCustomEvent["value"]>) => any) | null; + onValueOptionChanged: ((event: JetElementCustomEvent["valueOption"]>) => any) | null; + onOjAnimateEnd: ((event: ojSelectOne.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSelectOne.ojAnimateStart) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSelectOneEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSelectOne[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSelectOneSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSelectOneSettablePropertiesLenient): void; +} +export namespace ojSelectOne { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSelectOneEventMap extends ojSelectEventMap> { + 'ojAnimateEnd': ojSelectOne.ojAnimateEnd; + 'ojAnimateStart': ojSelectOne.ojAnimateStart; + 'minimumResultsForSearchChanged': JetElementCustomEvent["minimumResultsForSearch"]>; + 'optionRendererChanged': JetElementCustomEvent["optionRenderer"]>; + 'optionsChanged': JetElementCustomEvent["options"]>; + 'optionsKeysChanged': JetElementCustomEvent["optionsKeys"]>; + 'pickerAttributesChanged': JetElementCustomEvent["pickerAttributes"]>; + 'placeholderChanged': JetElementCustomEvent["placeholder"]>; + 'renderModeChanged': JetElementCustomEvent["renderMode"]>; + 'requiredChanged': JetElementCustomEvent["required"]>; + 'valueChanged': JetElementCustomEvent["value"]>; + 'valueOptionChanged': JetElementCustomEvent["valueOption"]>; +} +export interface ojSelectOneSettableProperties extends ojSelectSettableProperties { + minimumResultsForSearch: number; + optionRenderer?: ((param0: ojSelect.OptionContext) => { + insert: Element; + } | undefined) | null; + options: Array | DataProvider | null; + optionsKeys: { + childKeys?: { + label?: string; + value?: string; + children?: string; + childKeys?: ojSelect.OptionsKeys; + }; + children?: string; + label?: string; + value?: string; + }; + pickerAttributes: { + style?: string; + class?: string; + }; + placeholder: string | null; + renderMode: 'jet' | 'native'; + required: boolean; + value: any; + valueOption: { + value: any; + label?: string; + }; + translations: { + filterFurther?: string; + moreMatchesFound?: string; + noMatchesFound?: string; + oneMatchesFound?: string; + required?: { + hint?: string; + messageDetail?: string; + messageSummary?: string; + }; + searchField?: string; + }; +} +export interface ojSelectOneSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface Optgroup { + children: Array<(Option | Optgroup)>; + disabled?: boolean; + label: string; +} +export interface Option { + disabled?: boolean; + label?: string; + value: object; +} diff --git a/types/oraclejet/ojslider/index.d.ts b/types/oraclejet/ojslider/index.d.ts new file mode 100644 index 0000000000..37d98b11f4 --- /dev/null +++ b/types/oraclejet/ojslider/index.d.ts @@ -0,0 +1,83 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSlider extends editableValue { + disabled: boolean; + max: number | null; + min: number | null; + orientation: 'horizontal' | 'vertical'; + step: number | null; + readonly transientValue: number; + type: 'fromMin' | 'fromMax' | 'single'; + value: number | null; + translations: { + invalidStep?: string; + maxMin?: string; + noValue?: string; + optionNum?: string; + valueRange?: string; + }; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onMaxChanged: ((event: JetElementCustomEvent) => any) | null; + onMinChanged: ((event: JetElementCustomEvent) => any) | null; + onOrientationChanged: ((event: JetElementCustomEvent) => any) | null; + onStepChanged: ((event: JetElementCustomEvent) => any) | null; + onTransientValueChanged: ((event: JetElementCustomEvent) => any) | null; + onTypeChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojSlider.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSlider.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSliderEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSlider[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSliderSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSliderSettablePropertiesLenient): void; +} +export namespace ojSlider { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSliderEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojSlider.ojAnimateEnd; + 'ojAnimateStart': ojSlider.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'maxChanged': JetElementCustomEvent; + 'minChanged': JetElementCustomEvent; + 'orientationChanged': JetElementCustomEvent; + 'stepChanged': JetElementCustomEvent; + 'transientValueChanged': JetElementCustomEvent; + 'typeChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSliderSettableProperties extends editableValueSettableProperties { + disabled: boolean; + max: number | null; + min: number | null; + orientation: 'horizontal' | 'vertical'; + step: number | null; + readonly transientValue: number; + type: 'fromMin' | 'fromMax' | 'single'; + value: number | null; + translations: { + invalidStep?: string; + maxMin?: string; + noValue?: string; + optionNum?: string; + valueRange?: string; + }; +} +export interface ojSliderSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojsunburst/index.d.ts b/types/oraclejet/ojsunburst/index.d.ts new file mode 100644 index 0000000000..ebe8b4968e --- /dev/null +++ b/types/oraclejet/ojsunburst/index.d.ts @@ -0,0 +1,407 @@ +import { KeySet } from '../ojkeyset'; +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSunburst extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + expanded: KeySet; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + hoverColor: string; + labelDisplay: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign: 'inner' | 'outer' | 'center'; + labelMinLength: number; + labelStyle: object; + selectedInnerColor: string; + selectedOuterColor: string; + showDisclosure: 'on' | 'off'; + }; + rootNode: any; + rootNodeContent: { + renderer: ((context: ojSunburst.RootNodeContext) => ({ + insert: Element | string; + })); + }; + rotation: 'off' | 'on'; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + startAngle: number; + tooltip: { + renderer: ((context: ojSunburst.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipCollapse?: string; + tooltipExpand?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAnimationUpdateColorChanged: ((event: JetElementCustomEvent["animationUpdateColor"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColorLabelChanged: ((event: JetElementCustomEvent["colorLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayLevelsChanged: ((event: JetElementCustomEvent["displayLevels"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onExpandedChanged: ((event: JetElementCustomEvent["expanded"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onNodeDefaultsChanged: ((event: JetElementCustomEvent["nodeDefaults"]>) => any) | null; + onRootNodeChanged: ((event: JetElementCustomEvent["rootNode"]>) => any) | null; + onRootNodeContentChanged: ((event: JetElementCustomEvent["rootNodeContent"]>) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent["rotation"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSizeLabelChanged: ((event: JetElementCustomEvent["sizeLabel"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onStartAngleChanged: ((event: JetElementCustomEvent["startAngle"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onOjBeforeCollapse: ((event: ojSunburst.ojBeforeCollapse) => any) | null; + onOjBeforeDrill: ((event: ojSunburst.ojBeforeDrill) => any) | null; + onOjBeforeExpand: ((event: ojSunburst.ojBeforeExpand) => any) | null; + onOjCollapse: ((event: ojSunburst.ojCollapse) => any) | null; + onOjDrill: ((event: ojSunburst.ojDrill) => any) | null; + onOjExpand: ((event: ojSunburst.ojExpand) => any) | null; + onOjRotateInput: ((event: ojSunburst.ojRotateInput) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojSunburstEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojSunburst[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojSunburstSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojSunburstSettablePropertiesLenient): void; + getContextByNode(node: Element): ojSunburst.NodeContext | null; + getNode(subIdPath: any[]): ojSunburst.DataContext | null; +} +export namespace ojSunburst { + interface ojBeforeCollapse extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojBeforeDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojBeforeExpand extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojCollapse extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojExpand extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojRotateInput extends CustomEvent<{ + value: number; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + size: number; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + indexPath: number[]; + }; + // tslint:disable-next-line interface-over-type-literal + type RootNodeContext = { + outerBounds: { + x: number; + y: number; + width: number; + height: number; + }; + innerBounds: { + x: number; + y: number; + width: number; + height: number; + }; + id: K; + data: object; + itemData: D; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + value: number; + radius: number; + color: string; + data: object; + itemData: D; + componentElement: Element; + }; +} +export interface ojSunburstEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeCollapse': ojSunburst.ojBeforeCollapse; + 'ojBeforeDrill': ojSunburst.ojBeforeDrill; + 'ojBeforeExpand': ojSunburst.ojBeforeExpand; + 'ojCollapse': ojSunburst.ojCollapse; + 'ojDrill': ojSunburst.ojDrill; + 'ojExpand': ojSunburst.ojExpand; + 'ojRotateInput': ojSunburst.ojRotateInput; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'animationUpdateColorChanged': JetElementCustomEvent["animationUpdateColor"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'colorLabelChanged': JetElementCustomEvent["colorLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayLevelsChanged': JetElementCustomEvent["displayLevels"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'expandedChanged': JetElementCustomEvent["expanded"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'nodeDefaultsChanged': JetElementCustomEvent["nodeDefaults"]>; + 'rootNodeChanged': JetElementCustomEvent["rootNode"]>; + 'rootNodeContentChanged': JetElementCustomEvent["rootNodeContent"]>; + 'rotationChanged': JetElementCustomEvent["rotation"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'sizeLabelChanged': JetElementCustomEvent["sizeLabel"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'startAngleChanged': JetElementCustomEvent["startAngle"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojSunburstSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + expanded: KeySet; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + nodeDefaults: { + borderColor: string; + borderWidth: number; + hoverColor: string; + labelDisplay: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign: 'inner' | 'outer' | 'center'; + labelMinLength: number; + labelStyle: object; + selectedInnerColor: string; + selectedOuterColor: string; + showDisclosure: 'on' | 'off'; + }; + rootNode: any; + rootNodeContent: { + renderer: ((context: ojSunburst.RootNodeContext) => ({ + insert: Element | string; + })); + }; + rotation: 'off' | 'on'; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + startAngle: number; + tooltip: { + renderer: ((context: ojSunburst.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipCollapse?: string; + tooltipExpand?: string; + }; +} +export interface ojSunburstSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojSunburstNode extends JetElement { + borderColor?: string; + borderWidth?: number; + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + label?: string; + labelDisplay?: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign?: 'inner' | 'outer' | 'center'; + labelStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + radius?: number; + selectable?: 'off' | 'auto'; + shortDesc?: string; + showDisclosure?: 'on' | 'off' | 'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onRadiusChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onShowDisclosureChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSunburstNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSunburstNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSunburstNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSunburstNodeSettablePropertiesLenient): void; +} +export interface ojSunburstNodeEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelHalignChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'radiusChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'showDisclosureChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSunburstNodeSettableProperties extends JetSettableProperties { + borderColor?: string; + borderWidth?: number; + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + label?: string; + labelDisplay?: 'horizontal' | 'rotated' | 'off' | 'auto'; + labelHalign?: 'inner' | 'outer' | 'center'; + labelStyle?: object; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + radius?: number; + selectable?: 'off' | 'auto'; + shortDesc?: string; + showDisclosure?: 'on' | 'off' | 'inherit'; + svgClassName?: string; + svgStyle?: object; + value: number; +} +export interface ojSunburstNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswipeactions/index.d.ts b/types/oraclejet/ojswipeactions/index.d.ts new file mode 100644 index 0000000000..cb309b2668 --- /dev/null +++ b/types/oraclejet/ojswipeactions/index.d.ts @@ -0,0 +1,36 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwipeActions extends baseComponent { + translations: { + ariaHideActionsDescription?: string; + ariaShowEndActionsDescription?: string; + ariaShowStartActionsDescription?: string; + }; + onOjAction: ((event: ojSwipeActions.ojAction) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwipeActionsEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwipeActions[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwipeActionsSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwipeActionsSettablePropertiesLenient): void; + refresh(): void; +} +export namespace ojSwipeActions { + interface ojAction extends CustomEvent<{ + [propName: string]: any; + }> { + } +} +export interface ojSwipeActionsEventMap extends baseComponentEventMap { + 'ojAction': ojSwipeActions.ojAction; +} +export interface ojSwipeActionsSettableProperties extends baseComponentSettableProperties { + translations: { + ariaHideActionsDescription?: string; + ariaShowEndActionsDescription?: string; + ariaShowStartActionsDescription?: string; + }; +} +export interface ojSwipeActionsSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswipetoreveal/index.d.ts b/types/oraclejet/ojswipetoreveal/index.d.ts new file mode 100644 index 0000000000..ec2587ee47 --- /dev/null +++ b/types/oraclejet/ojswipetoreveal/index.d.ts @@ -0,0 +1,4 @@ +export function setupSwipeActions(elem: Element, options?: { + threshold?: number; +}): void; +export function tearDownSwipeActions(elem: Element): void; diff --git a/types/oraclejet/ojswitch/index.d.ts b/types/oraclejet/ojswitch/index.d.ts new file mode 100644 index 0000000000..775bb8a1f9 --- /dev/null +++ b/types/oraclejet/ojswitch/index.d.ts @@ -0,0 +1,49 @@ +import { editableValue, editableValueEventMap, editableValueSettableProperties } from '../ojeditablevalue'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwitch extends editableValue { + disabled: boolean; + readonly: boolean; + value: boolean; + onDisabledChanged: ((event: JetElementCustomEvent) => any) | null; + onReadonlyChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onOjAnimateEnd: ((event: ojSwitch.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojSwitch.ojAnimateStart) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitchEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwitch[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwitchSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwitchSettablePropertiesLenient): void; +} +export namespace ojSwitch { + interface ojAnimateEnd extends CustomEvent<{ + action: string; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: string; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } +} +export interface ojSwitchEventMap extends editableValueEventMap { + 'ojAnimateEnd': ojSwitch.ojAnimateEnd; + 'ojAnimateStart': ojSwitch.ojAnimateStart; + 'disabledChanged': JetElementCustomEvent; + 'readonlyChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojSwitchSettableProperties extends editableValueSettableProperties { + disabled: boolean; + readonly: boolean; + value: boolean; +} +export interface ojSwitchSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojswitcher/index.d.ts b/types/oraclejet/ojswitcher/index.d.ts new file mode 100644 index 0000000000..7d4ffc5bcd --- /dev/null +++ b/types/oraclejet/ojswitcher/index.d.ts @@ -0,0 +1,22 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojSwitcher extends JetElement { + value: string; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojSwitcherEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojSwitcher[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojSwitcherSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojSwitcherSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojSwitcherEventMap extends HTMLElementEventMap { + 'valueChanged': JetElementCustomEvent; +} +export interface ojSwitcherSettableProperties extends JetSettableProperties { + value: string; +} +export interface ojSwitcherSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtable/index.d.ts b/types/oraclejet/ojtable/index.d.ts new file mode 100644 index 0000000000..4282815f2e --- /dev/null +++ b/types/oraclejet/ojtable/index.d.ts @@ -0,0 +1,595 @@ +import { DataProvider } from '../ojdataprovider'; +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTable extends baseComponent> { + accessibility: { + rowHeader: string; + }; + as: string; + columns: Array<{ + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + id?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }> | null; + columnsDefault: { + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }; + currentRow: ojTable.CurrentRow | null; + data: DataProvider | null; + display: 'list' | 'grid'; + dnd: { + drag: { + rows: { + dataTypes?: string | string[]; + dragStart?: ((param0: DragEvent, param1: ojTable.DragRowContext) => void); + drag?: ((param0: DragEvent) => void); + dragEnd?: ((param0: DragEvent) => void); + }; + }; + drop: { + columns: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + }; + rows: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + }; + }; + reorder: { + columns: 'enabled' | 'disabled'; + }; + }; + editMode: 'none' | 'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto' | 'enabled' | 'disabled'; + rowRenderer: ((context: ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize: number; + maxCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + columnIndex?: number; + rowIndex?: number; + columnKey?: any; + rowKey?: any; + offsetX?: number; + offsetY?: number; + }; + selection: Array & ojTable.RowSelectionEnd> | Array & ojTable.ColumnSelectionEnd>; + selectionMode: { + column: 'single' | 'multiple'; + row: 'single' | 'multiple'; + }; + selectionRequired: boolean; + verticalGridVisible: 'auto' | 'enabled' | 'disabled'; + translations: { + labelAccSelectionAffordanceBottom?: string; + labelAccSelectionAffordanceTop?: string; + labelDisableNonContiguousSelection?: string; + labelEditRow?: string; + labelEnableNonContiguousSelection?: string; + labelResize?: string; + labelResizePopupSpinner?: string; + labelResizePopupSubmit?: string; + labelSelectAndEditRow?: string; + labelSelectColum?: string; + labelSelectRow?: string; + labelSort?: string; + labelSortAsc?: string; + labelSortDsc?: string; + msgColumnResizeWidthValidation?: string; + msgFetchingData?: string; + msgInitializing?: string; + msgNoData?: string; + msgScrollPolicyMaxCountDetail?: string; + msgScrollPolicyMaxCountSummary?: string; + msgStatusSortAscending?: string; + msgStatusSortDescending?: string; + }; + onAccessibilityChanged: ((event: JetElementCustomEvent["accessibility"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColumnsChanged: ((event: JetElementCustomEvent["columns"]>) => any) | null; + onColumnsDefaultChanged: ((event: JetElementCustomEvent["columnsDefault"]>) => any) | null; + onCurrentRowChanged: ((event: JetElementCustomEvent["currentRow"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayChanged: ((event: JetElementCustomEvent["display"]>) => any) | null; + onDndChanged: ((event: JetElementCustomEvent["dnd"]>) => any) | null; + onEditModeChanged: ((event: JetElementCustomEvent["editMode"]>) => any) | null; + onFirstSelectedRowChanged: ((event: JetElementCustomEvent["firstSelectedRow"]>) => any) | null; + onHorizontalGridVisibleChanged: ((event: JetElementCustomEvent["horizontalGridVisible"]>) => any) | null; + onRowRendererChanged: ((event: JetElementCustomEvent["rowRenderer"]>) => any) | null; + onScrollPolicyChanged: ((event: JetElementCustomEvent["scrollPolicy"]>) => any) | null; + onScrollPolicyOptionsChanged: ((event: JetElementCustomEvent["scrollPolicyOptions"]>) => any) | null; + onScrollPositionChanged: ((event: JetElementCustomEvent["scrollPosition"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRequiredChanged: ((event: JetElementCustomEvent["selectionRequired"]>) => any) | null; + onVerticalGridVisibleChanged: ((event: JetElementCustomEvent["verticalGridVisible"]>) => any) | null; + onOjAnimateEnd: ((event: ojTable.ojAnimateEnd) => any) | null; + onOjAnimateStart: ((event: ojTable.ojAnimateStart) => any) | null; + onOjBeforeCurrentRow: ((event: ojTable.ojBeforeCurrentRow) => any) | null; + onOjBeforeRowEdit: ((event: ojTable.ojBeforeRowEdit) => any) | null; + onOjBeforeRowEditEnd: ((event: ojTable.ojBeforeRowEditEnd) => any) | null; + onOjSort: ((event: ojTable.ojSort) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTableEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTable[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTableSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTableSettablePropertiesLenient): void; + getContextByNode(node: Element): { + subId: 'oj-table-cell'; + rowIndex: number; + columnIndex: number; + key: string; + } | { + subId: 'oj-table-footer' | 'oj-table-header'; + index: number; + }; + getDataForVisibleRow(rowIndex: number): { + data: D; + index: number; + key: K; + } | null; + refresh(): void; + refreshRow(rowIdx: number): Promise; +} +export namespace ojTable { + interface ojAnimateEnd extends CustomEvent<{ + action: 'add' | 'remove' | 'update'; + element: Element; + [propName: string]: any; + }> { + } + interface ojAnimateStart extends CustomEvent<{ + action: 'add' | 'remove' | 'update'; + element: Element; + endCallback: (() => void); + [propName: string]: any; + }> { + } + interface ojBeforeCurrentRow extends CustomEvent<{ + currentRow: CurrentRow; + previousCurrentRow: CurrentRow; + [propName: string]: any; + }> { + } + interface ojBeforeRowEdit extends CustomEvent<{ + rowContext: object; + [propName: string]: any; + }> { + } + interface ojBeforeRowEditEnd extends CustomEvent<{ + rowContext: object; + cancelEdit: object; + [propName: string]: any; + }> { + } + interface ojSort extends CustomEvent<{ + header: Element; + direction: 'ascending' | 'descending'; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type ColumnSelectionEnd = { + endIndex: { + column: number; + }; + endKey?: { + column: K; + }; + } | { + endIndex?: { + column: number; + }; + endKey: { + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ColumnSelectionStart = { + startIndex: { + column: number; + }; + startKey?: { + column: K; + }; + } | { + startIndex?: { + column: number; + }; + startKey: { + column: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ColumnsRendererContext = { + cellContext: { + datasource: DataProvider | null; + mode: 'edit' | 'navigation'; + status: ContextStatus; + }; + columnIndex: number; + componentElement: Element; + data: D; + parentElement: Element; + row: { + [name: string]: any; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type ContextStatus = { + rowIndex: number; + rowKey: K; + currentRow: CurrentRow; + }; + // tslint:disable-next-line interface-over-type-literal + type CurrentRow = { + rowIndex: number; + rowKey?: K; + } | { + rowIndex?: number; + rowKey: K; + }; + // tslint:disable-next-line interface-over-type-literal + type DragRowContext = { + rows: Array<{ + data: D; + index: number; + key: K; + }>; + }; + // tslint:disable-next-line interface-over-type-literal + type DropColumnContext = { + columnIndex: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DropRowContext = { + rowIndex: number; + }; + // tslint:disable-next-line interface-over-type-literal + type FooterRendererContext = { + columnIndex: number; + componentElement: Element; + footerContext: { + datasource: DataProvider | null; + }; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type HeaderRendererContext = { + columnIndex: number; + columnHeaderDefaultRenderer?: ((param0: object, param1: ((param0: object) => void)) => void); + columnHeaderSortableIconRenderer?: ((param0: object, param1: ((param0: object) => void)) => void); + componentElement: Element; + data: string; + headerContext: { + datasource: DataProvider | null; + }; + parentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type RowRendererContext = { + componentElement: Element; + data: { + [name: string]: any; + }; + parentElement: Element; + rowContext: { + datasource: DataProvider | null; + mode: 'edit' | 'navigation'; + status: ContextStatus; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type RowSelectionEnd = { + endIndex: { + row: number; + }; + endKey?: { + row: K; + }; + } | { + endIndex?: { + row: number; + }; + endKey: { + row: K; + }; + }; + // tslint:disable-next-line interface-over-type-literal + type RowSelectionStart = { + startIndex: { + row: number; + }; + startKey?: { + row: K; + }; + } | { + startIndex?: { + row: number; + }; + startKey: { + row: K; + }; + }; +} +export interface ojTableEventMap extends baseComponentEventMap> { + 'ojAnimateEnd': ojTable.ojAnimateEnd; + 'ojAnimateStart': ojTable.ojAnimateStart; + 'ojBeforeCurrentRow': ojTable.ojBeforeCurrentRow; + 'ojBeforeRowEdit': ojTable.ojBeforeRowEdit; + 'ojBeforeRowEditEnd': ojTable.ojBeforeRowEditEnd; + 'ojSort': ojTable.ojSort; + 'accessibilityChanged': JetElementCustomEvent["accessibility"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'columnsChanged': JetElementCustomEvent["columns"]>; + 'columnsDefaultChanged': JetElementCustomEvent["columnsDefault"]>; + 'currentRowChanged': JetElementCustomEvent["currentRow"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayChanged': JetElementCustomEvent["display"]>; + 'dndChanged': JetElementCustomEvent["dnd"]>; + 'editModeChanged': JetElementCustomEvent["editMode"]>; + 'firstSelectedRowChanged': JetElementCustomEvent["firstSelectedRow"]>; + 'horizontalGridVisibleChanged': JetElementCustomEvent["horizontalGridVisible"]>; + 'rowRendererChanged': JetElementCustomEvent["rowRenderer"]>; + 'scrollPolicyChanged': JetElementCustomEvent["scrollPolicy"]>; + 'scrollPolicyOptionsChanged': JetElementCustomEvent["scrollPolicyOptions"]>; + 'scrollPositionChanged': JetElementCustomEvent["scrollPosition"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRequiredChanged': JetElementCustomEvent["selectionRequired"]>; + 'verticalGridVisibleChanged': JetElementCustomEvent["verticalGridVisible"]>; +} +export interface ojTableSettableProperties extends baseComponentSettableProperties { + accessibility: { + rowHeader: string; + }; + as: string; + columns: Array<{ + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + id?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }> | null; + columnsDefault: { + className?: string | null; + field?: string | null; + footerClassName?: string | null; + footerRenderer?: ((context: ojTable.FooterRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + footerStyle?: string | null; + footerTemplate?: { + componentElement: Element; + }; + headerClassName?: string | null; + headerRenderer?: ((context: ojTable.HeaderRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + headerStyle?: string | null; + headerTemplate?: { + componentElement: Element; + data: object; + }; + headerText?: string | null; + renderer?: ((context: ojTable.ColumnsRendererContext) => { + insert: HTMLElement | string; + } | void) | null; + resizable?: 'enabled' | 'disabled'; + sortProperty?: string | null; + sortable?: 'auto' | 'enabled' | 'disabled'; + style?: string | null; + template?: { + componentElement: Element; + data: object; + row: object; + index: number; + columnIndex: number; + key: any; + mode: string; + }; + width?: number | null; + }; + currentRow: ojTable.CurrentRow | null; + data: DataProvider | null; + display: 'list' | 'grid'; + dnd: { + drag: { + rows: { + dataTypes?: string | string[]; + dragStart?: ((param0: DragEvent, param1: ojTable.DragRowContext) => void); + drag?: ((param0: DragEvent) => void); + dragEnd?: ((param0: DragEvent) => void); + }; + }; + drop: { + columns: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropColumnContext) => void); + }; + rows: { + dataTypes: string | string[]; + dragEnter?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragOver?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + dragLeave?: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + drop: ((param0: DragEvent, param1: ojTable.DropRowContext) => void); + }; + }; + reorder: { + columns: 'enabled' | 'disabled'; + }; + }; + editMode: 'none' | 'rowEdit'; + readonly firstSelectedRow: object; + horizontalGridVisible: 'auto' | 'enabled' | 'disabled'; + rowRenderer: ((context: ojTable.RowRendererContext) => string | HTMLElement | void) | null; + scrollPolicy: 'auto' | 'loadMoreOnScroll'; + scrollPolicyOptions: { + fetchSize: number; + maxCount: number; + }; + scrollPosition: { + x?: number; + y?: number; + columnIndex?: number; + rowIndex?: number; + columnKey?: any; + rowKey?: any; + offsetX?: number; + offsetY?: number; + }; + selection: Array & ojTable.RowSelectionEnd> | Array & ojTable.ColumnSelectionEnd>; + selectionMode: { + column: 'single' | 'multiple'; + row: 'single' | 'multiple'; + }; + selectionRequired: boolean; + verticalGridVisible: 'auto' | 'enabled' | 'disabled'; + translations: { + labelAccSelectionAffordanceBottom?: string; + labelAccSelectionAffordanceTop?: string; + labelDisableNonContiguousSelection?: string; + labelEditRow?: string; + labelEnableNonContiguousSelection?: string; + labelResize?: string; + labelResizePopupSpinner?: string; + labelResizePopupSubmit?: string; + labelSelectAndEditRow?: string; + labelSelectColum?: string; + labelSelectRow?: string; + labelSort?: string; + labelSortAsc?: string; + labelSortDsc?: string; + msgColumnResizeWidthValidation?: string; + msgFetchingData?: string; + msgInitializing?: string; + msgNoData?: string; + msgScrollPolicyMaxCountDetail?: string; + msgScrollPolicyMaxCountSummary?: string; + msgStatusSortAscending?: string; + msgStatusSortDescending?: string; + }; +} +export interface ojTableSettablePropertiesLenient extends Partial> { + [key: string]: any; +} diff --git a/types/oraclejet/ojtagcloud/index.d.ts b/types/oraclejet/ojtagcloud/index.d.ts new file mode 100644 index 0000000000..17bc2397a5 --- /dev/null +++ b/types/oraclejet/ojtagcloud/index.d.ts @@ -0,0 +1,208 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTagCloud extends dvtBaseComponent> { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + data: DataProvider | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + layout: 'cloud' | 'rectangular'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + styleDefaults: { + animationDuration?: number; + hoverBehaviorDelay?: number; + svgStyle?: object; + }; + tooltip: { + renderer: ((context: ojTagCloud.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTagCloudEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTagCloud[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTagCloudSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTagCloudSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTagCloud.NodeContext | null; + getItem(index: number): ojTagCloud.ItemContext | null; + getItemCount(): number; +} +export interface ojTagCloudEventMap extends dvtBaseComponentEventMap> { + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojTagCloudSettableProperties extends dvtBaseComponentSettableProperties { + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + as: string; + data: DataProvider | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + layout: 'cloud' | 'rectangular'; + selection: K[]; + selectionMode: 'single' | 'multiple' | 'none'; + styleDefaults: { + animationDuration?: number; + hoverBehaviorDelay?: number; + svgStyle?: object; + }; + tooltip: { + renderer: ((context: ojTagCloud.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojTagCloudSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojTagCloud { + // tslint:disable-next-line interface-over-type-literal + type ItemContext = { + color: string; + label: string; + selected: boolean; + tooltip: string; + value: number; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string; + componentElement: Element; + id: K; + label: string; + parentElement: Element; + value: number; + }; +} +export interface ojTagCloudItem extends JetElement { + categories: string[]; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onUrlChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTagCloudItemEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTagCloudItem[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTagCloudItemSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTagCloudItemSettablePropertiesLenient): void; +} +export interface ojTagCloudItemEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'urlChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojTagCloudItemSettableProperties extends JetSettableProperties { + categories: string[]; + color?: string; + label: string; + shortDesc: string; + svgClassName: string; + svgStyle: object; + url: string; + value: number | null; +} +export interface ojTagCloudItemSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojthematicmap/index.d.ts b/types/oraclejet/ojthematicmap/index.d.ts new file mode 100644 index 0000000000..45bbd3b907 --- /dev/null +++ b/types/oraclejet/ojthematicmap/index.d.ts @@ -0,0 +1,576 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojThematicMap extends dvtBaseComponent> { + animationDuration: number; + animationOnDisplay: 'auto' | 'none'; + areaData: DataProvider | null; + as: string; + focusRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + initialZooming: 'auto' | 'none'; + isolatedItem: K1; + labelDisplay: 'on' | 'off' | 'auto'; + labelType: 'long' | 'short'; + linkData: DataProvider | null; + mapProvider: { + geo: object; + propertiesKeys: { + id: string; + longLabel?: string; + shortLabel?: string; + }; + }; + markerData: DataProvider | null; + markerZoomBehavior: 'zoom' | 'fixed'; + maxZoom: number; + panning: 'auto' | 'none'; + renderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + areaSvgStyle?: object; + dataAreaDefaults?: { + borderColor?: string; + hoverColor?: string; + selectedInnerColor?: string; + selectedOuterColor?: string; + }; + dataMarkerDefaults?: { + borderColor?: string; + borderStyle?: 'none' | 'solid'; + borderWidth?: number; + color?: string; + height?: number; + labelStyle?: object; + opacity?: number; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + width?: number; + }; + hoverBehaviorDelay?: number; + labelStyle?: object; + linkDefaults?: { + color?: string; + width?: number; + }; + }; + tooltip: { + renderer: ((context: ojThematicMap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + tooltipDisplay: 'auto' | 'labelAndShortDesc' | 'none' | 'shortDesc'; + touchResponse: 'touchStart' | 'auto'; + zooming: 'auto' | 'none'; + translations: { + areasRegion?: string; + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + linksRegion?: string; + markersRegion?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAreaDataChanged: ((event: JetElementCustomEvent["areaData"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onFocusRendererChanged: ((event: JetElementCustomEvent["focusRenderer"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverRendererChanged: ((event: JetElementCustomEvent["hoverRenderer"]>) => any) | null; + onInitialZoomingChanged: ((event: JetElementCustomEvent["initialZooming"]>) => any) | null; + onIsolatedItemChanged: ((event: JetElementCustomEvent["isolatedItem"]>) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent["labelDisplay"]>) => any) | null; + onLabelTypeChanged: ((event: JetElementCustomEvent["labelType"]>) => any) | null; + onLinkDataChanged: ((event: JetElementCustomEvent["linkData"]>) => any) | null; + onMapProviderChanged: ((event: JetElementCustomEvent["mapProvider"]>) => any) | null; + onMarkerDataChanged: ((event: JetElementCustomEvent["markerData"]>) => any) | null; + onMarkerZoomBehaviorChanged: ((event: JetElementCustomEvent["markerZoomBehavior"]>) => any) | null; + onMaxZoomChanged: ((event: JetElementCustomEvent["maxZoom"]>) => any) | null; + onPanningChanged: ((event: JetElementCustomEvent["panning"]>) => any) | null; + onRendererChanged: ((event: JetElementCustomEvent["renderer"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSelectionRendererChanged: ((event: JetElementCustomEvent["selectionRenderer"]>) => any) | null; + onStyleDefaultsChanged: ((event: JetElementCustomEvent["styleDefaults"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTooltipDisplayChanged: ((event: JetElementCustomEvent["tooltipDisplay"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onZoomingChanged: ((event: JetElementCustomEvent["zooming"]>) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojThematicMapEventMap[T]) => any, + useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojThematicMap[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojThematicMapSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojThematicMapSettablePropertiesLenient): void; + getArea(index: number): ojThematicMap.DataContext | null; + getContextByNode(node: Element): ojThematicMap.NodeContext | null; + getLink(index: number): ojThematicMap.DataContext | null; + getMarker(index: number): ojThematicMap.DataContext | null; +} +export interface ojThematicMapEventMap extends dvtBaseComponentEventMap> { + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'areaDataChanged': JetElementCustomEvent["areaData"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'focusRendererChanged': JetElementCustomEvent["focusRenderer"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverRendererChanged': JetElementCustomEvent["hoverRenderer"]>; + 'initialZoomingChanged': JetElementCustomEvent["initialZooming"]>; + 'isolatedItemChanged': JetElementCustomEvent["isolatedItem"]>; + 'labelDisplayChanged': JetElementCustomEvent["labelDisplay"]>; + 'labelTypeChanged': JetElementCustomEvent["labelType"]>; + 'linkDataChanged': JetElementCustomEvent["linkData"]>; + 'mapProviderChanged': JetElementCustomEvent["mapProvider"]>; + 'markerDataChanged': JetElementCustomEvent["markerData"]>; + 'markerZoomBehaviorChanged': JetElementCustomEvent["markerZoomBehavior"]>; + 'maxZoomChanged': JetElementCustomEvent["maxZoom"]>; + 'panningChanged': JetElementCustomEvent["panning"]>; + 'rendererChanged': JetElementCustomEvent["renderer"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'selectionRendererChanged': JetElementCustomEvent["selectionRenderer"]>; + 'styleDefaultsChanged': JetElementCustomEvent["styleDefaults"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'tooltipDisplayChanged': JetElementCustomEvent["tooltipDisplay"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; + 'zoomingChanged': JetElementCustomEvent["zooming"]>; +} +export interface ojThematicMapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDisplay: 'auto' | 'none'; + areaData: DataProvider | null; + as: string; + focusRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + initialZooming: 'auto' | 'none'; + isolatedItem: K1; + labelDisplay: 'on' | 'off' | 'auto'; + labelType: 'long' | 'short'; + linkData: DataProvider | null; + mapProvider: { + geo: object; + propertiesKeys: { + id: string; + longLabel?: string; + shortLabel?: string; + }; + }; + markerData: DataProvider | null; + markerZoomBehavior: 'zoom' | 'fixed'; + maxZoom: number; + panning: 'auto' | 'none'; + renderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + selection: Array; + selectionMode: 'single' | 'multiple' | 'none'; + selectionRenderer: ((context: ojThematicMap.RendererContext) => { + insert: SVGElement; + } | void) | null; + styleDefaults: { + areaSvgStyle?: object; + dataAreaDefaults?: { + borderColor?: string; + hoverColor?: string; + selectedInnerColor?: string; + selectedOuterColor?: string; + }; + dataMarkerDefaults?: { + borderColor?: string; + borderStyle?: 'none' | 'solid'; + borderWidth?: number; + color?: string; + height?: number; + labelStyle?: object; + opacity?: number; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + width?: number; + }; + hoverBehaviorDelay?: number; + labelStyle?: object; + linkDefaults?: { + color?: string; + width?: number; + }; + }; + tooltip: { + renderer: ((context: ojThematicMap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + tooltipDisplay: 'auto' | 'labelAndShortDesc' | 'none' | 'shortDesc'; + touchResponse: 'touchStart' | 'auto'; + zooming: 'auto' | 'none'; + translations: { + areasRegion?: string; + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + linksRegion?: string; + markersRegion?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojThematicMapSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export namespace ojThematicMap { + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + index: number; + }; + // tslint:disable-next-line interface-over-type-literal + type RendererContext = { + color: string; + componentElement: Element; + data: object; + id: K1 | K2 | K3; + itemData: D1 | D2 | D3; + label: string; + location: string | null; + parentElement: Element; + previousState: { + hovered: boolean; + selected: boolean; + focused: boolean; + }; + renderDefaultFocus: (() => void); + renderDefaultHover: (() => void); + renderDefaultSelection: (() => void); + root: Element | null; + state: { + hovered: boolean; + selected: boolean; + focused: boolean; + }; + x: number | null; + y: number | null; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + color: string | null; + componentElement: Element; + data: object | null; + id: K1 | K2 | K3; + itemData: D1 | D2 | D3; + label: string | null; + location: string | null; + locationName: string | null; + parentElement: Element; + tooltip: string; + x: number; + y: number; + }; +} +export interface ojThematicMapArea extends JetElement { + categories: string[]; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto' | 'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onOpacityChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapAreaEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapArea[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapAreaSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapAreaSettablePropertiesLenient): void; +} +export interface ojThematicMapAreaEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'locationChanged': JetElementCustomEvent; + 'opacityChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; +} +export interface ojThematicMapAreaSettableProperties extends JetSettableProperties { + categories: string[]; + color: string; + label: string; + labelStyle: object; + location: string; + opacity: number; + selectable: 'auto' | 'off'; + shortDesc: string; + svgClassName: string; + svgStyle: object; +} +export interface ojThematicMapAreaSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojThematicMapLink extends JetElement { + categories: string[]; + color: string; + endLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + selectable: 'auto' | 'off'; + shortDesc: string; + startLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + svgClassName: string; + svgStyle: object; + width: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onEndLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onStartLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapLinkEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapLink[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapLinkSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapLinkSettablePropertiesLenient): void; +} +export interface ojThematicMapLinkEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'endLocationChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'startLocationChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; +} +export interface ojThematicMapLinkSettableProperties extends JetSettableProperties { + categories: string[]; + color: string; + endLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + selectable: 'auto' | 'off'; + shortDesc: string; + startLocation: { + id?: any; + location?: string; + x?: number; + y?: number; + }; + svgClassName: string; + svgStyle: object; + width: number; +} +export interface ojThematicMapLinkSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export interface ojThematicMapMarker extends JetElement { + borderColor: string; + borderStyle: 'solid' | 'none'; + borderWidth: number; + categories: string[]; + color: string; + height: number; + label: string; + labelPosition: 'bottom' | 'center' | 'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto' | 'off'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number | null; + y: number | null; + onBorderColorChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onBorderWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onHeightChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelPositionChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLocationChanged: ((event: JetElementCustomEvent) => any) | null; + onOpacityChanged: ((event: JetElementCustomEvent) => any) | null; + onRotationChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShapeChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceHoverSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSourceSelectedChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + onWidthChanged: ((event: JetElementCustomEvent) => any) | null; + onXChanged: ((event: JetElementCustomEvent) => any) | null; + onYChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojThematicMapMarkerEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojThematicMapMarker[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojThematicMapMarkerSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojThematicMapMarkerSettablePropertiesLenient): void; +} +export interface ojThematicMapMarkerEventMap extends HTMLElementEventMap { + 'borderColorChanged': JetElementCustomEvent; + 'borderStyleChanged': JetElementCustomEvent; + 'borderWidthChanged': JetElementCustomEvent; + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'heightChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelPositionChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'locationChanged': JetElementCustomEvent; + 'opacityChanged': JetElementCustomEvent; + 'rotationChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shapeChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'sourceChanged': JetElementCustomEvent; + 'sourceHoverChanged': JetElementCustomEvent; + 'sourceHoverSelectedChanged': JetElementCustomEvent; + 'sourceSelectedChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; + 'widthChanged': JetElementCustomEvent; + 'xChanged': JetElementCustomEvent; + 'yChanged': JetElementCustomEvent; +} +export interface ojThematicMapMarkerSettableProperties extends JetSettableProperties { + borderColor: string; + borderStyle: 'solid' | 'none'; + borderWidth: number; + categories: string[]; + color: string; + height: number; + label: string; + labelPosition: 'bottom' | 'center' | 'top'; + labelStyle: object; + location: string; + opacity: number; + rotation: number; + selectable: 'auto' | 'off'; + shape?: 'circle' | 'diamond' | 'ellipse' | 'human' | 'plus' | 'rectangle' | 'square' | 'star' | 'triangleDown' | 'triangleUp' | string; + shortDesc: string; + source: string; + sourceHover: string; + sourceHoverSelected: string; + sourceSelected: string; + svgClassName: string; + svgStyle: object; + value: number; + width: number; + x: number | null; + y: number | null; +} +export interface ojThematicMapMarkerSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojthemeutils/index.d.ts b/types/oraclejet/ojthemeutils/index.d.ts new file mode 100644 index 0000000000..de718ebef9 --- /dev/null +++ b/types/oraclejet/ojthemeutils/index.d.ts @@ -0,0 +1,4 @@ +export function clearCache(): void; +export function getThemeName(): string | null; +export function getThemeTargetPlatform(): string | null; +export function parseJSONFromFontFamily(selector: string): any; diff --git a/types/oraclejet/ojtime-base/index.d.ts b/types/oraclejet/ojtime-base/index.d.ts new file mode 100644 index 0000000000..c5841cd8ec --- /dev/null +++ b/types/oraclejet/ojtime-base/index.d.ts @@ -0,0 +1,22 @@ +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface dvtTimeComponent extends dvtBaseComponent { + addEventListener>(type: T, listener: (this: HTMLElement, ev: dvtTimeComponentEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): dvtTimeComponent[T]; + getProperty(property: string): any; + setProperty(property: T, value: dvtTimeComponentSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: dvtTimeComponentSettablePropertiesLenient): void; +} +// These interfaces are empty but required to keep the event chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtTimeComponentEventMap extends dvtBaseComponentEventMap { +} +// These interfaces are empty but required to keep the component chain intact. Avoid lint-rule +// tslint:disable-next-line no-empty-interface +export interface dvtTimeComponentSettableProperties extends dvtBaseComponentSettableProperties { +} +export interface dvtTimeComponentSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtimeaxis/index.d.ts b/types/oraclejet/ojtimeaxis/index.d.ts new file mode 100644 index 0000000000..2505fef16f --- /dev/null +++ b/types/oraclejet/ojtimeaxis/index.d.ts @@ -0,0 +1,87 @@ +import { Converter } from '../ojvalidation-base'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTimeAxis extends dvtBaseComponent { + converter: ojTimeAxis.Converters | Converter; + end: string; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + start: string; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; + onConverterChanged: ((event: JetElementCustomEvent) => any) | null; + onEndChanged: ((event: JetElementCustomEvent) => any) | null; + onScaleChanged: ((event: JetElementCustomEvent) => any) | null; + onStartChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTimeAxisEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTimeAxis[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTimeAxisSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTimeAxisSettablePropertiesLenient): void; +} +export interface ojTimeAxisEventMap extends dvtBaseComponentEventMap { + 'converterChanged': JetElementCustomEvent; + 'endChanged': JetElementCustomEvent; + 'scaleChanged': JetElementCustomEvent; + 'startChanged': JetElementCustomEvent; +} +export interface ojTimeAxisSettableProperties extends dvtBaseComponentSettableProperties { + converter: ojTimeAxis.Converters | Converter; + end: string; + scale: 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years'; + start: string; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + }; +} +export interface ojTimeAxisSettablePropertiesLenient extends Partial { + [key: string]: any; +} +export namespace ojTimeAxis { + // tslint:disable-next-line interface-over-type-literal + type Converters = { + default?: Converter; + seconds?: Converter; + minutes?: Converter; + hours?: Converter; + days?: Converter; + weeks?: Converter; + months?: Converter; + quarters?: Converter; + years?: Converter; + }; +} diff --git a/types/oraclejet/ojtimeutils/index.d.ts b/types/oraclejet/ojtimeutils/index.d.ts new file mode 100644 index 0000000000..a77d0f4d36 --- /dev/null +++ b/types/oraclejet/ojtimeutils/index.d.ts @@ -0,0 +1,3 @@ +export function getDate(pos: number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; +export function getLength(startTime: Date | string | number, endTime: Date | string | number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; +export function getPosition(time: Date | string | number, rangeStartTime: Date | string | number, rangeEndTime: Date | string | number, rangeWidth: number): number; diff --git a/types/oraclejet/ojtoolbar/index.d.ts b/types/oraclejet/ojtoolbar/index.d.ts new file mode 100644 index 0000000000..c310c831c7 --- /dev/null +++ b/types/oraclejet/ojtoolbar/index.d.ts @@ -0,0 +1,22 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojToolbar extends baseComponent { + chroming: 'full' | 'half' | 'outlined'; + onChromingChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojToolbarEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojToolbar[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojToolbarSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojToolbarSettablePropertiesLenient): void; + refresh(): void; +} +export interface ojToolbarEventMap extends baseComponentEventMap { + 'chromingChanged': JetElementCustomEvent; +} +export interface ojToolbarSettableProperties extends baseComponentSettableProperties { + chroming: 'full' | 'half' | 'outlined'; +} +export interface ojToolbarSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtrain/index.d.ts b/types/oraclejet/ojtrain/index.d.ts new file mode 100644 index 0000000000..233592fd61 --- /dev/null +++ b/types/oraclejet/ojtrain/index.d.ts @@ -0,0 +1,78 @@ +import { baseComponent, baseComponentEventMap, baseComponentSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTrain extends baseComponent { + selectedStep: string; + steps: ojTrain.Step[]; + onSelectedStepChanged: ((event: JetElementCustomEvent) => any) | null; + onStepsChanged: ((event: JetElementCustomEvent) => any) | null; + onOjBeforeDeselect: ((event: ojTrain.ojBeforeDeselect) => any) | null; + onOjBeforeSelect: ((event: ojTrain.ojBeforeSelect) => any) | null; + onOjDeselect: ((event: ojTrain.ojDeselect) => any) | null; + onOjSelect: ((event: ojTrain.ojSelect) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTrainEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTrain[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTrainSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTrainSettablePropertiesLenient): void; + getNextSelectableStep(): string | null; + getPreviousSelectableStep(): string | null; + getStep(id: string): ojTrain.Step | null; + refresh(): void; + updateStep(id: string, stepProperties: { + id?: string; + label?: string; + disabled?: boolean; + visited?: boolean; + messageType?: 'info' | 'error' | 'fatal' | 'warning'; + }): void; +} +export namespace ojTrain { + interface ojBeforeDeselect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojBeforeSelect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojDeselect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + interface ojSelect extends CustomEvent<{ + toStep: string; + fromStep: string; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type Step = { + id: string; + label: string; + disabled?: boolean; + visited?: boolean; + messageType?: 'info' | 'error' | 'fatal' | 'warning'; + }; +} +export interface ojTrainEventMap extends baseComponentEventMap { + 'ojBeforeDeselect': ojTrain.ojBeforeDeselect; + 'ojBeforeSelect': ojTrain.ojBeforeSelect; + 'ojDeselect': ojTrain.ojDeselect; + 'ojSelect': ojTrain.ojSelect; + 'selectedStepChanged': JetElementCustomEvent; + 'stepsChanged': JetElementCustomEvent; +} +export interface ojTrainSettableProperties extends baseComponentSettableProperties { + selectedStep: string; + steps: ojTrain.Step[]; +} +export interface ojTrainSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojtranslation/index.d.ts b/types/oraclejet/ojtranslation/index.d.ts new file mode 100644 index 0000000000..69957f1980 --- /dev/null +++ b/types/oraclejet/ojtranslation/index.d.ts @@ -0,0 +1,5 @@ +export function applyParameters(pattern: string, parameters: object | any[]): string | null; +export function getComponentTranslations(componentName: string): object; +export function getResource(key: string): object | string | null; +export function getTranslatedString(key: string, ...var_args: Array): string; +export function setBundle(bundle: object): void; diff --git a/types/oraclejet/ojtreedataprovider/index.d.ts b/types/oraclejet/ojtreedataprovider/index.d.ts new file mode 100644 index 0000000000..88d877d363 --- /dev/null +++ b/types/oraclejet/ojtreedataprovider/index.d.ts @@ -0,0 +1,5 @@ +import { DataProvider } from '../ojdataprovider'; +interface TreeDataProvider extends DataProvider { + getChildDataProvider(parentKey: any): TreeDataProvider; +} +export = TreeDataProvider; diff --git a/types/oraclejet/ojtreemap/index.d.ts b/types/oraclejet/ojtreemap/index.d.ts new file mode 100644 index 0000000000..56bfb35de9 --- /dev/null +++ b/types/oraclejet/ojtreemap/index.d.ts @@ -0,0 +1,392 @@ +import { DataProvider } from '../ojdataprovider'; +import { dvtBaseComponent, dvtBaseComponentEventMap, dvtBaseComponentSettableProperties } from '../ojdvt-base'; +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojTreemap extends dvtBaseComponent> { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + groupGaps: 'all' | 'none' | 'outer'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal' | 'sliceAndDiceVertical' | 'squarified'; + nodeContent: { + renderer: ((context: ojTreemap.NodeContentContext) => ({ + insert: Element | string; + })); + }; + nodeDefaults: { + groupLabelDisplay: 'node' | 'off' | 'header'; + header: { + backgroundColor: string; + borderColor: string; + hoverBackgroundColor: string; + hoverInnerColor: string; + hoverOuterColor: string; + isolate: 'off' | 'on'; + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + selectedBackgroundColor: string; + selectedInnerColor: string; + selectedOuterColor: string; + useNodeColor: 'on' | 'off'; + }; + hoverColor: string; + labelDisplay: 'off' | 'node'; + labelHalign: 'start' | 'end' | 'center'; + labelMinLength: number; + labelStyle: object; + labelValign: 'top' | 'bottom' | 'center'; + selectedInnerColor: string; + selectedOuterColor: string; + }; + nodeSeparators: 'bevels' | 'gaps'; + rootNode: any; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + tooltip: { + renderer: ((context: ojTreemap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipIsolate?: string; + tooltipRestore?: string; + }; + onAnimationDurationChanged: ((event: JetElementCustomEvent["animationDuration"]>) => any) | null; + onAnimationOnDataChangeChanged: ((event: JetElementCustomEvent["animationOnDataChange"]>) => any) | null; + onAnimationOnDisplayChanged: ((event: JetElementCustomEvent["animationOnDisplay"]>) => any) | null; + onAnimationUpdateColorChanged: ((event: JetElementCustomEvent["animationUpdateColor"]>) => any) | null; + onAsChanged: ((event: JetElementCustomEvent["as"]>) => any) | null; + onColorLabelChanged: ((event: JetElementCustomEvent["colorLabel"]>) => any) | null; + onDataChanged: ((event: JetElementCustomEvent["data"]>) => any) | null; + onDisplayLevelsChanged: ((event: JetElementCustomEvent["displayLevels"]>) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent["drilling"]>) => any) | null; + onGroupGapsChanged: ((event: JetElementCustomEvent["groupGaps"]>) => any) | null; + onHiddenCategoriesChanged: ((event: JetElementCustomEvent["hiddenCategories"]>) => any) | null; + onHighlightMatchChanged: ((event: JetElementCustomEvent["highlightMatch"]>) => any) | null; + onHighlightedCategoriesChanged: ((event: JetElementCustomEvent["highlightedCategories"]>) => any) | null; + onHoverBehaviorChanged: ((event: JetElementCustomEvent["hoverBehavior"]>) => any) | null; + onHoverBehaviorDelayChanged: ((event: JetElementCustomEvent["hoverBehaviorDelay"]>) => any) | null; + onIsolatedNodeChanged: ((event: JetElementCustomEvent["isolatedNode"]>) => any) | null; + onLayoutChanged: ((event: JetElementCustomEvent["layout"]>) => any) | null; + onNodeContentChanged: ((event: JetElementCustomEvent["nodeContent"]>) => any) | null; + onNodeDefaultsChanged: ((event: JetElementCustomEvent["nodeDefaults"]>) => any) | null; + onNodeSeparatorsChanged: ((event: JetElementCustomEvent["nodeSeparators"]>) => any) | null; + onRootNodeChanged: ((event: JetElementCustomEvent["rootNode"]>) => any) | null; + onSelectionChanged: ((event: JetElementCustomEvent["selection"]>) => any) | null; + onSelectionModeChanged: ((event: JetElementCustomEvent["selectionMode"]>) => any) | null; + onSizeLabelChanged: ((event: JetElementCustomEvent["sizeLabel"]>) => any) | null; + onSortingChanged: ((event: JetElementCustomEvent["sorting"]>) => any) | null; + onTooltipChanged: ((event: JetElementCustomEvent["tooltip"]>) => any) | null; + onTouchResponseChanged: ((event: JetElementCustomEvent["touchResponse"]>) => any) | null; + onOjBeforeDrill: ((event: ojTreemap.ojBeforeDrill) => any) | null; + onOjDrill: ((event: ojTreemap.ojDrill) => any) | null; + addEventListener>(type: T, listener: (this: HTMLElement, ev: ojTreemapEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty>(property: T): ojTreemap[T]; + getProperty(property: string): any; + setProperty>(property: T, value: ojTreemapSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType>): void; + setProperties(properties: ojTreemapSettablePropertiesLenient): void; + getContextByNode(node: Element): ojTreemap.NodeContext | null; + getNode(subIdPath: any[]): ojTreemap.DataContext | null; +} +export namespace ojTreemap { + interface ojBeforeDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + interface ojDrill extends CustomEvent<{ + id: any; + data: object; + itemData: object; + [propName: string]: any; + }> { + } + // tslint:disable-next-line interface-over-type-literal + type DataContext = { + color: string; + label: string; + selected: boolean; + size: number; + tooltip: string; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContentContext = { + bounds: { + x: number; + y: number; + width: number; + height: number; + }; + id: K; + data: object; + itemData: D; + componentElement: Element; + }; + // tslint:disable-next-line interface-over-type-literal + type NodeContext = { + subId: string; + indexPath: number[]; + }; + // tslint:disable-next-line interface-over-type-literal + type TooltipContext = { + parentElement: Element; + id: K; + label: string; + value: number; + color: string; + data: object; + itemData: D; + componentElement: Element; + }; +} +export interface ojTreemapEventMap extends dvtBaseComponentEventMap> { + 'ojBeforeDrill': ojTreemap.ojBeforeDrill; + 'ojDrill': ojTreemap.ojDrill; + 'animationDurationChanged': JetElementCustomEvent["animationDuration"]>; + 'animationOnDataChangeChanged': JetElementCustomEvent["animationOnDataChange"]>; + 'animationOnDisplayChanged': JetElementCustomEvent["animationOnDisplay"]>; + 'animationUpdateColorChanged': JetElementCustomEvent["animationUpdateColor"]>; + 'asChanged': JetElementCustomEvent["as"]>; + 'colorLabelChanged': JetElementCustomEvent["colorLabel"]>; + 'dataChanged': JetElementCustomEvent["data"]>; + 'displayLevelsChanged': JetElementCustomEvent["displayLevels"]>; + 'drillingChanged': JetElementCustomEvent["drilling"]>; + 'groupGapsChanged': JetElementCustomEvent["groupGaps"]>; + 'hiddenCategoriesChanged': JetElementCustomEvent["hiddenCategories"]>; + 'highlightMatchChanged': JetElementCustomEvent["highlightMatch"]>; + 'highlightedCategoriesChanged': JetElementCustomEvent["highlightedCategories"]>; + 'hoverBehaviorChanged': JetElementCustomEvent["hoverBehavior"]>; + 'hoverBehaviorDelayChanged': JetElementCustomEvent["hoverBehaviorDelay"]>; + 'isolatedNodeChanged': JetElementCustomEvent["isolatedNode"]>; + 'layoutChanged': JetElementCustomEvent["layout"]>; + 'nodeContentChanged': JetElementCustomEvent["nodeContent"]>; + 'nodeDefaultsChanged': JetElementCustomEvent["nodeDefaults"]>; + 'nodeSeparatorsChanged': JetElementCustomEvent["nodeSeparators"]>; + 'rootNodeChanged': JetElementCustomEvent["rootNode"]>; + 'selectionChanged': JetElementCustomEvent["selection"]>; + 'selectionModeChanged': JetElementCustomEvent["selectionMode"]>; + 'sizeLabelChanged': JetElementCustomEvent["sizeLabel"]>; + 'sortingChanged': JetElementCustomEvent["sorting"]>; + 'tooltipChanged': JetElementCustomEvent["tooltip"]>; + 'touchResponseChanged': JetElementCustomEvent["touchResponse"]>; +} +export interface ojTreemapSettableProperties extends dvtBaseComponentSettableProperties { + animationDuration: number; + animationOnDataChange: 'auto' | 'none'; + animationOnDisplay: 'auto' | 'none'; + animationUpdateColor: string; + as: string; + colorLabel: string; + data: DataProvider | null; + displayLevels: number; + drilling: 'on' | 'off'; + groupGaps: 'all' | 'none' | 'outer'; + hiddenCategories: string[]; + highlightMatch: 'any' | 'all'; + highlightedCategories: string[]; + hoverBehavior: 'dim' | 'none'; + hoverBehaviorDelay: number; + isolatedNode: any; + layout: 'sliceAndDiceHorizontal' | 'sliceAndDiceVertical' | 'squarified'; + nodeContent: { + renderer: ((context: ojTreemap.NodeContentContext) => ({ + insert: Element | string; + })); + }; + nodeDefaults: { + groupLabelDisplay: 'node' | 'off' | 'header'; + header: { + backgroundColor: string; + borderColor: string; + hoverBackgroundColor: string; + hoverInnerColor: string; + hoverOuterColor: string; + isolate: 'off' | 'on'; + labelHalign: 'center' | 'end' | 'start'; + labelStyle: object; + selectedBackgroundColor: string; + selectedInnerColor: string; + selectedOuterColor: string; + useNodeColor: 'on' | 'off'; + }; + hoverColor: string; + labelDisplay: 'off' | 'node'; + labelHalign: 'start' | 'end' | 'center'; + labelMinLength: number; + labelStyle: object; + labelValign: 'top' | 'bottom' | 'center'; + selectedInnerColor: string; + selectedOuterColor: string; + }; + nodeSeparators: 'bevels' | 'gaps'; + rootNode: any; + selection: any[]; + selectionMode: 'none' | 'single' | 'multiple'; + sizeLabel: string; + sorting: 'on' | 'off'; + tooltip: { + renderer: ((context: ojTreemap.TooltipContext) => ({ + insert: Element | string; + } | { + preventDefault: boolean; + })); + }; + touchResponse: 'touchStart' | 'auto'; + translations: { + componentName?: string; + labelAndValue?: string; + labelClearSelection?: string; + labelColor?: string; + labelCountWithTotal?: string; + labelDataVisualization?: string; + labelInvalidData?: string; + labelNoData?: string; + labelSize?: string; + stateCollapsed?: string; + stateDrillable?: string; + stateExpanded?: string; + stateHidden?: string; + stateIsolated?: string; + stateMaximized?: string; + stateMinimized?: string; + stateSelected?: string; + stateUnselected?: string; + stateVisible?: string; + tooltipIsolate?: string; + tooltipRestore?: string; + }; +} +export interface ojTreemapSettablePropertiesLenient extends Partial> { + [key: string]: any; +} +export interface ojTreemapNode extends JetElement { + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupLabelDisplay?: 'node' | 'off' | 'header'; + header?: { + isolate?: 'off' | 'on'; + labelHalign?: 'center' | 'end' | 'start'; + labelStyle?: object; + useNodeColor?: 'on' | 'off'; + }; + label?: string; + labelDisplay?: 'off' | 'node'; + labelHalign?: 'start' | 'end' | 'center'; + labelStyle?: object; + labelValign?: 'top' | 'bottom' | 'center'; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + selectable?: 'off' | 'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; + onCategoriesChanged: ((event: JetElementCustomEvent) => any) | null; + onColorChanged: ((event: JetElementCustomEvent) => any) | null; + onDrillingChanged: ((event: JetElementCustomEvent) => any) | null; + onGroupLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onHeaderChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelDisplayChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelHalignChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onLabelValignChanged: ((event: JetElementCustomEvent) => any) | null; + onPatternChanged: ((event: JetElementCustomEvent) => any) | null; + onSelectableChanged: ((event: JetElementCustomEvent) => any) | null; + onShortDescChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgClassNameChanged: ((event: JetElementCustomEvent) => any) | null; + onSvgStyleChanged: ((event: JetElementCustomEvent) => any) | null; + onValueChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojTreemapNodeEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojTreemapNode[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojTreemapNodeSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojTreemapNodeSettablePropertiesLenient): void; +} +export interface ojTreemapNodeEventMap extends HTMLElementEventMap { + 'categoriesChanged': JetElementCustomEvent; + 'colorChanged': JetElementCustomEvent; + 'drillingChanged': JetElementCustomEvent; + 'groupLabelDisplayChanged': JetElementCustomEvent; + 'headerChanged': JetElementCustomEvent; + 'labelChanged': JetElementCustomEvent; + 'labelDisplayChanged': JetElementCustomEvent; + 'labelHalignChanged': JetElementCustomEvent; + 'labelStyleChanged': JetElementCustomEvent; + 'labelValignChanged': JetElementCustomEvent; + 'patternChanged': JetElementCustomEvent; + 'selectableChanged': JetElementCustomEvent; + 'shortDescChanged': JetElementCustomEvent; + 'svgClassNameChanged': JetElementCustomEvent; + 'svgStyleChanged': JetElementCustomEvent; + 'valueChanged': JetElementCustomEvent; +} +export interface ojTreemapNodeSettableProperties extends JetSettableProperties { + categories?: string[]; + color?: string; + drilling?: 'on' | 'off' | 'inherit'; + groupLabelDisplay?: 'node' | 'off' | 'header'; + header?: { + isolate?: 'off' | 'on'; + labelHalign?: 'center' | 'end' | 'start'; + labelStyle?: object; + useNodeColor?: 'on' | 'off'; + }; + label?: string; + labelDisplay?: 'off' | 'node'; + labelHalign?: 'start' | 'end' | 'center'; + labelStyle?: object; + labelValign?: 'top' | 'bottom' | 'center'; + pattern?: 'smallChecker' | 'smallCrosshatch' | 'smallDiagonalLeft' | 'smallDiagonalRight' | 'smallDiamond' | 'smallTriangle' | 'largeChecker' | 'largeCrosshatch' | 'largeDiagonalLeft' | + 'largeDiagonalRight' | 'largeDiamond' | 'largeTriangle' | 'none'; + selectable?: 'off' | 'auto'; + shortDesc?: string; + svgClassName?: string; + svgStyle?: object; + value: number; +} +export interface ojTreemapNodeSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/ojvalidation-base/index.d.ts b/types/oraclejet/ojvalidation-base/index.d.ts new file mode 100644 index 0000000000..83a20555db --- /dev/null +++ b/types/oraclejet/ojvalidation-base/index.d.ts @@ -0,0 +1,144 @@ +import Message = require('../ojmessaging'); +import Color = require('../ojcolor'); +export interface AsyncValidator { + hint: Promise; + validate(value: V): Promise; +} +export class ColorConverter implements Converter { + constructor(options?: ColorConverter.ConverterOptions); + format(color: Color): string | null; + getHint(): string; + parse(value: string): Color; + resolvedOptions(): ColorConverter.ConverterOptions; +} +export namespace ColorConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + format?: 'rgb' | 'hsl' | 'hsv' | 'hex' | 'hex3'; + }; +} +export interface ColorConverterFactory { + createConverter(options?: ColorConverter.ConverterOptions): ColorConverter; +} +export interface Converter { + format(value: V): string | null; + getHint?(): string | null; + getOptions?(): object; + parse(value: string): V | null; + resolvedOptions?(): object; +} +export interface ConverterError { + // constructor(summary: string, detail: string); + getMessage(): Message; +} +export interface ConverterFactory { + // static CONVERTER_TYPE_COLOR: string; + // static CONVERTER_TYPE_DATETIME: string; + // static CONVERTER_TYPE_NUMBER: string; + createConverter(options: object | null): Converter; +} +export namespace IntlConverterUtils { + function dateToLocalIso(date: Date): string; + function getConverterInstance(converterOption: string | Validation.RegisteredConverter | Converter): Converter | null; + function getInitials(firstName?: string, lastName?: string): string | undefined; + function getLocalTimeZoneOffset(): string; + function isoToDate(isoString: string): Date; + function isoToLocalDate(isoString: string): Date; +} +export class LengthValidator implements Validator { + static defaults: { + countBy: string; + }; + constructor(options?: LengthValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace LengthValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + countBy?: 'codeUnit' | 'codePoint'; + min?: number; + max?: number; + hint?: { + max?: string; + min?: string; + inRange?: string; + exact?: string; + }; + messageDetail?: { + tooLong?: string; + tooShort?: string; + }; + messageSummary?: { + tooLong?: string; + tooShort?: string; + }; + }; +} +export interface LengthValidatorFactory { + createValidator(options?: LengthValidator.ValidatorOptions): LengthValidator; +} +export class RegExpValidator implements Validator { + constructor(options?: RegExpValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace RegExpValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + pattern?: string; + hint?: string; + messageSummary?: string; + messageDetail?: string; + }; +} +export interface RegExpValidatorFactory { + createValidator(options: RegExpValidator.ValidatorOptions): RegExpValidator; +} +export class RequiredValidator implements Validator { + constructor(options?: RequiredValidator.ValidatorOptions); + getHint(): string | null; + validate(value: object | string | number): void; +} +export namespace RequiredValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + hint?: string; + messageSummary?: string; + messageDetail?: string; + }; +} +export interface RequiredValidatorFactory { + createValidator(options?: RequiredValidator.ValidatorOptions): RequiredValidator; +} +export namespace Validation { + function converterFactory>(type: 'number' | 'color' | 'datetime' | string, instance?: CF): CF | null; + function validatorFactory>(type: 'required' | 'regexp' | 'numberRange' | 'length' | 'dateTimeRange' | 'dateRestriction' | string, instance?: VF): VF | null; + // tslint:disable-next-line interface-over-type-literal + type RegisteredConverter = { + type: string; + options?: object; + }; + // tslint:disable-next-line interface-over-type-literal + type RegisteredValidator = { + type: string; + options?: object; + }; +} +export interface Validator { + getHint?(): string | null; + validate(value: V): void; +} +export interface ValidatorError { + // constructor(summary: string, detail: string); + getMessage(): Message; +} +export interface ValidatorFactory { + // static VALIDATOR_TYPE_DATERESTRICTION: string; + // static VALIDATOR_TYPE_DATETIMERANGE: string; + // static VALIDATOR_TYPE_LENGTH: string; + // static VALIDATOR_TYPE_NUMBERRANGE: string; + // static VALIDATOR_TYPE_REGEXP: string; + // static VALIDATOR_TYPE_REQUIRED: string; + createValidator(options: object | null): Validator; +} diff --git a/types/oraclejet/ojvalidation-datetime/index.d.ts b/types/oraclejet/ojvalidation-datetime/index.d.ts new file mode 100644 index 0000000000..976969a002 --- /dev/null +++ b/types/oraclejet/ojvalidation-datetime/index.d.ts @@ -0,0 +1,130 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +export class DateRestrictionValidator implements Validator { + constructor(options?: DateRestrictionValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string): void; +} +export namespace DateRestrictionValidator { + // tslint:disable-next-line interface-over-type-literal + type DayFormatterInput = { + fullYear: number; + month: number; + date: number; + }; + // tslint:disable-next-line interface-over-type-literal + type DayFormatterOutput = { + disabled?: boolean; + className?: string; + tooltip?: string; + }; + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + dayFormatter?: ((param0: DayFormatterInput) => DayFormatterOutput | null | 'all'); + messageSummary?: string; + messageDetail?: string; + }; +} +export interface DateRestrictionValidatorFactory { + createValidator(options?: DateRestrictionValidator.ValidatorOptions): DateRestrictionValidator; +} +export abstract class DateTimeConverter implements Converter { + abstract calculateWeek(value: string): number | undefined; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string | null; + getAvailableTimeZones(): any[]; + abstract isDayNameSet(): boolean; + abstract isDaySet(): boolean; + abstract isHourInAMPMSet(): boolean; + abstract isHourInDaySet(): boolean; + abstract isMilliSecondSet(): boolean; + abstract isMinuteSet(): boolean; + abstract isMonthSet(): boolean; + abstract isSecondSet(): boolean; + abstract isYearSet(): boolean; + parse(value: string): string | null; +} +export interface DateTimeConverterFactory { + createConverter(options?: IntlDateTimeConverter.ConverterOptions): IntlDateTimeConverter; +} +export class DateTimeRangeValidator implements Validator { + constructor(options?: DateTimeRangeValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string): void; +} +export namespace DateTimeRangeValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + converter: DateTimeConverter; + min?: string; + max?: string; + hint?: { + max?: string; + min?: string; + inRange?: string; + }; + translationKey?: string; + messageDetail?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + messageSummary?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + }; +} +export interface DateTimeRangeValidatorFactory { + createValidator(options?: DateTimeRangeValidator.ValidatorOptions): DateTimeRangeValidator; +} +export class IntlDateTimeConverter extends DateTimeConverter { + constructor(options?: IntlDateTimeConverter.ConverterOptions); + calculateWeek(value: string): number; + compareISODates(isoStr: string, isoStr2: string): number; + format(value: string): string | null; + formatRelative(value: string, relativeOptions?: { + formatUsing?: string; + dateField?: string; + relativeTime?: string; + dateOnly?: boolean; + timeZone?: string; + }): string | null; + getAvailableTimeZones(): any[]; + getHint(): null; + getOptions(): IntlDateTimeConverter.ConverterOptions; + isDayNameSet(): boolean; + isDaySet(): boolean; + isHourInAMPMSet(): boolean; + isHourInDaySet(): boolean; + isMilliSecondSet(): boolean; + isMinuteSet(): boolean; + isMonthSet(): boolean; + isSecondSet(): boolean; + isYearSet(): boolean; + parse(value: string): string | null; + resolvedOptions(): IntlDateTimeConverter.ConverterOptions; +} +export namespace IntlDateTimeConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + year?: '2-digit' | 'numeric'; + 'two-digit-year-start'?: number; + month?: '2-digit' | 'numeric' | 'narrow' | 'short' | 'long'; + day?: '2-digit' | 'numeric'; + hour?: '2-digit' | 'numeric'; + minute?: '2-digit' | 'numeric'; + second?: '2-digit' | 'numeric'; + millisecond?: 'numeric'; + weekday?: 'narrow' | 'short' | 'long'; + era?: 'narrow' | 'short' | 'long'; + timeZoneName?: 'short' | 'long'; + timeZone?: string; + isoStrFormat?: 'offset' | 'zulu' | 'local' | 'auto'; + dst?: boolean; + hour12?: boolean; + pattern?: string; + formatType?: 'date' | 'time' | 'datetime'; + dateFormat?: 'short' | 'medium' | 'long' | 'full'; + timeFormat?: 'short' | 'medium' | 'long' | 'full'; + lenientParse?: 'full' | 'none'; + }; +} diff --git a/types/oraclejet/ojvalidation-number/index.d.ts b/types/oraclejet/ojvalidation-number/index.d.ts new file mode 100644 index 0000000000..09addc6522 --- /dev/null +++ b/types/oraclejet/ojvalidation-number/index.d.ts @@ -0,0 +1,67 @@ +import { Converter, Validator, Validation } from '../ojvalidation-base'; +export class IntlNumberConverter extends NumberConverter { + constructor(options?: IntlNumberConverter.ConverterOptions); + format(value: number): string; + getHint(): null; + getOptions(): IntlNumberConverter.ConverterOptions; + parse(value: string): number | null; + resolvedOptions(): IntlNumberConverter.ConverterOptions; +} +export namespace IntlNumberConverter { + // tslint:disable-next-line interface-over-type-literal + type ConverterOptions = { + style?: 'decimal' | 'currency' | 'percent' | 'unit'; + currency?: string; + unit?: 'byte' | 'bit'; + currencyDisplay?: 'code' | 'symbol' | 'name'; + decimalFormat?: 'standard' | 'short' | 'long'; + currencyFormat?: 'standard' | 'short' | 'long'; + minimumIntegerDigits?: number; + minimumFractionDigits?: number; + maximumFractionDigits?: number; + useGrouping?: boolean; + pattern?: string; + roundingMode?: 'HALF_UP' | 'HALF_DOWN' | 'HALF_EVEN'; + roundDuringParse?: boolean; + separators?: object; + lenientParse?: 'full' | 'none'; + }; +} +export class NumberConverter implements Converter { + format(value: number): string | null; + parse(value: string): number | null; +} +export interface NumberConverterFactory { + createConverter(options?: IntlNumberConverter.ConverterOptions): IntlNumberConverter; +} +export class NumberRangeValidator implements Validator { + constructor(options?: NumberRangeValidator.ValidatorOptions); + getHint(): string | null; + validate(value: string | number): void; +} +export namespace NumberRangeValidator { + // tslint:disable-next-line interface-over-type-literal + type ValidatorOptions = { + converter?: NumberConverter; + min?: number; + max?: number; + hint?: { + max?: string; + min?: string; + inRange?: string; + exact?: string; + }; + messageDetail?: { + rangeUnderflow?: string; + rangeOverflow?: string; + exact?: string; + }; + messageSummary?: { + rangeUnderflow?: string; + rangeOverflow?: string; + }; + }; +} +export interface NumberRangeValidatorFactory { + createValidator(options?: NumberRangeValidator.ValidatorOptions): NumberRangeValidator; +} diff --git a/types/oraclejet/ojvalidationgroup/index.d.ts b/types/oraclejet/ojvalidationgroup/index.d.ts new file mode 100644 index 0000000000..e5dceb249a --- /dev/null +++ b/types/oraclejet/ojvalidationgroup/index.d.ts @@ -0,0 +1,23 @@ +import { JetElement, JetSettableProperties, JetElementCustomEvent, JetSetPropertyType } from '..'; +export interface ojValidationGroup extends JetElement { + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; + onValidChanged: ((event: JetElementCustomEvent) => any) | null; + addEventListener(type: T, listener: (this: HTMLElement, ev: ojValidationGroupEventMap[T]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + getProperty(property: T): ojValidationGroup[T]; + getProperty(property: string): any; + setProperty(property: T, value: ojValidationGroupSettableProperties[T]): void; + setProperty(property: T, value: JetSetPropertyType): void; + setProperties(properties: ojValidationGroupSettablePropertiesLenient): void; + focusOn(key?: '@firstInvalidShown'): void; + showMessages(): void; +} +export interface ojValidationGroupEventMap extends HTMLElementEventMap { + 'validChanged': JetElementCustomEvent; +} +export interface ojValidationGroupSettableProperties extends JetSettableProperties { + readonly valid: 'valid' | 'pending' | 'invalidHidden' | 'invalidShown'; +} +export interface ojValidationGroupSettablePropertiesLenient extends Partial { + [key: string]: any; +} diff --git a/types/oraclejet/test.ts b/types/oraclejet/test.ts new file mode 100644 index 0000000000..265c0d4856 --- /dev/null +++ b/types/oraclejet/test.ts @@ -0,0 +1,113 @@ +// Since all the definitions are auto generated from jsdoc doclets and internally tested through application, +// add some basic tests here. +import { ojAccordion } from "oraclejet/ojaccordion"; +import AnimationUtils = require("oraclejet/ojanimation"); +import ArrayDataProvider = require("oraclejet/ojarraydataprovider"); +import ArrayTreeDataProvider = require("oraclejet/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'oraclejet/ojattributegrouphandler'; +import { ojAvatar } from "oraclejet/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "oraclejet/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "oraclejet/ojchart"; +import { ojCheckboxset } from "oraclejet/ojcheckboxset"; +import { ojCollapsible } from "oraclejet/ojcollapsible"; +import CollectionDataprovider = require("oraclejet/ojcollectiondataprovider"); +import Color = require("oraclejet/ojcolor"); +import { ojColorPalette } from "oraclejet/ojcolorpalette"; +import { ojColorSpectrum } from "oraclejet/ojcolorspectrum"; +import Components = require("oraclejet/ojcomponentcore"); +import Composite = require("oraclejet/ojcomposite"); +import Config = require('oraclejet/ojconfig'); +import Context = require("oraclejet/ojcontext"); +import { ojConveyorBelt } from "oraclejet/ojconveyorbelt"; +import { ojDataGrid } from "oraclejet/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "oraclejet/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "oraclejet/ojdatetimepicker"; +import { ojDefer } from "oraclejet/ojdefer"; +import DeferredDataprovider = require("oraclejet/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "oraclejet/ojdiagram"; +import { ojDialog } from "oraclejet/ojdialog"; +import { dvtBaseComponent } from "oraclejet/ojdvt-base"; +import { editableValue } from "oraclejet/ojeditablevalue"; +import ExpressionUtils = require('oraclejet/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "oraclejet/ojfilepicker"; +import { ojFilmStrip } from "oraclejet/ojfilmstrip"; +import { ojFormLayout } from "oraclejet/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "oraclejet/ojgantt"; +import GanttUtils = require ('oraclejet/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "oraclejet/ojgauge"; +import { ojInputNumber } from "oraclejet/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "oraclejet/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "oraclejet/ojkeyset"; +import { ObservableExpandedKeySet } from "oraclejet/ojknockout-keyset"; +import KnockoutUtils = require("oraclejet/ojknockout-model"); +import KnockoutTemplateUtils = require('oraclejet/ojknockouttemplateutils'); +import { ojLabel } from "oraclejet/ojlabel"; +import { ojLabelValue } from "oraclejet/ojlabelvalue"; +import { ojLegend } from "oraclejet/ojlegend"; +import ListDataProviderView = require("oraclejet/ojlistdataproviderview"); +import { ojListView } from "oraclejet/ojlistview"; +import LocaleData = require('oraclejet/ojlocaledata'); +import Logger = require('oraclejet/ojlogger'); +import { ojMasonryLayout } from "oraclejet/ojmasonrylayout"; +import { ojMenu } from "oraclejet/ojmenu"; +import { ojMenuSelectMany } from "oraclejet/ojmenuselectmany"; +import { ojMessages } from "oraclejet/ojmessages"; +import { ojMessage } from "oraclejet/ojmessage"; +import Message = require("oraclejet/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "oraclejet/ojmodel"; +import { ojModule } from "oraclejet/ojmodule-element"; +import ModuleElementUtils = require("oraclejet/ojmodule-element-utils"); +import ModuleAnimations = require("oraclejet/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "oraclejet/ojnavigationlist"; +import { ojNBox } from "oraclejet/ojnbox"; +import { ojOptgroup } from "oraclejet/ojoptgroup"; +import { ojOption } from "oraclejet/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "oraclejet/ojpictochart"; +import { ojPopup } from "oraclejet/ojpopup"; +import { ojProgress } from "oraclejet/ojprogress"; +import { ojProgressList, ProgressItem } from "oraclejet/ojprogresslist"; +import PullToRefreshUtils = require("oraclejet/ojpulltorefresh"); +import { ojRadioset } from "oraclejet/ojradioset"; +import { ojRefresher } from "oraclejet/ojrefresher"; +import ResponsiveKnockoutUtils = require('oraclejet/ojresponsiveknockoututils'); +import ResponsiveUtils = require('oraclejet/ojresponsiveutils'); +import Router = require("oraclejet/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "oraclejet/ojselectcombobox"; +import { ojSlider } from "oraclejet/ojslider"; +import { ojSunburst } from "oraclejet/ojsunburst"; +import { ojSwipeActions } from "oraclejet/ojswipeactions"; +import SwipeToRevealUtils = require("oraclejet/ojswipetoreveal"); +import { ojSwitch } from "oraclejet/ojswitch"; +import { ojSwitcher } from "oraclejet/ojswitcher"; +import { ojTable } from "oraclejet/ojtable"; +import { ojTagCloud } from "oraclejet/ojtagcloud"; +import { ojThematicMap } from "oraclejet/ojthematicmap"; +import ThemeUtils = require('oraclejet/ojthemeutils'); +import { dvtTimeComponent } from "oraclejet/ojtime-base"; +import { ojTimeAxis } from "oraclejet/ojtimeaxis"; +import TimeUtils = require("oraclejet/ojtimeutils"); +import { ojToolbar } from "oraclejet/ojtoolbar"; +import { ojTrain } from "oraclejet/ojtrain"; +import Translations = require("oraclejet/ojtranslation"); +import TreeDataProvider = require("oraclejet/ojtreedataprovider"); +import { ojTreemap } from "oraclejet/ojtreemap"; +import { Validation, Validator, ValidatorError, ValidatorFactory, + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "oraclejet/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "oraclejet/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "oraclejet/ojvalidation-number"; +import { ojValidationGroup } from "oraclejet/ojvalidationgroup"; + +const onChangedCallback = (event: CustomEvent) => { +}; +const myHTMLElement = document.getElementById('myelement'); +const accordionElement = myHTMLElement as ojAccordion; +accordionElement.multiple = true; +accordionElement.onMultipleChanged = onChangedCallback; + +const avatarElement = myHTMLElement as ojAvatar; +avatarElement.size = "xxs"; +avatarElement.set("initials", "I"); +avatarElement.unset("src"); + +const button = myHTMLElement as ojButtonsetOne; +button.chroming = 'half'; diff --git a/types/@oracle/tsconfig.json b/types/oraclejet/tsconfig.json similarity index 68% rename from types/@oracle/tsconfig.json rename to types/oraclejet/tsconfig.json index 812f56815d..ec0aacc788 100644 --- a/types/@oracle/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -1,20 +1,23 @@ { "compileOnSave": true, "compilerOptions": { - "module": "amd", + "module": "commonjs", "lib": ["dom","es5","scripthost", "es2015.core","es2015.collection","es2015","esnext.asynciterable"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "types": ["knockout"], + "types": [], "forceConsistentCasingInFileNames": true, "noEmit": true, "target": "es5", - "typeRoots": ["../","./oraclejet/","./oraclejet/ojs/"] + "baseUrl": "../", + "typeRoots": [ + "../" + ] }, "include": [ - "/tests/oraclejet/@oraclejet-tests.ts", - "./oraclejet/**/*" + "/test.ts", + "./**/*" ] } \ No newline at end of file diff --git a/types/oraclejet/tslint.json b/types/oraclejet/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/oraclejet/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 3748e4ecbf9ac5489708e661b03b6bd304670480 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 19:34:08 -0700 Subject: [PATCH 0014/2268] npm test fail fix --- types/oraclejet/tsconfig.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index ec0aacc788..bd455a55c1 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -15,9 +15,5 @@ "typeRoots": [ "../" ] - }, - "include": [ - "/test.ts", - "./**/*" - ] + } } \ No newline at end of file From e0149686eb0f9be448e59ea917039e732189bd74 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:16:07 -0700 Subject: [PATCH 0015/2268] fix npm test error --- types/oraclejet/tsconfig.json | 101 +++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index bd455a55c1..fc0ac3ac23 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -15,5 +15,104 @@ "typeRoots": [ "../" ] - } + }, + "files": [ + "test.ts", + "index.d.ts", + "ojaccordion/index.d.ts", + "ojanimation/index.d.ts", + "ojarraydataprovider/index.d.ts", + "ojarraytreedataprovider/index.d.ts", + "ojattributegrouphandler/index.d.ts", + "ojavatar/index.d.ts", + "ojbutton/index.d.ts", + "ojchart/index.d.ts", + "ojcheckboxset/index.d.ts", + "ojcollapsible/index.d.ts", + "ojcollectiondataprovider/index.d.ts", + "ojcolor/index.d.ts", + "ojcolorpalette/index.d.ts", + "ojcolorspectrum/index.d.ts", + "ojcomponentcore/index.d.ts", + "ojcomposite/index.d.ts", + "ojconfig/index.d.ts", + "ojcontext/index.d.ts", + "ojconveyorbelt/index.d.ts", + "ojdatagrid/index.d.ts", + "ojdataprovider/index.d.ts", + "ojdatetimepicker/index.d.ts", + "ojdefer/index.d.ts", + "ojdeferreddataprovider/index.d.ts", + "ojdiagram/index.d.ts", + "ojdialog/index.d.ts", + "ojdvt-base/index.d.ts", + "ojeditablevalue/index.d.ts", + "ojexpressionutils/index.d.ts", + "ojfilepicker/index.d.ts", + "ojfilmstrip/index.d.ts", + "ojformlayout/index.d.ts", + "ojgantt/index.d.ts", + "ojganttutils/index.d.ts", + "ojgauge/index.d.ts", + "ojinputnumber/index.d.ts", + "ojinputtext/index.d.ts", + "ojkeyset/index.d.ts", + "ojknockout-keyset/index.d.ts", + "ojknockout-model/index.d.ts", + "ojknockouttemplateutils/index.d.ts", + "ojlabel/index.d.ts", + "ojlabelvalue/index.d.ts", + "ojlegend/index.d.ts", + "ojlistdataproviderview/index.d.ts", + "ojlistview/index.d.ts", + "ojlocaledata/index.d.ts", + "ojlogger/index.d.ts", + "ojmasonrylayout/index.d.ts", + "ojmenu/index.d.ts", + "ojmenuselectmany/index.d.ts", + "ojmessage/index.d.ts", + "ojmessages/index.d.ts", + "ojmessaging/index.d.ts", + "ojmodel/index.d.ts", + "ojmodule-element/index.d.ts", + "ojmodule-element-utils/index.d.ts", + "ojmoduleanimations/index.d.ts", + "ojnavigationlist/index.d.ts", + "ojnbox/index.d.ts", + "ojoptgroup/index.d.ts", + "ojoption/index.d.ts", + "ojpictochart/index.d.ts", + "ojpopup/index.d.ts", + "ojprogress/index.d.ts", + "ojprogresslist/index.d.ts", + "ojpulltorefresh/index.d.ts", + "ojradioset/index.d.ts", + "ojrefresher/index.d.ts", + "ojresponsiveknockoututils/index.d.ts", + "ojresponsiveutils/index.d.ts", + "ojrouter/index.d.ts", + "ojselectcombobox/index.d.ts", + "ojslider/index.d.ts", + "ojsunburst/index.d.ts", + "ojswipeactions/index.d.ts", + "ojswipetoreveal/index.d.ts", + "ojswitch/index.d.ts", + "ojswitcher/index.d.ts", + "ojtable/index.d.ts", + "ojtagcloud/index.d.ts", + "ojthematicmap/index.d.ts", + "ojthemeutils/index.d.ts", + "ojtime-base/index.d.ts", + "ojtimeaxis/index.d.ts", + "ojtimeutils/index.d.ts", + "ojtoolbar/index.d.ts", + "ojtrain/index.d.ts", + "ojtranslation/index.d.ts", + "ojtreedataprovider/index.d.ts", + "ojtreemap/index.d.ts", + "ojvalidation-base/index.d.ts", + "ojvalidation-datetime/index.d.ts", + "ojvalidation-number/index.d.ts", + "ojvalidationgroup/index.d.ts" + ] } \ No newline at end of file From 9ec87fc09a4292fd38029de16e898320e72acc71 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:24:04 -0700 Subject: [PATCH 0016/2268] fix npm test --- types/oraclejet/{test.ts => oraclejetTests.ts} | 0 types/oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oraclejet/{test.ts => oraclejetTests.ts} (100%) diff --git a/types/oraclejet/test.ts b/types/oraclejet/oraclejetTests.ts similarity index 100% rename from types/oraclejet/test.ts rename to types/oraclejet/oraclejetTests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index fc0ac3ac23..3cecf0fb1d 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "test.ts", + "oraclejetTests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From aac14f48d35b44015170cfd4e97d8d10e3fbcf10 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:25:34 -0700 Subject: [PATCH 0017/2268] fix npm test --- types/oraclejet/{oraclejetTests.ts => oraclejet-tests.ts} | 0 types/oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oraclejet/{oraclejetTests.ts => oraclejet-tests.ts} (100%) diff --git a/types/oraclejet/oraclejetTests.ts b/types/oraclejet/oraclejet-tests.ts similarity index 100% rename from types/oraclejet/oraclejetTests.ts rename to types/oraclejet/oraclejet-tests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oraclejet/tsconfig.json index 3cecf0fb1d..e914883a1c 100644 --- a/types/oraclejet/tsconfig.json +++ b/types/oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "oraclejetTests.ts", + "oraclejet-tests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From 9ce6b338d104bee241beceae99f488ea416ea011 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:57:31 -0700 Subject: [PATCH 0018/2268] test. move to scoped --- types/{oraclejet => oracle__oraclejet}/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojaccordion/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojanimation/index.d.ts | 0 .../ojarraydataprovider/index.d.ts | 0 .../ojarraytreedataprovider/index.d.ts | 0 .../ojattributegrouphandler/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojavatar/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojbutton/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojchart/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcheckboxset/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcollapsible/index.d.ts | 0 .../ojcollectiondataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolor/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolorpalette/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcolorspectrum/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcomponentcore/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcomposite/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojconfig/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojcontext/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojconveyorbelt/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdatagrid/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdataprovider/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojdatetimepicker/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdefer/index.d.ts | 0 .../ojdeferreddataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdiagram/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdialog/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojdvt-base/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojeditablevalue/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojexpressionutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojfilepicker/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojfilmstrip/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojformlayout/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojgantt/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojganttutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojgauge/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojinputnumber/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojinputtext/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojkeyset/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojknockout-keyset/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojknockout-model/index.d.ts | 0 .../ojknockouttemplateutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlabel/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlabelvalue/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlegend/index.d.ts | 0 .../ojlistdataproviderview/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlistview/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlocaledata/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojlogger/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmasonrylayout/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmenu/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojmenuselectmany/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessage/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessages/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmessaging/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojmodel/index.d.ts | 0 .../ojmodule-element-utils/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojmodule-element/index.d.ts | 0 .../ojmoduleanimations/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojnavigationlist/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojnbox/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojoptgroup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojoption/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpictochart/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpopup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojprogress/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojprogresslist/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojpulltorefresh/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojradioset/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojrefresher/index.d.ts | 0 .../ojresponsiveknockoututils/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojresponsiveutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojrouter/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojselectcombobox/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojslider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojsunburst/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswipeactions/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswipetoreveal/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswitch/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojswitcher/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtable/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtagcloud/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojthematicmap/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojthemeutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtime-base/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtimeaxis/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtimeutils/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtoolbar/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtrain/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtranslation/index.d.ts | 0 .../ojtreedataprovider/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/ojtreemap/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojvalidation-base/index.d.ts | 0 .../ojvalidation-datetime/index.d.ts | 0 .../ojvalidation-number/index.d.ts | 0 .../{oraclejet => oracle__oraclejet}/ojvalidationgroup/index.d.ts | 0 types/{oraclejet => oracle__oraclejet}/oraclejet-tests.ts | 0 types/{oraclejet => oracle__oraclejet}/tsconfig.json | 0 types/{oraclejet => oracle__oraclejet}/tslint.json | 0 99 files changed, 0 insertions(+), 0 deletions(-) rename types/{oraclejet => oracle__oraclejet}/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojaccordion/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojanimation/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojarraydataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojarraytreedataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojattributegrouphandler/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojavatar/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojbutton/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojchart/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcheckboxset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcollapsible/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcollectiondataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolor/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolorpalette/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcolorspectrum/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcomponentcore/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcomposite/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojconfig/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojcontext/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojconveyorbelt/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdatagrid/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdatetimepicker/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdefer/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdeferreddataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdiagram/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdialog/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojdvt-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojeditablevalue/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojexpressionutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojfilepicker/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojfilmstrip/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojformlayout/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojgantt/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojganttutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojgauge/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojinputnumber/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojinputtext/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojkeyset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockout-keyset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockout-model/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojknockouttemplateutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlabel/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlabelvalue/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlegend/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlistdataproviderview/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlistview/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlocaledata/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojlogger/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmasonrylayout/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmenu/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmenuselectmany/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessage/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessages/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmessaging/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodel/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodule-element-utils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmodule-element/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojmoduleanimations/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojnavigationlist/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojnbox/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojoptgroup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojoption/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpictochart/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpopup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojprogress/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojprogresslist/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojpulltorefresh/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojradioset/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojrefresher/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojresponsiveknockoututils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojresponsiveutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojrouter/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojselectcombobox/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojslider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojsunburst/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswipeactions/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswipetoreveal/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswitch/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojswitcher/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtable/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtagcloud/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojthematicmap/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojthemeutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtime-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtimeaxis/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtimeutils/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtoolbar/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtrain/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtranslation/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtreedataprovider/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojtreemap/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-base/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-datetime/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidation-number/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/ojvalidationgroup/index.d.ts (100%) rename types/{oraclejet => oracle__oraclejet}/oraclejet-tests.ts (100%) rename types/{oraclejet => oracle__oraclejet}/tsconfig.json (100%) rename types/{oraclejet => oracle__oraclejet}/tslint.json (100%) diff --git a/types/oraclejet/index.d.ts b/types/oracle__oraclejet/index.d.ts similarity index 100% rename from types/oraclejet/index.d.ts rename to types/oracle__oraclejet/index.d.ts diff --git a/types/oraclejet/ojaccordion/index.d.ts b/types/oracle__oraclejet/ojaccordion/index.d.ts similarity index 100% rename from types/oraclejet/ojaccordion/index.d.ts rename to types/oracle__oraclejet/ojaccordion/index.d.ts diff --git a/types/oraclejet/ojanimation/index.d.ts b/types/oracle__oraclejet/ojanimation/index.d.ts similarity index 100% rename from types/oraclejet/ojanimation/index.d.ts rename to types/oracle__oraclejet/ojanimation/index.d.ts diff --git a/types/oraclejet/ojarraydataprovider/index.d.ts b/types/oracle__oraclejet/ojarraydataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojarraydataprovider/index.d.ts rename to types/oracle__oraclejet/ojarraydataprovider/index.d.ts diff --git a/types/oraclejet/ojarraytreedataprovider/index.d.ts b/types/oracle__oraclejet/ojarraytreedataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojarraytreedataprovider/index.d.ts rename to types/oracle__oraclejet/ojarraytreedataprovider/index.d.ts diff --git a/types/oraclejet/ojattributegrouphandler/index.d.ts b/types/oracle__oraclejet/ojattributegrouphandler/index.d.ts similarity index 100% rename from types/oraclejet/ojattributegrouphandler/index.d.ts rename to types/oracle__oraclejet/ojattributegrouphandler/index.d.ts diff --git a/types/oraclejet/ojavatar/index.d.ts b/types/oracle__oraclejet/ojavatar/index.d.ts similarity index 100% rename from types/oraclejet/ojavatar/index.d.ts rename to types/oracle__oraclejet/ojavatar/index.d.ts diff --git a/types/oraclejet/ojbutton/index.d.ts b/types/oracle__oraclejet/ojbutton/index.d.ts similarity index 100% rename from types/oraclejet/ojbutton/index.d.ts rename to types/oracle__oraclejet/ojbutton/index.d.ts diff --git a/types/oraclejet/ojchart/index.d.ts b/types/oracle__oraclejet/ojchart/index.d.ts similarity index 100% rename from types/oraclejet/ojchart/index.d.ts rename to types/oracle__oraclejet/ojchart/index.d.ts diff --git a/types/oraclejet/ojcheckboxset/index.d.ts b/types/oracle__oraclejet/ojcheckboxset/index.d.ts similarity index 100% rename from types/oraclejet/ojcheckboxset/index.d.ts rename to types/oracle__oraclejet/ojcheckboxset/index.d.ts diff --git a/types/oraclejet/ojcollapsible/index.d.ts b/types/oracle__oraclejet/ojcollapsible/index.d.ts similarity index 100% rename from types/oraclejet/ojcollapsible/index.d.ts rename to types/oracle__oraclejet/ojcollapsible/index.d.ts diff --git a/types/oraclejet/ojcollectiondataprovider/index.d.ts b/types/oracle__oraclejet/ojcollectiondataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojcollectiondataprovider/index.d.ts rename to types/oracle__oraclejet/ojcollectiondataprovider/index.d.ts diff --git a/types/oraclejet/ojcolor/index.d.ts b/types/oracle__oraclejet/ojcolor/index.d.ts similarity index 100% rename from types/oraclejet/ojcolor/index.d.ts rename to types/oracle__oraclejet/ojcolor/index.d.ts diff --git a/types/oraclejet/ojcolorpalette/index.d.ts b/types/oracle__oraclejet/ojcolorpalette/index.d.ts similarity index 100% rename from types/oraclejet/ojcolorpalette/index.d.ts rename to types/oracle__oraclejet/ojcolorpalette/index.d.ts diff --git a/types/oraclejet/ojcolorspectrum/index.d.ts b/types/oracle__oraclejet/ojcolorspectrum/index.d.ts similarity index 100% rename from types/oraclejet/ojcolorspectrum/index.d.ts rename to types/oracle__oraclejet/ojcolorspectrum/index.d.ts diff --git a/types/oraclejet/ojcomponentcore/index.d.ts b/types/oracle__oraclejet/ojcomponentcore/index.d.ts similarity index 100% rename from types/oraclejet/ojcomponentcore/index.d.ts rename to types/oracle__oraclejet/ojcomponentcore/index.d.ts diff --git a/types/oraclejet/ojcomposite/index.d.ts b/types/oracle__oraclejet/ojcomposite/index.d.ts similarity index 100% rename from types/oraclejet/ojcomposite/index.d.ts rename to types/oracle__oraclejet/ojcomposite/index.d.ts diff --git a/types/oraclejet/ojconfig/index.d.ts b/types/oracle__oraclejet/ojconfig/index.d.ts similarity index 100% rename from types/oraclejet/ojconfig/index.d.ts rename to types/oracle__oraclejet/ojconfig/index.d.ts diff --git a/types/oraclejet/ojcontext/index.d.ts b/types/oracle__oraclejet/ojcontext/index.d.ts similarity index 100% rename from types/oraclejet/ojcontext/index.d.ts rename to types/oracle__oraclejet/ojcontext/index.d.ts diff --git a/types/oraclejet/ojconveyorbelt/index.d.ts b/types/oracle__oraclejet/ojconveyorbelt/index.d.ts similarity index 100% rename from types/oraclejet/ojconveyorbelt/index.d.ts rename to types/oracle__oraclejet/ojconveyorbelt/index.d.ts diff --git a/types/oraclejet/ojdatagrid/index.d.ts b/types/oracle__oraclejet/ojdatagrid/index.d.ts similarity index 100% rename from types/oraclejet/ojdatagrid/index.d.ts rename to types/oracle__oraclejet/ojdatagrid/index.d.ts diff --git a/types/oraclejet/ojdataprovider/index.d.ts b/types/oracle__oraclejet/ojdataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojdataprovider/index.d.ts rename to types/oracle__oraclejet/ojdataprovider/index.d.ts diff --git a/types/oraclejet/ojdatetimepicker/index.d.ts b/types/oracle__oraclejet/ojdatetimepicker/index.d.ts similarity index 100% rename from types/oraclejet/ojdatetimepicker/index.d.ts rename to types/oracle__oraclejet/ojdatetimepicker/index.d.ts diff --git a/types/oraclejet/ojdefer/index.d.ts b/types/oracle__oraclejet/ojdefer/index.d.ts similarity index 100% rename from types/oraclejet/ojdefer/index.d.ts rename to types/oracle__oraclejet/ojdefer/index.d.ts diff --git a/types/oraclejet/ojdeferreddataprovider/index.d.ts b/types/oracle__oraclejet/ojdeferreddataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojdeferreddataprovider/index.d.ts rename to types/oracle__oraclejet/ojdeferreddataprovider/index.d.ts diff --git a/types/oraclejet/ojdiagram/index.d.ts b/types/oracle__oraclejet/ojdiagram/index.d.ts similarity index 100% rename from types/oraclejet/ojdiagram/index.d.ts rename to types/oracle__oraclejet/ojdiagram/index.d.ts diff --git a/types/oraclejet/ojdialog/index.d.ts b/types/oracle__oraclejet/ojdialog/index.d.ts similarity index 100% rename from types/oraclejet/ojdialog/index.d.ts rename to types/oracle__oraclejet/ojdialog/index.d.ts diff --git a/types/oraclejet/ojdvt-base/index.d.ts b/types/oracle__oraclejet/ojdvt-base/index.d.ts similarity index 100% rename from types/oraclejet/ojdvt-base/index.d.ts rename to types/oracle__oraclejet/ojdvt-base/index.d.ts diff --git a/types/oraclejet/ojeditablevalue/index.d.ts b/types/oracle__oraclejet/ojeditablevalue/index.d.ts similarity index 100% rename from types/oraclejet/ojeditablevalue/index.d.ts rename to types/oracle__oraclejet/ojeditablevalue/index.d.ts diff --git a/types/oraclejet/ojexpressionutils/index.d.ts b/types/oracle__oraclejet/ojexpressionutils/index.d.ts similarity index 100% rename from types/oraclejet/ojexpressionutils/index.d.ts rename to types/oracle__oraclejet/ojexpressionutils/index.d.ts diff --git a/types/oraclejet/ojfilepicker/index.d.ts b/types/oracle__oraclejet/ojfilepicker/index.d.ts similarity index 100% rename from types/oraclejet/ojfilepicker/index.d.ts rename to types/oracle__oraclejet/ojfilepicker/index.d.ts diff --git a/types/oraclejet/ojfilmstrip/index.d.ts b/types/oracle__oraclejet/ojfilmstrip/index.d.ts similarity index 100% rename from types/oraclejet/ojfilmstrip/index.d.ts rename to types/oracle__oraclejet/ojfilmstrip/index.d.ts diff --git a/types/oraclejet/ojformlayout/index.d.ts b/types/oracle__oraclejet/ojformlayout/index.d.ts similarity index 100% rename from types/oraclejet/ojformlayout/index.d.ts rename to types/oracle__oraclejet/ojformlayout/index.d.ts diff --git a/types/oraclejet/ojgantt/index.d.ts b/types/oracle__oraclejet/ojgantt/index.d.ts similarity index 100% rename from types/oraclejet/ojgantt/index.d.ts rename to types/oracle__oraclejet/ojgantt/index.d.ts diff --git a/types/oraclejet/ojganttutils/index.d.ts b/types/oracle__oraclejet/ojganttutils/index.d.ts similarity index 100% rename from types/oraclejet/ojganttutils/index.d.ts rename to types/oracle__oraclejet/ojganttutils/index.d.ts diff --git a/types/oraclejet/ojgauge/index.d.ts b/types/oracle__oraclejet/ojgauge/index.d.ts similarity index 100% rename from types/oraclejet/ojgauge/index.d.ts rename to types/oracle__oraclejet/ojgauge/index.d.ts diff --git a/types/oraclejet/ojinputnumber/index.d.ts b/types/oracle__oraclejet/ojinputnumber/index.d.ts similarity index 100% rename from types/oraclejet/ojinputnumber/index.d.ts rename to types/oracle__oraclejet/ojinputnumber/index.d.ts diff --git a/types/oraclejet/ojinputtext/index.d.ts b/types/oracle__oraclejet/ojinputtext/index.d.ts similarity index 100% rename from types/oraclejet/ojinputtext/index.d.ts rename to types/oracle__oraclejet/ojinputtext/index.d.ts diff --git a/types/oraclejet/ojkeyset/index.d.ts b/types/oracle__oraclejet/ojkeyset/index.d.ts similarity index 100% rename from types/oraclejet/ojkeyset/index.d.ts rename to types/oracle__oraclejet/ojkeyset/index.d.ts diff --git a/types/oraclejet/ojknockout-keyset/index.d.ts b/types/oracle__oraclejet/ojknockout-keyset/index.d.ts similarity index 100% rename from types/oraclejet/ojknockout-keyset/index.d.ts rename to types/oracle__oraclejet/ojknockout-keyset/index.d.ts diff --git a/types/oraclejet/ojknockout-model/index.d.ts b/types/oracle__oraclejet/ojknockout-model/index.d.ts similarity index 100% rename from types/oraclejet/ojknockout-model/index.d.ts rename to types/oracle__oraclejet/ojknockout-model/index.d.ts diff --git a/types/oraclejet/ojknockouttemplateutils/index.d.ts b/types/oracle__oraclejet/ojknockouttemplateutils/index.d.ts similarity index 100% rename from types/oraclejet/ojknockouttemplateutils/index.d.ts rename to types/oracle__oraclejet/ojknockouttemplateutils/index.d.ts diff --git a/types/oraclejet/ojlabel/index.d.ts b/types/oracle__oraclejet/ojlabel/index.d.ts similarity index 100% rename from types/oraclejet/ojlabel/index.d.ts rename to types/oracle__oraclejet/ojlabel/index.d.ts diff --git a/types/oraclejet/ojlabelvalue/index.d.ts b/types/oracle__oraclejet/ojlabelvalue/index.d.ts similarity index 100% rename from types/oraclejet/ojlabelvalue/index.d.ts rename to types/oracle__oraclejet/ojlabelvalue/index.d.ts diff --git a/types/oraclejet/ojlegend/index.d.ts b/types/oracle__oraclejet/ojlegend/index.d.ts similarity index 100% rename from types/oraclejet/ojlegend/index.d.ts rename to types/oracle__oraclejet/ojlegend/index.d.ts diff --git a/types/oraclejet/ojlistdataproviderview/index.d.ts b/types/oracle__oraclejet/ojlistdataproviderview/index.d.ts similarity index 100% rename from types/oraclejet/ojlistdataproviderview/index.d.ts rename to types/oracle__oraclejet/ojlistdataproviderview/index.d.ts diff --git a/types/oraclejet/ojlistview/index.d.ts b/types/oracle__oraclejet/ojlistview/index.d.ts similarity index 100% rename from types/oraclejet/ojlistview/index.d.ts rename to types/oracle__oraclejet/ojlistview/index.d.ts diff --git a/types/oraclejet/ojlocaledata/index.d.ts b/types/oracle__oraclejet/ojlocaledata/index.d.ts similarity index 100% rename from types/oraclejet/ojlocaledata/index.d.ts rename to types/oracle__oraclejet/ojlocaledata/index.d.ts diff --git a/types/oraclejet/ojlogger/index.d.ts b/types/oracle__oraclejet/ojlogger/index.d.ts similarity index 100% rename from types/oraclejet/ojlogger/index.d.ts rename to types/oracle__oraclejet/ojlogger/index.d.ts diff --git a/types/oraclejet/ojmasonrylayout/index.d.ts b/types/oracle__oraclejet/ojmasonrylayout/index.d.ts similarity index 100% rename from types/oraclejet/ojmasonrylayout/index.d.ts rename to types/oracle__oraclejet/ojmasonrylayout/index.d.ts diff --git a/types/oraclejet/ojmenu/index.d.ts b/types/oracle__oraclejet/ojmenu/index.d.ts similarity index 100% rename from types/oraclejet/ojmenu/index.d.ts rename to types/oracle__oraclejet/ojmenu/index.d.ts diff --git a/types/oraclejet/ojmenuselectmany/index.d.ts b/types/oracle__oraclejet/ojmenuselectmany/index.d.ts similarity index 100% rename from types/oraclejet/ojmenuselectmany/index.d.ts rename to types/oracle__oraclejet/ojmenuselectmany/index.d.ts diff --git a/types/oraclejet/ojmessage/index.d.ts b/types/oracle__oraclejet/ojmessage/index.d.ts similarity index 100% rename from types/oraclejet/ojmessage/index.d.ts rename to types/oracle__oraclejet/ojmessage/index.d.ts diff --git a/types/oraclejet/ojmessages/index.d.ts b/types/oracle__oraclejet/ojmessages/index.d.ts similarity index 100% rename from types/oraclejet/ojmessages/index.d.ts rename to types/oracle__oraclejet/ojmessages/index.d.ts diff --git a/types/oraclejet/ojmessaging/index.d.ts b/types/oracle__oraclejet/ojmessaging/index.d.ts similarity index 100% rename from types/oraclejet/ojmessaging/index.d.ts rename to types/oracle__oraclejet/ojmessaging/index.d.ts diff --git a/types/oraclejet/ojmodel/index.d.ts b/types/oracle__oraclejet/ojmodel/index.d.ts similarity index 100% rename from types/oraclejet/ojmodel/index.d.ts rename to types/oracle__oraclejet/ojmodel/index.d.ts diff --git a/types/oraclejet/ojmodule-element-utils/index.d.ts b/types/oracle__oraclejet/ojmodule-element-utils/index.d.ts similarity index 100% rename from types/oraclejet/ojmodule-element-utils/index.d.ts rename to types/oracle__oraclejet/ojmodule-element-utils/index.d.ts diff --git a/types/oraclejet/ojmodule-element/index.d.ts b/types/oracle__oraclejet/ojmodule-element/index.d.ts similarity index 100% rename from types/oraclejet/ojmodule-element/index.d.ts rename to types/oracle__oraclejet/ojmodule-element/index.d.ts diff --git a/types/oraclejet/ojmoduleanimations/index.d.ts b/types/oracle__oraclejet/ojmoduleanimations/index.d.ts similarity index 100% rename from types/oraclejet/ojmoduleanimations/index.d.ts rename to types/oracle__oraclejet/ojmoduleanimations/index.d.ts diff --git a/types/oraclejet/ojnavigationlist/index.d.ts b/types/oracle__oraclejet/ojnavigationlist/index.d.ts similarity index 100% rename from types/oraclejet/ojnavigationlist/index.d.ts rename to types/oracle__oraclejet/ojnavigationlist/index.d.ts diff --git a/types/oraclejet/ojnbox/index.d.ts b/types/oracle__oraclejet/ojnbox/index.d.ts similarity index 100% rename from types/oraclejet/ojnbox/index.d.ts rename to types/oracle__oraclejet/ojnbox/index.d.ts diff --git a/types/oraclejet/ojoptgroup/index.d.ts b/types/oracle__oraclejet/ojoptgroup/index.d.ts similarity index 100% rename from types/oraclejet/ojoptgroup/index.d.ts rename to types/oracle__oraclejet/ojoptgroup/index.d.ts diff --git a/types/oraclejet/ojoption/index.d.ts b/types/oracle__oraclejet/ojoption/index.d.ts similarity index 100% rename from types/oraclejet/ojoption/index.d.ts rename to types/oracle__oraclejet/ojoption/index.d.ts diff --git a/types/oraclejet/ojpictochart/index.d.ts b/types/oracle__oraclejet/ojpictochart/index.d.ts similarity index 100% rename from types/oraclejet/ojpictochart/index.d.ts rename to types/oracle__oraclejet/ojpictochart/index.d.ts diff --git a/types/oraclejet/ojpopup/index.d.ts b/types/oracle__oraclejet/ojpopup/index.d.ts similarity index 100% rename from types/oraclejet/ojpopup/index.d.ts rename to types/oracle__oraclejet/ojpopup/index.d.ts diff --git a/types/oraclejet/ojprogress/index.d.ts b/types/oracle__oraclejet/ojprogress/index.d.ts similarity index 100% rename from types/oraclejet/ojprogress/index.d.ts rename to types/oracle__oraclejet/ojprogress/index.d.ts diff --git a/types/oraclejet/ojprogresslist/index.d.ts b/types/oracle__oraclejet/ojprogresslist/index.d.ts similarity index 100% rename from types/oraclejet/ojprogresslist/index.d.ts rename to types/oracle__oraclejet/ojprogresslist/index.d.ts diff --git a/types/oraclejet/ojpulltorefresh/index.d.ts b/types/oracle__oraclejet/ojpulltorefresh/index.d.ts similarity index 100% rename from types/oraclejet/ojpulltorefresh/index.d.ts rename to types/oracle__oraclejet/ojpulltorefresh/index.d.ts diff --git a/types/oraclejet/ojradioset/index.d.ts b/types/oracle__oraclejet/ojradioset/index.d.ts similarity index 100% rename from types/oraclejet/ojradioset/index.d.ts rename to types/oracle__oraclejet/ojradioset/index.d.ts diff --git a/types/oraclejet/ojrefresher/index.d.ts b/types/oracle__oraclejet/ojrefresher/index.d.ts similarity index 100% rename from types/oraclejet/ojrefresher/index.d.ts rename to types/oracle__oraclejet/ojrefresher/index.d.ts diff --git a/types/oraclejet/ojresponsiveknockoututils/index.d.ts b/types/oracle__oraclejet/ojresponsiveknockoututils/index.d.ts similarity index 100% rename from types/oraclejet/ojresponsiveknockoututils/index.d.ts rename to types/oracle__oraclejet/ojresponsiveknockoututils/index.d.ts diff --git a/types/oraclejet/ojresponsiveutils/index.d.ts b/types/oracle__oraclejet/ojresponsiveutils/index.d.ts similarity index 100% rename from types/oraclejet/ojresponsiveutils/index.d.ts rename to types/oracle__oraclejet/ojresponsiveutils/index.d.ts diff --git a/types/oraclejet/ojrouter/index.d.ts b/types/oracle__oraclejet/ojrouter/index.d.ts similarity index 100% rename from types/oraclejet/ojrouter/index.d.ts rename to types/oracle__oraclejet/ojrouter/index.d.ts diff --git a/types/oraclejet/ojselectcombobox/index.d.ts b/types/oracle__oraclejet/ojselectcombobox/index.d.ts similarity index 100% rename from types/oraclejet/ojselectcombobox/index.d.ts rename to types/oracle__oraclejet/ojselectcombobox/index.d.ts diff --git a/types/oraclejet/ojslider/index.d.ts b/types/oracle__oraclejet/ojslider/index.d.ts similarity index 100% rename from types/oraclejet/ojslider/index.d.ts rename to types/oracle__oraclejet/ojslider/index.d.ts diff --git a/types/oraclejet/ojsunburst/index.d.ts b/types/oracle__oraclejet/ojsunburst/index.d.ts similarity index 100% rename from types/oraclejet/ojsunburst/index.d.ts rename to types/oracle__oraclejet/ojsunburst/index.d.ts diff --git a/types/oraclejet/ojswipeactions/index.d.ts b/types/oracle__oraclejet/ojswipeactions/index.d.ts similarity index 100% rename from types/oraclejet/ojswipeactions/index.d.ts rename to types/oracle__oraclejet/ojswipeactions/index.d.ts diff --git a/types/oraclejet/ojswipetoreveal/index.d.ts b/types/oracle__oraclejet/ojswipetoreveal/index.d.ts similarity index 100% rename from types/oraclejet/ojswipetoreveal/index.d.ts rename to types/oracle__oraclejet/ojswipetoreveal/index.d.ts diff --git a/types/oraclejet/ojswitch/index.d.ts b/types/oracle__oraclejet/ojswitch/index.d.ts similarity index 100% rename from types/oraclejet/ojswitch/index.d.ts rename to types/oracle__oraclejet/ojswitch/index.d.ts diff --git a/types/oraclejet/ojswitcher/index.d.ts b/types/oracle__oraclejet/ojswitcher/index.d.ts similarity index 100% rename from types/oraclejet/ojswitcher/index.d.ts rename to types/oracle__oraclejet/ojswitcher/index.d.ts diff --git a/types/oraclejet/ojtable/index.d.ts b/types/oracle__oraclejet/ojtable/index.d.ts similarity index 100% rename from types/oraclejet/ojtable/index.d.ts rename to types/oracle__oraclejet/ojtable/index.d.ts diff --git a/types/oraclejet/ojtagcloud/index.d.ts b/types/oracle__oraclejet/ojtagcloud/index.d.ts similarity index 100% rename from types/oraclejet/ojtagcloud/index.d.ts rename to types/oracle__oraclejet/ojtagcloud/index.d.ts diff --git a/types/oraclejet/ojthematicmap/index.d.ts b/types/oracle__oraclejet/ojthematicmap/index.d.ts similarity index 100% rename from types/oraclejet/ojthematicmap/index.d.ts rename to types/oracle__oraclejet/ojthematicmap/index.d.ts diff --git a/types/oraclejet/ojthemeutils/index.d.ts b/types/oracle__oraclejet/ojthemeutils/index.d.ts similarity index 100% rename from types/oraclejet/ojthemeutils/index.d.ts rename to types/oracle__oraclejet/ojthemeutils/index.d.ts diff --git a/types/oraclejet/ojtime-base/index.d.ts b/types/oracle__oraclejet/ojtime-base/index.d.ts similarity index 100% rename from types/oraclejet/ojtime-base/index.d.ts rename to types/oracle__oraclejet/ojtime-base/index.d.ts diff --git a/types/oraclejet/ojtimeaxis/index.d.ts b/types/oracle__oraclejet/ojtimeaxis/index.d.ts similarity index 100% rename from types/oraclejet/ojtimeaxis/index.d.ts rename to types/oracle__oraclejet/ojtimeaxis/index.d.ts diff --git a/types/oraclejet/ojtimeutils/index.d.ts b/types/oracle__oraclejet/ojtimeutils/index.d.ts similarity index 100% rename from types/oraclejet/ojtimeutils/index.d.ts rename to types/oracle__oraclejet/ojtimeutils/index.d.ts diff --git a/types/oraclejet/ojtoolbar/index.d.ts b/types/oracle__oraclejet/ojtoolbar/index.d.ts similarity index 100% rename from types/oraclejet/ojtoolbar/index.d.ts rename to types/oracle__oraclejet/ojtoolbar/index.d.ts diff --git a/types/oraclejet/ojtrain/index.d.ts b/types/oracle__oraclejet/ojtrain/index.d.ts similarity index 100% rename from types/oraclejet/ojtrain/index.d.ts rename to types/oracle__oraclejet/ojtrain/index.d.ts diff --git a/types/oraclejet/ojtranslation/index.d.ts b/types/oracle__oraclejet/ojtranslation/index.d.ts similarity index 100% rename from types/oraclejet/ojtranslation/index.d.ts rename to types/oracle__oraclejet/ojtranslation/index.d.ts diff --git a/types/oraclejet/ojtreedataprovider/index.d.ts b/types/oracle__oraclejet/ojtreedataprovider/index.d.ts similarity index 100% rename from types/oraclejet/ojtreedataprovider/index.d.ts rename to types/oracle__oraclejet/ojtreedataprovider/index.d.ts diff --git a/types/oraclejet/ojtreemap/index.d.ts b/types/oracle__oraclejet/ojtreemap/index.d.ts similarity index 100% rename from types/oraclejet/ojtreemap/index.d.ts rename to types/oracle__oraclejet/ojtreemap/index.d.ts diff --git a/types/oraclejet/ojvalidation-base/index.d.ts b/types/oracle__oraclejet/ojvalidation-base/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-base/index.d.ts rename to types/oracle__oraclejet/ojvalidation-base/index.d.ts diff --git a/types/oraclejet/ojvalidation-datetime/index.d.ts b/types/oracle__oraclejet/ojvalidation-datetime/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-datetime/index.d.ts rename to types/oracle__oraclejet/ojvalidation-datetime/index.d.ts diff --git a/types/oraclejet/ojvalidation-number/index.d.ts b/types/oracle__oraclejet/ojvalidation-number/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidation-number/index.d.ts rename to types/oracle__oraclejet/ojvalidation-number/index.d.ts diff --git a/types/oraclejet/ojvalidationgroup/index.d.ts b/types/oracle__oraclejet/ojvalidationgroup/index.d.ts similarity index 100% rename from types/oraclejet/ojvalidationgroup/index.d.ts rename to types/oracle__oraclejet/ojvalidationgroup/index.d.ts diff --git a/types/oraclejet/oraclejet-tests.ts b/types/oracle__oraclejet/oraclejet-tests.ts similarity index 100% rename from types/oraclejet/oraclejet-tests.ts rename to types/oracle__oraclejet/oraclejet-tests.ts diff --git a/types/oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json similarity index 100% rename from types/oraclejet/tsconfig.json rename to types/oracle__oraclejet/tsconfig.json diff --git a/types/oraclejet/tslint.json b/types/oracle__oraclejet/tslint.json similarity index 100% rename from types/oraclejet/tslint.json rename to types/oracle__oraclejet/tslint.json From 5d325b1ff2d45d055ff27daaffd7d1d7b0d8faf2 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 20:59:36 -0700 Subject: [PATCH 0019/2268] move to scoped --- .../{oraclejet-tests.ts => oracle__oraclejet-tests.ts} | 0 types/oracle__oraclejet/tsconfig.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename types/oracle__oraclejet/{oraclejet-tests.ts => oracle__oraclejet-tests.ts} (100%) diff --git a/types/oracle__oraclejet/oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts similarity index 100% rename from types/oracle__oraclejet/oraclejet-tests.ts rename to types/oracle__oraclejet/oracle__oraclejet-tests.ts diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index e914883a1c..bcad93a766 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -17,7 +17,7 @@ ] }, "files": [ - "oraclejet-tests.ts", + "oracle__oraclejet-tests.ts", "index.d.ts", "ojaccordion/index.d.ts", "ojanimation/index.d.ts", From 3e270542b9fac5dad56382f7f2d1ab02ae718ad9 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:12:40 -0700 Subject: [PATCH 0020/2268] move to scoped location --- .../oracle__oraclejet-tests.ts | 190 +++++++++--------- types/oracle__oraclejet/tsconfig.json | 7 +- 2 files changed, 101 insertions(+), 96 deletions(-) diff --git a/types/oracle__oraclejet/oracle__oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts index 265c0d4856..e71977ee39 100644 --- a/types/oracle__oraclejet/oracle__oraclejet-tests.ts +++ b/types/oracle__oraclejet/oracle__oraclejet-tests.ts @@ -1,101 +1,101 @@ // Since all the definitions are auto generated from jsdoc doclets and internally tested through application, // add some basic tests here. -import { ojAccordion } from "oraclejet/ojaccordion"; -import AnimationUtils = require("oraclejet/ojanimation"); -import ArrayDataProvider = require("oraclejet/ojarraydataprovider"); -import ArrayTreeDataProvider = require("oraclejet/ojarraytreedataprovider"); -import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'oraclejet/ojattributegrouphandler'; -import { ojAvatar } from "oraclejet/ojavatar"; -import { ojButton, ojButtonsetMany, ojButtonsetOne } from "oraclejet/ojbutton"; -import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "oraclejet/ojchart"; -import { ojCheckboxset } from "oraclejet/ojcheckboxset"; -import { ojCollapsible } from "oraclejet/ojcollapsible"; -import CollectionDataprovider = require("oraclejet/ojcollectiondataprovider"); -import Color = require("oraclejet/ojcolor"); -import { ojColorPalette } from "oraclejet/ojcolorpalette"; -import { ojColorSpectrum } from "oraclejet/ojcolorspectrum"; -import Components = require("oraclejet/ojcomponentcore"); -import Composite = require("oraclejet/ojcomposite"); -import Config = require('oraclejet/ojconfig'); -import Context = require("oraclejet/ojcontext"); -import { ojConveyorBelt } from "oraclejet/ojconveyorbelt"; -import { ojDataGrid } from "oraclejet/ojdatagrid"; -import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "oraclejet/ojdataprovider"; -import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "oraclejet/ojdatetimepicker"; -import { ojDefer } from "oraclejet/ojdefer"; -import DeferredDataprovider = require("oraclejet/ojdeferreddataprovider"); -import { ojDiagram, ojDiagramLink, ojDiagramNode } from "oraclejet/ojdiagram"; -import { ojDialog } from "oraclejet/ojdialog"; -import { dvtBaseComponent } from "oraclejet/ojdvt-base"; -import { editableValue } from "oraclejet/ojeditablevalue"; -import ExpressionUtils = require('oraclejet/ojexpressionutils'); -import { ojFilePicker, FileUploadTransport } from "oraclejet/ojfilepicker"; -import { ojFilmStrip } from "oraclejet/ojfilmstrip"; -import { ojFormLayout } from "oraclejet/ojformlayout"; -import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "oraclejet/ojgantt"; -import GanttUtils = require ('oraclejet/ojganttutils'); -import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "oraclejet/ojgauge"; -import { ojInputNumber } from "oraclejet/ojinputnumber"; -import { ojInputPassword, ojInputText, ojTextArea } from "oraclejet/ojinputtext"; -import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "oraclejet/ojkeyset"; -import { ObservableExpandedKeySet } from "oraclejet/ojknockout-keyset"; -import KnockoutUtils = require("oraclejet/ojknockout-model"); -import KnockoutTemplateUtils = require('oraclejet/ojknockouttemplateutils'); -import { ojLabel } from "oraclejet/ojlabel"; -import { ojLabelValue } from "oraclejet/ojlabelvalue"; -import { ojLegend } from "oraclejet/ojlegend"; -import ListDataProviderView = require("oraclejet/ojlistdataproviderview"); -import { ojListView } from "oraclejet/ojlistview"; -import LocaleData = require('oraclejet/ojlocaledata'); -import Logger = require('oraclejet/ojlogger'); -import { ojMasonryLayout } from "oraclejet/ojmasonrylayout"; -import { ojMenu } from "oraclejet/ojmenu"; -import { ojMenuSelectMany } from "oraclejet/ojmenuselectmany"; -import { ojMessages } from "oraclejet/ojmessages"; -import { ojMessage } from "oraclejet/ojmessage"; -import Message = require("oraclejet/ojmessaging"); -import { Collection, Model, URLError, OAuth } from "oraclejet/ojmodel"; -import { ojModule } from "oraclejet/ojmodule-element"; -import ModuleElementUtils = require("oraclejet/ojmodule-element-utils"); -import ModuleAnimations = require("oraclejet/ojmoduleanimations") ; -import { ojNavigationList, ojTabBar } from "oraclejet/ojnavigationlist"; -import { ojNBox } from "oraclejet/ojnbox"; -import { ojOptgroup } from "oraclejet/ojoptgroup"; -import { ojOption } from "oraclejet/ojoption"; -import { ojPictoChart, ojPictoChartItem } from "oraclejet/ojpictochart"; -import { ojPopup } from "oraclejet/ojpopup"; -import { ojProgress } from "oraclejet/ojprogress"; -import { ojProgressList, ProgressItem } from "oraclejet/ojprogresslist"; -import PullToRefreshUtils = require("oraclejet/ojpulltorefresh"); -import { ojRadioset } from "oraclejet/ojradioset"; -import { ojRefresher } from "oraclejet/ojrefresher"; -import ResponsiveKnockoutUtils = require('oraclejet/ojresponsiveknockoututils'); -import ResponsiveUtils = require('oraclejet/ojresponsiveutils'); -import Router = require("oraclejet/ojrouter"); -import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "oraclejet/ojselectcombobox"; -import { ojSlider } from "oraclejet/ojslider"; -import { ojSunburst } from "oraclejet/ojsunburst"; -import { ojSwipeActions } from "oraclejet/ojswipeactions"; -import SwipeToRevealUtils = require("oraclejet/ojswipetoreveal"); -import { ojSwitch } from "oraclejet/ojswitch"; -import { ojSwitcher } from "oraclejet/ojswitcher"; -import { ojTable } from "oraclejet/ojtable"; -import { ojTagCloud } from "oraclejet/ojtagcloud"; -import { ojThematicMap } from "oraclejet/ojthematicmap"; -import ThemeUtils = require('oraclejet/ojthemeutils'); -import { dvtTimeComponent } from "oraclejet/ojtime-base"; -import { ojTimeAxis } from "oraclejet/ojtimeaxis"; -import TimeUtils = require("oraclejet/ojtimeutils"); -import { ojToolbar } from "oraclejet/ojtoolbar"; -import { ojTrain } from "oraclejet/ojtrain"; -import Translations = require("oraclejet/ojtranslation"); -import TreeDataProvider = require("oraclejet/ojtreedataprovider"); -import { ojTreemap } from "oraclejet/ojtreemap"; +import { ojAccordion } from "ojs/ojaccordion"; +import AnimationUtils = require("ojs/ojanimation"); +import ArrayDataProvider = require("ojs/ojarraydataprovider"); +import ArrayTreeDataProvider = require("ojs/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'ojs/ojattributegrouphandler'; +import { ojAvatar } from "ojs/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "ojs/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "ojs/ojchart"; +import { ojCheckboxset } from "ojs/ojcheckboxset"; +import { ojCollapsible } from "ojs/ojcollapsible"; +import CollectionDataprovider = require("ojs/ojcollectiondataprovider"); +import Color = require("ojs/ojcolor"); +import { ojColorPalette } from "ojs/ojcolorpalette"; +import { ojColorSpectrum } from "ojs/ojcolorspectrum"; +import Components = require("ojs/ojcomponentcore"); +import Composite = require("ojs/ojcomposite"); +import Config = require('ojs/ojconfig'); +import Context = require("ojs/ojcontext"); +import { ojConveyorBelt } from "ojs/ojconveyorbelt"; +import { ojDataGrid } from "ojs/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "ojs/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "ojs/ojdatetimepicker"; +import { ojDefer } from "ojs/ojdefer"; +import DeferredDataprovider = require("ojs/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "ojs/ojdiagram"; +import { ojDialog } from "ojs/ojdialog"; +import { dvtBaseComponent } from "ojs/ojdvt-base"; +import { editableValue } from "ojs/ojeditablevalue"; +import ExpressionUtils = require('ojs/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "ojs/ojfilepicker"; +import { ojFilmStrip } from "ojs/ojfilmstrip"; +import { ojFormLayout } from "ojs/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "ojs/ojgantt"; +import GanttUtils = require ('ojs/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "ojs/ojgauge"; +import { ojInputNumber } from "ojs/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "ojs/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "ojs/ojkeyset"; +import { ObservableExpandedKeySet } from "ojs/ojknockout-keyset"; +import KnockoutUtils = require("ojs/ojknockout-model"); +import KnockoutTemplateUtils = require('ojs/ojknockouttemplateutils'); +import { ojLabel } from "ojs/ojlabel"; +import { ojLabelValue } from "ojs/ojlabelvalue"; +import { ojLegend } from "ojs/ojlegend"; +import ListDataProviderView = require("ojs/ojlistdataproviderview"); +import { ojListView } from "ojs/ojlistview"; +import LocaleData = require('ojs/ojlocaledata'); +import Logger = require('ojs/ojlogger'); +import { ojMasonryLayout } from "ojs/ojmasonrylayout"; +import { ojMenu } from "ojs/ojmenu"; +import { ojMenuSelectMany } from "ojs/ojmenuselectmany"; +import { ojMessages } from "ojs/ojmessages"; +import { ojMessage } from "ojs/ojmessage"; +import Message = require("ojs/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "ojs/ojmodel"; +import { ojModule } from "ojs/ojmodule-element"; +import ModuleElementUtils = require("ojs/ojmodule-element-utils"); +import ModuleAnimations = require("ojs/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "ojs/ojnavigationlist"; +import { ojNBox } from "ojs/ojnbox"; +import { ojOptgroup } from "ojs/ojoptgroup"; +import { ojOption } from "ojs/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "ojs/ojpictochart"; +import { ojPopup } from "ojs/ojpopup"; +import { ojProgress } from "ojs/ojprogress"; +import { ojProgressList, ProgressItem } from "ojs/ojprogresslist"; +import PullToRefreshUtils = require("ojs/ojpulltorefresh"); +import { ojRadioset } from "ojs/ojradioset"; +import { ojRefresher } from "ojs/ojrefresher"; +import ResponsiveKnockoutUtils = require('ojs/ojresponsiveknockoututils'); +import ResponsiveUtils = require('ojs/ojresponsiveutils'); +import Router = require("ojs/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "ojs/ojselectcombobox"; +import { ojSlider } from "ojs/ojslider"; +import { ojSunburst } from "ojs/ojsunburst"; +import { ojSwipeActions } from "ojs/ojswipeactions"; +import SwipeToRevealUtils = require("ojs/ojswipetoreveal"); +import { ojSwitch } from "ojs/ojswitch"; +import { ojSwitcher } from "ojs/ojswitcher"; +import { ojTable } from "ojs/ojtable"; +import { ojTagCloud } from "ojs/ojtagcloud"; +import { ojThematicMap } from "ojs/ojthematicmap"; +import ThemeUtils = require('ojs/ojthemeutils'); +import { dvtTimeComponent } from "ojs/ojtime-base"; +import { ojTimeAxis } from "ojs/ojtimeaxis"; +import TimeUtils = require("ojs/ojtimeutils"); +import { ojToolbar } from "ojs/ojtoolbar"; +import { ojTrain } from "ojs/ojtrain"; +import Translations = require("ojs/ojtranslation"); +import TreeDataProvider = require("ojs/ojtreedataprovider"); +import { ojTreemap } from "ojs/ojtreemap"; import { Validation, Validator, ValidatorError, ValidatorFactory, - AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "oraclejet/ojvalidation-base"; -import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "oraclejet/ojvalidation-datetime"; -import { NumberRangeValidator, NumberRangeValidatorFactory } from "oraclejet/ojvalidation-number"; -import { ojValidationGroup } from "oraclejet/ojvalidationgroup"; + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "ojs/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "ojs/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "ojs/ojvalidation-number"; +import { ojValidationGroup } from "ojs/ojvalidationgroup"; const onChangedCallback = (event: CustomEvent) => { }; diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index bcad93a766..16185df100 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -14,7 +14,12 @@ "baseUrl": "../", "typeRoots": [ "../" - ] + ], + "paths": { + "ojs/*": [ + "oracle__oraclejet/*" + ] + } }, "files": [ "oracle__oraclejet-tests.ts", From 38f49e7e670f6fdb3a4ec0768b7816693189adf8 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:14:50 -0700 Subject: [PATCH 0021/2268] update for scoped --- types/oracle__oraclejet/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 16185df100..6119a97403 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -16,6 +16,9 @@ "../" ], "paths": { + "ojs": [ + "oracle__oraclejet" + ], "ojs/*": [ "oracle__oraclejet/*" ] From 460a128c6535fa7e48cae4805b16fd8ed6096855 Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:20:16 -0700 Subject: [PATCH 0022/2268] Update for scoped --- .../oracle__oraclejet-tests.ts | 190 +++++++++--------- types/oracle__oraclejet/tsconfig.json | 4 +- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/types/oracle__oraclejet/oracle__oraclejet-tests.ts b/types/oracle__oraclejet/oracle__oraclejet-tests.ts index e71977ee39..41c645e679 100644 --- a/types/oracle__oraclejet/oracle__oraclejet-tests.ts +++ b/types/oracle__oraclejet/oracle__oraclejet-tests.ts @@ -1,101 +1,101 @@ // Since all the definitions are auto generated from jsdoc doclets and internally tested through application, // add some basic tests here. -import { ojAccordion } from "ojs/ojaccordion"; -import AnimationUtils = require("ojs/ojanimation"); -import ArrayDataProvider = require("ojs/ojarraydataprovider"); -import ArrayTreeDataProvider = require("ojs/ojarraytreedataprovider"); -import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from 'ojs/ojattributegrouphandler'; -import { ojAvatar } from "ojs/ojavatar"; -import { ojButton, ojButtonsetMany, ojButtonsetOne } from "ojs/ojbutton"; -import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "ojs/ojchart"; -import { ojCheckboxset } from "ojs/ojcheckboxset"; -import { ojCollapsible } from "ojs/ojcollapsible"; -import CollectionDataprovider = require("ojs/ojcollectiondataprovider"); -import Color = require("ojs/ojcolor"); -import { ojColorPalette } from "ojs/ojcolorpalette"; -import { ojColorSpectrum } from "ojs/ojcolorspectrum"; -import Components = require("ojs/ojcomponentcore"); -import Composite = require("ojs/ojcomposite"); -import Config = require('ojs/ojconfig'); -import Context = require("ojs/ojcontext"); -import { ojConveyorBelt } from "ojs/ojconveyorbelt"; -import { ojDataGrid } from "ojs/ojdatagrid"; -import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "ojs/ojdataprovider"; -import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "ojs/ojdatetimepicker"; -import { ojDefer } from "ojs/ojdefer"; -import DeferredDataprovider = require("ojs/ojdeferreddataprovider"); -import { ojDiagram, ojDiagramLink, ojDiagramNode } from "ojs/ojdiagram"; -import { ojDialog } from "ojs/ojdialog"; -import { dvtBaseComponent } from "ojs/ojdvt-base"; -import { editableValue } from "ojs/ojeditablevalue"; -import ExpressionUtils = require('ojs/ojexpressionutils'); -import { ojFilePicker, FileUploadTransport } from "ojs/ojfilepicker"; -import { ojFilmStrip } from "ojs/ojfilmstrip"; -import { ojFormLayout } from "ojs/ojformlayout"; -import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "ojs/ojgantt"; -import GanttUtils = require ('ojs/ojganttutils'); -import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "ojs/ojgauge"; -import { ojInputNumber } from "ojs/ojinputnumber"; -import { ojInputPassword, ojInputText, ojTextArea } from "ojs/ojinputtext"; -import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "ojs/ojkeyset"; -import { ObservableExpandedKeySet } from "ojs/ojknockout-keyset"; -import KnockoutUtils = require("ojs/ojknockout-model"); -import KnockoutTemplateUtils = require('ojs/ojknockouttemplateutils'); -import { ojLabel } from "ojs/ojlabel"; -import { ojLabelValue } from "ojs/ojlabelvalue"; -import { ojLegend } from "ojs/ojlegend"; -import ListDataProviderView = require("ojs/ojlistdataproviderview"); -import { ojListView } from "ojs/ojlistview"; -import LocaleData = require('ojs/ojlocaledata'); -import Logger = require('ojs/ojlogger'); -import { ojMasonryLayout } from "ojs/ojmasonrylayout"; -import { ojMenu } from "ojs/ojmenu"; -import { ojMenuSelectMany } from "ojs/ojmenuselectmany"; -import { ojMessages } from "ojs/ojmessages"; -import { ojMessage } from "ojs/ojmessage"; -import Message = require("ojs/ojmessaging"); -import { Collection, Model, URLError, OAuth } from "ojs/ojmodel"; -import { ojModule } from "ojs/ojmodule-element"; -import ModuleElementUtils = require("ojs/ojmodule-element-utils"); -import ModuleAnimations = require("ojs/ojmoduleanimations") ; -import { ojNavigationList, ojTabBar } from "ojs/ojnavigationlist"; -import { ojNBox } from "ojs/ojnbox"; -import { ojOptgroup } from "ojs/ojoptgroup"; -import { ojOption } from "ojs/ojoption"; -import { ojPictoChart, ojPictoChartItem } from "ojs/ojpictochart"; -import { ojPopup } from "ojs/ojpopup"; -import { ojProgress } from "ojs/ojprogress"; -import { ojProgressList, ProgressItem } from "ojs/ojprogresslist"; -import PullToRefreshUtils = require("ojs/ojpulltorefresh"); -import { ojRadioset } from "ojs/ojradioset"; -import { ojRefresher } from "ojs/ojrefresher"; -import ResponsiveKnockoutUtils = require('ojs/ojresponsiveknockoututils'); -import ResponsiveUtils = require('ojs/ojresponsiveutils'); -import Router = require("ojs/ojrouter"); -import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "ojs/ojselectcombobox"; -import { ojSlider } from "ojs/ojslider"; -import { ojSunburst } from "ojs/ojsunburst"; -import { ojSwipeActions } from "ojs/ojswipeactions"; -import SwipeToRevealUtils = require("ojs/ojswipetoreveal"); -import { ojSwitch } from "ojs/ojswitch"; -import { ojSwitcher } from "ojs/ojswitcher"; -import { ojTable } from "ojs/ojtable"; -import { ojTagCloud } from "ojs/ojtagcloud"; -import { ojThematicMap } from "ojs/ojthematicmap"; -import ThemeUtils = require('ojs/ojthemeutils'); -import { dvtTimeComponent } from "ojs/ojtime-base"; -import { ojTimeAxis } from "ojs/ojtimeaxis"; -import TimeUtils = require("ojs/ojtimeutils"); -import { ojToolbar } from "ojs/ojtoolbar"; -import { ojTrain } from "ojs/ojtrain"; -import Translations = require("ojs/ojtranslation"); -import TreeDataProvider = require("ojs/ojtreedataprovider"); -import { ojTreemap } from "ojs/ojtreemap"; +import { ojAccordion } from "@oracle/oraclejet/ojaccordion"; +import AnimationUtils = require("@oracle/oraclejet/ojanimation"); +import ArrayDataProvider = require("@oracle/oraclejet/ojarraydataprovider"); +import ArrayTreeDataProvider = require("@oracle/oraclejet/ojarraytreedataprovider"); +import { AttributeGroupHandler, ColorAttributeGroupHandler, ShapeAttributeGroupHandler } from '@oracle/oraclejet/ojattributegrouphandler'; +import { ojAvatar } from "@oracle/oraclejet/ojavatar"; +import { ojButton, ojButtonsetMany, ojButtonsetOne } from "@oracle/oraclejet/ojbutton"; +import { ojChart, ojChartGroup, ojChartItem, ojChartSeries, ojSparkChart, ojSparkChartItem } from "@oracle/oraclejet/ojchart"; +import { ojCheckboxset } from "@oracle/oraclejet/ojcheckboxset"; +import { ojCollapsible } from "@oracle/oraclejet/ojcollapsible"; +import CollectionDataprovider = require("@oracle/oraclejet/ojcollectiondataprovider"); +import Color = require("@oracle/oraclejet/ojcolor"); +import { ojColorPalette } from "@oracle/oraclejet/ojcolorpalette"; +import { ojColorSpectrum } from "@oracle/oraclejet/ojcolorspectrum"; +import Components = require("@oracle/oraclejet/ojcomponentcore"); +import Composite = require("@oracle/oraclejet/ojcomposite"); +import Config = require('@oracle/oraclejet/ojconfig'); +import Context = require("@oracle/oraclejet/ojcontext"); +import { ojConveyorBelt } from "@oracle/oraclejet/ojconveyorbelt"; +import { ojDataGrid } from "@oracle/oraclejet/ojdatagrid"; +import { DataMapping, DataProvider, DataProviderAddOperationEventDetail, DataProviderMutationEventDetail, DataProviderOperationEventDetail } from "@oracle/oraclejet/ojdataprovider"; +import { ojDatePicker, ojDateTimePicker, ojInputDate, ojInputDateTime, ojInputTime } from "@oracle/oraclejet/ojdatetimepicker"; +import { ojDefer } from "@oracle/oraclejet/ojdefer"; +import DeferredDataprovider = require("@oracle/oraclejet/ojdeferreddataprovider"); +import { ojDiagram, ojDiagramLink, ojDiagramNode } from "@oracle/oraclejet/ojdiagram"; +import { ojDialog } from "@oracle/oraclejet/ojdialog"; +import { dvtBaseComponent } from "@oracle/oraclejet/ojdvt-base"; +import { editableValue } from "@oracle/oraclejet/ojeditablevalue"; +import ExpressionUtils = require('@oracle/oraclejet/ojexpressionutils'); +import { ojFilePicker, FileUploadTransport } from "@oracle/oraclejet/ojfilepicker"; +import { ojFilmStrip } from "@oracle/oraclejet/ojfilmstrip"; +import { ojFormLayout } from "@oracle/oraclejet/ojformlayout"; +import { ojGantt, ojGanttRow, ojGanttTask, ojGanttDependency } from "@oracle/oraclejet/ojgantt"; +import GanttUtils = require ('@oracle/oraclejet/ojganttutils'); +import { ojLedGauge, ojRatingGauge, ojStatusMeterGauge } from "@oracle/oraclejet/ojgauge"; +import { ojInputNumber } from "@oracle/oraclejet/ojinputnumber"; +import { ojInputPassword, ojInputText, ojTextArea } from "@oracle/oraclejet/ojinputtext"; +import { KeySet, ExpandAllKeySet, ExpandedKeySet } from "@oracle/oraclejet/ojkeyset"; +import { ObservableExpandedKeySet } from "@oracle/oraclejet/ojknockout-keyset"; +import KnockoutUtils = require("@oracle/oraclejet/ojknockout-model"); +import KnockoutTemplateUtils = require('@oracle/oraclejet/ojknockouttemplateutils'); +import { ojLabel } from "@oracle/oraclejet/ojlabel"; +import { ojLabelValue } from "@oracle/oraclejet/ojlabelvalue"; +import { ojLegend } from "@oracle/oraclejet/ojlegend"; +import ListDataProviderView = require("@oracle/oraclejet/ojlistdataproviderview"); +import { ojListView } from "@oracle/oraclejet/ojlistview"; +import LocaleData = require('@oracle/oraclejet/ojlocaledata'); +import Logger = require('@oracle/oraclejet/ojlogger'); +import { ojMasonryLayout } from "@oracle/oraclejet/ojmasonrylayout"; +import { ojMenu } from "@oracle/oraclejet/ojmenu"; +import { ojMenuSelectMany } from "@oracle/oraclejet/ojmenuselectmany"; +import { ojMessages } from "@oracle/oraclejet/ojmessages"; +import { ojMessage } from "@oracle/oraclejet/ojmessage"; +import Message = require("@oracle/oraclejet/ojmessaging"); +import { Collection, Model, URLError, OAuth } from "@oracle/oraclejet/ojmodel"; +import { ojModule } from "@oracle/oraclejet/ojmodule-element"; +import ModuleElementUtils = require("@oracle/oraclejet/ojmodule-element-utils"); +import ModuleAnimations = require("@oracle/oraclejet/ojmoduleanimations") ; +import { ojNavigationList, ojTabBar } from "@oracle/oraclejet/ojnavigationlist"; +import { ojNBox } from "@oracle/oraclejet/ojnbox"; +import { ojOptgroup } from "@oracle/oraclejet/ojoptgroup"; +import { ojOption } from "@oracle/oraclejet/ojoption"; +import { ojPictoChart, ojPictoChartItem } from "@oracle/oraclejet/ojpictochart"; +import { ojPopup } from "@oracle/oraclejet/ojpopup"; +import { ojProgress } from "@oracle/oraclejet/ojprogress"; +import { ojProgressList, ProgressItem } from "@oracle/oraclejet/ojprogresslist"; +import PullToRefreshUtils = require("@oracle/oraclejet/ojpulltorefresh"); +import { ojRadioset } from "@oracle/oraclejet/ojradioset"; +import { ojRefresher } from "@oracle/oraclejet/ojrefresher"; +import ResponsiveKnockoutUtils = require('@oracle/oraclejet/ojresponsiveknockoututils'); +import ResponsiveUtils = require('@oracle/oraclejet/ojresponsiveutils'); +import Router = require("@oracle/oraclejet/ojrouter"); +import { ojComboboxOne, ojComboboxMany, ojSelectOne, ojSelectMany } from "@oracle/oraclejet/ojselectcombobox"; +import { ojSlider } from "@oracle/oraclejet/ojslider"; +import { ojSunburst } from "@oracle/oraclejet/ojsunburst"; +import { ojSwipeActions } from "@oracle/oraclejet/ojswipeactions"; +import SwipeToRevealUtils = require("@oracle/oraclejet/ojswipetoreveal"); +import { ojSwitch } from "@oracle/oraclejet/ojswitch"; +import { ojSwitcher } from "@oracle/oraclejet/ojswitcher"; +import { ojTable } from "@oracle/oraclejet/ojtable"; +import { ojTagCloud } from "@oracle/oraclejet/ojtagcloud"; +import { ojThematicMap } from "@oracle/oraclejet/ojthematicmap"; +import ThemeUtils = require('@oracle/oraclejet/ojthemeutils'); +import { dvtTimeComponent } from "@oracle/oraclejet/ojtime-base"; +import { ojTimeAxis } from "@oracle/oraclejet/ojtimeaxis"; +import TimeUtils = require("@oracle/oraclejet/ojtimeutils"); +import { ojToolbar } from "@oracle/oraclejet/ojtoolbar"; +import { ojTrain } from "@oracle/oraclejet/ojtrain"; +import Translations = require("@oracle/oraclejet/ojtranslation"); +import TreeDataProvider = require("@oracle/oraclejet/ojtreedataprovider"); +import { ojTreemap } from "@oracle/oraclejet/ojtreemap"; import { Validation, Validator, ValidatorError, ValidatorFactory, - AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "ojs/ojvalidation-base"; -import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "ojs/ojvalidation-datetime"; -import { NumberRangeValidator, NumberRangeValidatorFactory } from "ojs/ojvalidation-number"; -import { ojValidationGroup } from "ojs/ojvalidationgroup"; + AsyncValidator, LengthValidator, LengthValidatorFactory, RegExpValidator, RegExpValidatorFactory, RequiredValidator, RequiredValidatorFactory } from "@oracle/oraclejet/ojvalidation-base"; +import { DateRestrictionValidator, DateRestrictionValidatorFactory, DateTimeRangeValidator, DateTimeRangeValidatorFactory } from "@oracle/oraclejet/ojvalidation-datetime"; +import { NumberRangeValidator, NumberRangeValidatorFactory } from "@oracle/oraclejet/ojvalidation-number"; +import { ojValidationGroup } from "@oracle/oraclejet/ojvalidationgroup"; const onChangedCallback = (event: CustomEvent) => { }; diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 6119a97403..737bb98852 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -16,10 +16,10 @@ "../" ], "paths": { - "ojs": [ + "@oracle/oraclejet": [ "oracle__oraclejet" ], - "ojs/*": [ + "@oracle/oraclejet/*": [ "oracle__oraclejet/*" ] } From 1433a0c327ffa2fa99ca9816db5cb2fba437a3bc Mon Sep 17 00:00:00 2001 From: Naizam Olakara Date: Mon, 1 Oct 2018 21:36:58 -0700 Subject: [PATCH 0023/2268] Remove trailing space --- types/oracle__oraclejet/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/oracle__oraclejet/tsconfig.json b/types/oracle__oraclejet/tsconfig.json index 737bb98852..5f529007f8 100644 --- a/types/oracle__oraclejet/tsconfig.json +++ b/types/oracle__oraclejet/tsconfig.json @@ -22,7 +22,7 @@ "@oracle/oraclejet/*": [ "oracle__oraclejet/*" ] - } + } }, "files": [ "oracle__oraclejet-tests.ts", From f709ff624812765a9059d89dc324825cb271c5b3 Mon Sep 17 00:00:00 2001 From: Xiao Date: Thu, 18 Oct 2018 16:10:10 -0500 Subject: [PATCH 0024/2268] Create index.d.ts --- types/drivelist/index.d.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 types/drivelist/index.d.ts diff --git a/types/drivelist/index.d.ts b/types/drivelist/index.d.ts new file mode 100644 index 0000000000..b23e650218 --- /dev/null +++ b/types/drivelist/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for drivelist 6.4.3 +// Project: https://github.com/resin-io-modules/drivelist +// Definitions by: Xiao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.1.3 + +export type BusType = "SATA" | "SCSI" | "ATA" | "IDE" | "PCI" | "UNKNOWN"; + +export interface MountPoint { + path: string; + label?: string; +} + +export interface Drive { + enumerator: string; + busType: BusType; + busVersion: string | null; + device: string; + devicePath: string | null; + raw: string; + description: string; + error: any | null; + size: number | null; + blockSize: number | null; + logicalBlockSize: number | null; + mountpoints: MountPoint[]; + isReadOnly: boolean; + isSystem: boolean; + isVirtual: boolean | null; + isRemovable: boolean | null; + isCard: boolean | null; + isSCSI: boolean | null; + isUSB: boolean | null; + isUAS: boolean | null; +} + +export function list(callback: (error: any, drives: Drive[]) => void): void; From 2dc4d833df57efb8cd1de29cf738256e7da4396d Mon Sep 17 00:00:00 2001 From: Xiao Date: Thu, 18 Oct 2018 16:11:50 -0500 Subject: [PATCH 0025/2268] Create package.json --- types/drivelist/package.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 types/drivelist/package.json diff --git a/types/drivelist/package.json b/types/drivelist/package.json new file mode 100644 index 0000000000..9bba814b33 --- /dev/null +++ b/types/drivelist/package.json @@ -0,0 +1,20 @@ +{ + "name": "@types/drivelist", + "version": "6.4.3", + "description": "TypeScript definitions for drivelist", + "license": "MIT", + "contributors": [ + { + "name": "Xiao Deng", + "url": "https://github.com/WholeMilk" + } + ], + "main": "", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "peerDependencies": {} +} From a6bc8a07c823b0df055ee2a74fa829c4756612dd Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Fri, 26 Oct 2018 10:40:30 -0700 Subject: [PATCH 0026/2268] Seeding package --- package.json | 2 +- types/office-js-preview/index.d.ts | 68368 ++++++++++++++++ .../office-js-preview-tests.ts | 320 + types/office-js-preview/tsconfig.json | 24 + types/office-js-preview/tslint.json | 79 + 5 files changed, 68792 insertions(+), 1 deletion(-) create mode 100644 types/office-js-preview/index.d.ts create mode 100644 types/office-js-preview/office-js-preview-tests.ts create mode 100644 types/office-js-preview/tsconfig.json create mode 100644 types/office-js-preview/tslint.json diff --git a/package.json b/package.json index 09fe064d48..b55674f15b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint": "dtslint types" }, "devDependencies": { - "dtslint": "github:Microsoft/dtslint#production", + "dtslint": "^0.3.0", "types-publisher": "Microsoft/types-publisher#production" } } diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts new file mode 100644 index 0000000000..3899c02021 --- /dev/null +++ b/types/office-js-preview/index.d.ts @@ -0,0 +1,68368 @@ +// Type definitions for Office.js (Preview) +// Project: https://github.com/OfficeDev/office-js-preview +// Definitions by: OfficeDev , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham , Alex Jerabek , Elizabeth Samuel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/* +office-js-preview +Copyright (c) Microsoft Corporation +*/ + + +//////////////////////////////////////////////////////////////// +//////////////////// Begin Office namespace //////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Office { + /** + * Provides a container for APIs that are still in Preview, not released for use in production add-ins. + */ + var Preview: { + /** + * Initializes the use of custom JavaScript functions in Excel. + */ + startCustomFunctions(): Promise; + } + + /** A Promise object. Promises can be chained via ".then", and errors can be caught via ".catch". + * When a browser-provided native Promise implementation is available, Office.Promise will switch to use the native Promise instead. + */ + var Promise: IPromiseConstructor; + + // Note: this is a copy of the PromiseConstructor object from + // https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es2015.promise.d.ts + // It is necessary so that even with targeting "ES5" and not specifying any libs, + // developers will still get IntelliSense for "Office.Promise" just as they would with a regular Promise. + // (because even though Promise is part of standard lib.d.ts, PromiseConstructor is not) + interface IPromiseConstructor { + /** + * A reference to the prototype. + */ + readonly prototype: Promise; + + /** + * 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, + * 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; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; + + /** + * Creates a Promise that is resolved with an array of results when all of the provided Promises + * resolve, or rejected when any Promise is rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + all(values: (T | PromiseLike)[]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise; + + /** + * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved + * or rejected. + * @param values An array of Promises. + * @returns A new Promise. + */ + race(values: (T | PromiseLike)[]): Promise; + + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason: any): Promise; + + /** + * Creates a new rejected promise for the provided reason. + * @param reason The reason the promise was rejected. + * @returns A new rejected Promise. + */ + reject(reason: any): Promise; + + /** + * Creates a new resolved promise for the provided value. + * @param value A promise. + * @returns A promise whose internal state matches the provided promise. + */ + resolve(value: T | PromiseLike): Promise; + + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; + } + + /** + * Gets the Context object that represents the runtime environment of the add-in and provides access to the top-level objects of the API. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + var context: Context; + /** + * Occurs when the runtime environment is loaded and the add-in is ready to start interacting with the application and hosted document. + * + * The reason parameter of the initialize event listener function returns an `InitializationReason` enumeration value that specifies how + * initialization occurred. A task pane or content add-in can be initialized in two ways: + * + * - The user just inserted it from Recently Used Add-ins section of the Add-in drop-down list on the Insert tab of the ribbon in the Office + * host application, or from Insert add-in dialog box. + * + * - The user opened a document that already contains the add-in. + * + * *Note*: The reason parameter of the initialize event listener function only returns an `InitializationReason` enumeration value for task pane + * and content add-ins. It does not return a value for Outlook add-ins. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ * + * @param reason Indicates how the app was initialized. + */ + function initialize(reason: InitializationReason): void; + /** + * Ensures that the Office JavaScript APIs are ready to be called by the add-in. If the framework hasn't initialized yet, the callback or promise + * will wait until the Office host is ready to accept API calls. Note that though this API is intended to be used inside an Office add-in, it can + * also be used outside the add-in. In that case, once Office.js determines that it is running outside of an Office host application, it will call + * the callback and resolve the promise with "null" for both the host and platform. + * + * @param callback - An optional callback method, that will receive the host and platform info. + * Alternatively, rather than use a callback, an add-in may simply wait for the Promise returned by the function to resolve. + * @returns A Promise that contains the host and platform info, once initialization is completed. + */ + function onReady(callback?: (info: { host: HostType, platform: PlatformType }) => any): Promise<{ host: HostType, platform: PlatformType }>; + /** + * Toggles on and off the `Office` alias for the full `Microsoft.Office.WebExtension` namespace. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ * + * @param useShortNamespace True to use the shortcut alias; otherwise false to disable it. The default is true. + */ + function useShortNamespace(useShortNamespace: boolean): void; + // Enumerations + /** + * Specifies the result of an asynchronous call. + * + * @remarks + * + * Returned by the `status` property of the {@link Office.AsyncResult | AsyncResult} object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y
+ */ + enum AsyncResultStatus { + /** + * The call succeeded. + */ + Succeeded, + /** + * The call failed, check the error object. + */ + Failed + } + /** + * Specifies whether the add-in was just inserted or was already contained in the document. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
+ */ + enum InitializationReason { + /** + * The add-in was just inserted into the document. + */ + Inserted, + /** + * The add-in is already part of the document that was opened. + */ + DocumentOpened + } + /** + * Specifies the host Office application in which the add-in is running. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
OneNote Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + enum HostType { + /** + * The Office host is Microsoft Word. + */ + Word, + /** + * The Office host is Microsoft Excel. + */ + Excel, + /** + * The Office host is Microsoft PowerPoint. + */ + PowerPoint, + /** + * The Office host is Microsoft Outlook. + */ + Outlook, + /** + * The Office host is Microsoft OneNote. + */ + OneNote, + /** + * The Office host is Microsoft Project. + */ + Project, + /** + * The Office host is Microsoft Access. + */ + Access + } + /** + * Specifies the OS or other platform on which the Office host application is running. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
OneNote Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + enum PlatformType { + /** + * The platform is PC (Windows). + */ + PC, + /** + * The platform is Office Online. + */ + OfficeOnline, + /** + * The platform is Mac. + */ + Mac, + /** + * The platform an iOS device. + */ + iOS, + /** + * The platform is an Android device. + */ + Android, + /** + * The platform is WinRT. + */ + Universal + } + // Objects + /** + * An object which encapsulates the result of an asynchronous request, including status and error information if the request failed. + * + * @remarks + *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ * + * When the function you pass to the `callback` parameter of an "Async" method executes, it receives an AsyncResult object that you can access + * from the `callback` function's only parameter. + */ + interface AsyncResult { + /** + * Gets the user-defined item passed to the optional `asyncContext` parameter of the invoked method in the same state as it was passed in. + * This returns the user-defined item (which can be of any JavaScript type: String, Number, Boolean, Object, Array, Null, or Undefined) passed + * to the optional `asyncContext` parameter of the invoked method. Returns Undefined, if you didn't pass anything to the asyncContext parameter. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project
Word Y Y Y
+ */ + asyncContext: any; + /** + * Gets an {@link Office.Error} object that provides a description of the error, if any error occurred. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + error: Office.Error; + /** + * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + status: AsyncResultStatus; + /** + * Gets the payload or content of this asynchronous operation, if any. + * + * @remarks + * You access the AsyncResult object in the function passed as the argument to the callback parameter of an "Async" method, such as the + * `getSelectedDataAsync` and `setSelectedDataAsync` methods of the {@link Office.Document | Document} object. + * + * Note: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. + * To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + value: T; + } + /** + * Represents the runtime environment of the add-in and provides access to key objects of the API. + * The current context exists as a property of Office. It is accessed using `Office.context`. + * + * @remarks + *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ */ + interface Context { + /** + * True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False. + * + * @remarks + * The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running on + * the Windows desktop or for Office Online in the browser do allow such links. If you want the UI of your add-in to provide a link to an + * external payment system on platforms other than iOS, you can use the commerceAllowed property to control when that link is displayed. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for iPad
Excel Y
Word Y
+ */ + commerceAllowed: boolean; + /** + * Gets the locale (language) specified by the user for editing the document or item. + * + * @remarks + * The `contentLanguage` value reflects the **Editing Language** setting specified with **File \> Options \> Language** in the Office host + * application. + * + * In content add-ins for Access web apps, the `contentLanguage` property gets the add-in culture (e.g., "en-GB"). + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + contentLanguage: string; + /** + * Gets information about the environment in which the add-in is running. + */ + diagnostics: ContextInformation; + /** + * Gets the locale (language) specified by the user for the UI of the Office host application. + * + * @remarks + * + * The returned value is a string in the RFC 1766 Language tag format, such as en-US. + * + * The `displayLanguage` value reflects the current **Display Language** setting specified with **File \> Options \> Language** in the Office + * host application. + * + * In content add-ins for Access web apps, the `displayLanguage property` gets the add-in language (e.g., "en-US"). + * + * When using in Outlook, the applicable modes are Compose or read. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y
+ */ + displayLanguage: string; + /** + * Gets an object that represents the document the content or task pane add-in is interacting with. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + document: Office.Document; + /** + * Contains the Office application host in which the add-in is running. + */ + host: HostType; + /** + * Gets the license information for the user's Office installation. + */ + license: string; + /** + * Provides access to the Outlook Add-in object model for Microsoft Outlook and Microsoft Outlook on the web. + * + * Namespaces: + * + * - diagnostics: Provides diagnostic information to an Outlook add-in. + * + * - item: Provides methods and properties for accessing a message or appointment in an Outlook add-in. + * + * - userProfile: Provides information about the user in an Outlook add-in. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + mailbox: Office.Mailbox; + /** + * Provides access to the properties for Office theme colors. + */ + officeTheme: OfficeTheme; + /** + * Provides the platform on which the add-in is running. + */ + platform: PlatformType; + /** + * Provides a method for determining what requirement sets are supported on the current host and platform. + */ + requirements: RequirementSetSupport; + /** + * Gets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. + * + * The RoamingSettings object lets you store and access data for a mail add-in that is stored in a user's mailbox, so that is available to + * that add-in when it is running from any host client application used to access that mailbox. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + roamingSettings: Office.RoamingSettings; + /** + * Specifies whether the platform and device allows touch interaction. + * True if the add-in is running on a touch device, such as an iPad; false otherwise. + * + * @remarks + * Use the touchEnabled property to determine when your add-in is running on a touch device and if necessary, adjust the kind of controls, and + * size and spacing of elements in your add-in's UI to accommodate touch interactions. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for iPad
Excel Y
PowerPoint Y
Word Y
+ */ + touchEnabled: boolean; + /** + * Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes. + */ + ui: UI; + } + /** + * Provides specific information about an error that occurred during an asynchronous data operation. + * + * @remarks + * The Error object is accessed from the AsyncResult object that is returned in the function passed as the callback argument of an asynchronous + * data operation, such as the setSelectedDataAsync method of the Document object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + interface Error { + /** + * Gets the numeric code of the error. + */ + code: number; + /** + * Gets the name of the error. + */ + message: string; + /** + * Gets a detailed description of the error. + */ + name: string; + } + namespace AddinCommands { + /** + * The event object is passed as a parameter to add-in functions invoked by UI-less command buttons. The object allows the add-in to identify + * which button was clicked and to signal the host that it has completed its processing. + * + * @remarks + * + * + * + * + * + *
Add-in typeContent, task pane, Outlook
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or Read
+ */ + interface Event { + + /** + * Information about the control that triggered calling this function. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Outlook Y (Mailbox 1.3)
+ */ + source:Source; + /** + * Indicates that the add-in has completed processing that was triggered by an add-in command button or event handler. + * + * This method must be called at the end of a function which was invoked by an add-in command defined with an Action element with an + * xsi:type attribute set to ExecuteFunction. Calling this method signals the host client that the function is complete and that it can + * clean up any state involved with invoking the function. For example, if the user closes Outlook before this method is called, Outlook + * will warn that a function is still executing. + * + * This method must be called in an event handler added via Office.context.mailbox.addHandlerAsync after completing processing of the event. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Outlook Y (Mailbox 1.3)
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * allowEvent: A boolean value. When the completed method is used to signal completion of an event handler, + * this value indicates of the handled event should continue execution or be canceled. + * For example, an add-in that handles the ItemSend event can set allowEvent = false to cancel sending of the message. + */ + completed(options?: any): void; + } + + /** + * Encapsulates source data for add-in events. + */ + interface Source { + + /** + * The id of the control that triggered calling this function. The id comes from the manifest and is the unique ID of your Office Add-in + * as a GUID. + */ + id: string; + } + } + /** + * Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes, in your Office Add-ins. + * + * Visit "{@link https://docs.microsoft.com/office/dev/add-ins/develop/dialog-api-in-office-add-ins | Use the Dialog API in your Office Add-ins}" + * for more information. + */ + interface UI { + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * + * @remarks + * + * + *
HostsWord, Excel, Outlook, PowerPoint
Requirement setsDialogApi, Mailbox 1.4
+ * + * This method is available in the DialogApi requirement set for Word, Excel, or PowerPoint add-ins, and in the Mailbox requirement set 1.4 + * for Outlook. For more on how to specify a requirement set in your manifest, see + * {@link https://docs.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office hosts and API requirements}. + * + * The initial page must be on the same domain as the parent page (the startAddress parameter). After the initial page loads, you can go to + * other domains. + * + * Any page calling `office.context.ui.messageParent` must also be on the same domain as the parent page. + * + * **Design considerations**: + * + * The following design considerations apply to dialog boxes: + * + * - An Office Add-in task pane can have only one dialog box open at any time. Multiple dialogs can be open at the same time from Add-in + * Commands (custom ribbon buttons or menu items). + * + * - Every dialog box can be moved and resized by the user. + * + * - Every dialog box is centered on the screen when opened. + * + * - Dialog boxes appear on top of the host application and in the order in which they were created. + * + * Use a dialog box to: + * + * - Display authentication pages to collect user credentials. + * + * - Display an error/progress/input screen from a ShowTaskpane or ExecuteAction command. + * + * - Temporarily increase the surface area that a user has available to complete a task. + * + * Do not use a dialog box to interact with a document. Use a task pane instead. + * + * For a design pattern that you can use to create a dialog box, see + * {@link https://github.com/OfficeDev/Office-Add-in-UX-Design-Patterns/blob/master/Patterns/Client_Dialog.md | Client Dialog} in the Office + * Add-in UX Design Patterns repository on GitHub. + * + * **displayDialogAsync Errors**: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Code numberMeaning
12004The domain of the URL passed to displayDialogAsync is not trusted. The domain must be either the same domain as the host page (including protocol and port number), or it must be registered in the section of the add-in manifest.
12005The URL passed to displayDialogAsync uses the HTTP protocol. HTTPS is required. (In some versions of Office, the error message returned with 12005 is the same one returned for 12004.)
12007A dialog box is already opened from the task pane. A task pane add-in can only have one dialog box open at a time.
+ * + * In the callback function passed to the displayDialogAsync method, you can use the properties of the AsyncResult object to return the + * following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to
AsyncResult.valueAccess the Dialog object.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextAccess your user-defined object or value, if you passed one as the asyncContext parameter.
+ * + * @param startAddress - Accepts the initial HTTPS URL that opens in the dialog. + * @param options - Optional. Accepts an {@link Office.DialogOptions} object to define dialog display. + * @param callback - Optional. Accepts a callback method to handle the dialog creation attempt. If successful, the AsyncResult.value is a Dialog object. + */ + displayDialogAsync(startAddress: string, options?: DialogOptions, callback?: (result: AsyncResult) => void): void; + /** + * Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent. + * @param messageObject Accepts a message from the dialog to deliver to the add-in. + */ + messageParent(messageObject: any): void; + /** + * Closes the UI container where the JavaScript is executing. + * + * @remarks + *
HostsExcel, Word, PowerPoint, Outlook (Minimum requirement set: Mailbox 1.5)
+ * + * The behavior of this method is specified by the following: + * + * - Called from a UI-less command button: No effect. Any dialog opened by displayDialogAsync will remain open. + * + * - Called from a taskpane: The taskpane will close. Any dialog opened by displayDialogAsync will also close. + * If the taskpane supports pinning and was pinned by the user, it will be un-pinned. + * + * - Called from a module extension: No effect. + */ + closeContainer(): void; + } + + /** + * Provides information about what Requirement Sets are supported in current environment. + */ + interface RequirementSetSupport { + /** + * Check if the specified requirement set is supported by the host Office application. + * @param name - Set name; e.g., "MatrixBindings". + * @param minVersion - The minimum required version; e.g., "1.4". + */ + isSetSupported(name: string, minVersion?: number): boolean; + } + + /** + * Provides options for how a dialog is displayed. + */ + interface DialogOptions { + /** + * Defines the width of the dialog as a percentage of the current display. Defaults to 80%. 250px minimum. + */ + height?: number, + /** + * Defines the height of the dialog as a percentage of the current display. Defaults to 80%. 150px minimum. + */ + width?: number, + /** + * Determines whether the dialog box should be displayed within an IFrame. This setting is only applicable in Office Online clients, and is + * ignored by other platforms. If false (default), the dialog will be displayed as a new browser window (pop-up). Recommended for + * authentication pages that cannot be displayed in an IFrame. If true, the dialog will be displayed as a floating overlay with an IFrame. + * This is best for user experience and performance. + */ + displayInIframe?: boolean + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides an option for preserving context data of any type, unchanged, for use in a callback. + */ + interface AsyncContextOptions { + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides information about the environment in which the add-in is running. + */ + interface ContextInformation { + /** + * Gets the Office application host in which the add-in is running. + */ + host: Office.HostType; + /** + * Gets the platform on which the add-in is running. + */ + platform: Office.PlatformType; + /** + * Gets the version of Office on which the add-in is running. + */ + version: string; + } + /** + * Provides options for how to get the data in a binding. + * + * @remarks + * If the rows option is used, the value must be "thisRow". + */ + interface GetBindingDataOptions { + /** + * The expected shape of the selection. Use {@link Office.CoercionType} or text value. Default: The original, uncoerced type of the binding. + */ + coercionType?: Office.CoercionType | string + /** + * Specifies whether values, such as numbers and dates, are returned with their formatting applied. Use Office.ValueFormat or text value. + * Default: Unformatted data. + */ + valueFormat?: Office.ValueFormat | string + /** + * For table or matrix bindings, specifies the zero-based starting row for a subset of the data in the binding. Default is first row. + */ + startRow?: number + /** + * For table or matrix bindings, specifies the zero-based starting column for a subset of the data in the binding. Default is first column. + */ + startColumn?: number + /** + * For table or matrix bindings, specifies the number of rows offset from the startRow. Default is all subsequent rows. + */ + rowCount?: number + /** + * For table or matrix bindings, specifies the number of columns offset from the startColumn. Default is all subsequent columns. + */ + columnCount?: number + /** + * Specify whether to get only the visible (filtered in) data or all the data (default is all). Useful when filtering data. + * Use Office.FilterType or text value. + */ + filterType?: Office.FilterType | string + /** + * Only for table bindings in content add-ins for Access. Specifies the pre-defined string "thisRow" to get data in the currently selected row. + */ + rows?: string + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for how to set the data in a binding. + * + * @remarks + * If the rows option is used, the value must be "thisRow". + */ + interface SetBindingDataOptions { + /** + * Use only with binding type table and when a TableData object is passed for the data parameter. An array of objects that specify a range of + * columns, rows, or cells and specify, as key-value pairs, the cell formatting to apply to that range. + * + * Example: `[{cells: Office.Table.Data, format: {fontColor: "yellow"}}, {cells: {row: 3, column: 4}, format: {borderColor: "white", fontStyle: "bold"}}]` + */ + cellFormat?: Array + /** + * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. + */ + coercionType?: Office.CoercionType | string + /** + * Only for table bindings in content add-ins for Access. Array of strings. Specifies the column names. + */ + columns?: Array + /** + * Only for table bindings in content add-ins for Access. Specifies the pre-defined string "thisRow" to get data in the currently selected row. + */ + rows?: string + /** + * Specifies the zero-based starting row for a subset of the data in the binding. Only for table or matrix bindings. If omitted, data is set + * starting in the first row. + */ + startRow?: number + /** + * Specifies the zero-based starting column for a subset of the data. Only for table or matrix bindings. If omitted, data is set starting in + * the first column. + */ + startColumn?: number + /** + * For an inserted table, a list of key-value pairs that specify table formatting options, such as header row, total row, and banded rows. + * Example: `{bandedRows: true, filterButton: false}` + */ + tableOptions?: object + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Specifies a range and its formatting. + */ + interface RangeFormatConfiguration { + /** + * Specifies the range. Example of using Office.Table enum: Office.Table.All. Example of using RangeCoordinates: \{row: 3, column: 4\} specifies + * the cell in the 3rd (zero-based) row in the 4th (zero-based) column. + */ + cells: Office.Table | RangeCoordinates + /** + * Specifies the formatting as key-value pairs. Example: \{borderColor: "white", fontStyle: "bold"\} + */ + format: object + } + /** + * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: \{row: 3, column: 4\} specifies the cell in the 3rd + * (zero-based) row in the 4th (zero-based) column. + */ + interface RangeCoordinates { + /** + * The zero-based row of the range. If not specified, all cells, in the column specified by `column` are included. + */ + row?: number + /** + * The zero-based column of the range. If not specified, all cells, in the row specified by `row` are included. + */ + column?: number + } + /** + * Provides options to determine which event handler or handlers are removed. + */ + interface RemoveHandlerOptions { + /** + * The handler to be removed. If not specified all handlers for the specified event type are removed. + */ + handler?: string + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for configuring the binding that is created. + */ + interface AddBindingFromNamedItemOptions { + /** + * The unique ID of the binding. Autogenerated if not supplied. + */ + id?: string + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for configuring the prompt and identifying the binding that is created. + */ + interface AddBindingFromPromptOptions { + /** + * The unique ID of the binding. Autogenerated if not supplied. + */ + id?: string + /** + * Specifies the string to display in the prompt UI that tells the user what to select. Limited to 200 characters. + * If no promptText argument is passed, "Please make a selection" is displayed. + */ + promptText?: string + /** + * Specifies a table of sample data displayed in the prompt UI as an example of the kinds of fields (columns) that can be bound by your add-in. + * The headers provided in the TableData object specify the labels used in the field selection UI. + * Note: This parameter is used only in add-ins for Access. It is ignored if provided when calling the method in an add-in for Excel. + */ + sampleData?: Office.TableData + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for configuring the prompt and identifying the binding that is created. + */ + interface AddBindingFromSelectionOptions { + /** + * The unique ID of the binding. Autogenerated if not supplied. + */ + id?: string + /** + * The names of the columns involved in the binding. + */ + columns?: Array + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for setting the size of slices that the document will be divided into. + */ + interface GetFileOptions { + /** + * The the size of the slices in bytes. The maximum (and the default) is 4194304 (4MB). + */ + sliceSize?: number + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for customizing what data is returned and how it is formatted. + */ + interface GetSelectedDataOptions { + /** + * Specify whether the data is formatted. Use Office.ValueFormat or string equivalent. + */ + valueFormat?: Office.ValueFormat | string + /** + * Specify whether to get only the visible (that is, filtered-in) data or all the data. Useful when filtering data. + * Use {@link Office.FilterType} or string equivalent. This parameter is ignored in Word documents. + */ + filterType?: Office.FilterType | string + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for whether to select the location that is navigated to. + * + * @remarks + * The behavior caused by the {@link Office.SelectionMode | options.selectionMode} option varies by host: + * + * In Excel: `Office.SelectionMode.Selected` selects all content in the binding, or named item. `Office.SelectionMode.None` for text bindings, + * selects the cell; for matrix bindings, table bindings, and named items, selects the first data cell (not first cell in header row for tables). + * + * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. + * `Office.SelectionMode.None` doesn't select anything. + * + * In Word: `Office.SelectionMode.Selected` selects all content in the binding. `Office.SelectionMode.None` for text bindings, moves the cursor to + * the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). + */ + interface GoToByIdOptions { + /** + * Specifies whether the location specified by the id parameter is selected (highlighted). + * Use {@link Office.SelectionMode} or string equivalent. See the Remarks for more information. + */ + selectionMode?: Office.SelectionMode | string + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for how to insert data to the selection. + */ + interface SetSelectedDataOptions { + /** + * Use only with binding type table and when a TableData object is passed for the data parameter. An array of objects that specify a range of + * columns, rows, or cells and specify, as key-value pairs, the cell formatting to apply to that range. + * + * Example: `[\{cells: Office.Table.Data, format: \{fontColor: "yellow"\}\}, \{cells: \{row: 3, column: 4\}, format: \{borderColor: "white", fontStyle: "bold"\}\}]` + */ + cellFormat?: Array + /** + * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. + */ + coercionType?: Office.CoercionType | string + /** + * For an inserted table, a list of key-value pairs that specify table formatting options, such as header row, total row, and banded rows. + * Example: `{bandedRows: true, filterButton: false}` + */ + tableOptions?: object + /** + * This option is applicable for inserting images. Indicates the insert location in relation to the top of the slide for PowerPoint, and its + * relation to the currently selected cell in Excel. This value is ignored for Word. This value is in points. + */ + imageTop?: number + /** + * This option is applicable for inserting images. Indicates the image width. If this option is provided without the imageHeight, the image + * will scale to match the value of the image width. If both image width and image height are provided, the image will be resized accordingly. + * If neither the image height or width is provided, the default image size and aspect ratio will be used. This value is in points. + */ + imageWidth?: number + /** + * This option is applicable for inserting images. Indicates the insert location in relation to the left side of the slide for PowerPoint, and + * its relation to the currently selected cell in Excel. This value is ignored for Word. This value is in points. + */ + imageLeft?: number + /** + * This option is applicable for inserting images. Indicates the image height. If this option is provided without the imageWidth, the image + * will scale to match the value of the image height. If both image width and image height are provided, the image will be resized accordingly. + * If neither the image height or width is provided, the default image size and aspect ratio will be used. This value is in points. + */ + imageHeight?: number + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides options for saving settings. + */ + interface SaveSettingsOptions { + /** + * Indicates whether the setting will be replaced if stale. + */ + overwriteIfStale?: boolean + /** + * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + */ + asyncContext?: any + } + /** + * Provides access to the properties for Office theme colors. + * + * Using Office theme colors lets you coordinate the color scheme of your add-in with the current Office theme selected by the user with File \> + * Office Account \> Office Theme UI, which is applied across all Office host applications. Using Office theme colors is appropriate for mail and + * task pane add-ins. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that these properties are supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop
Excel Y
Outlook Y (in preview)
PowerPoint Y
Word Y
+ */ + interface OfficeTheme { + /** + * Gets the Office theme body background color as a hexadecimal color triplet (e.g. "FFA500"). + */ + bodyBackgroundColor: string; + /** + * Gets the Office theme body foreground color as a hexadecimal color triplet (e.g. "FFA500"). + */ + bodyForegroundColor: string; + /** + * Gets the Office theme control background color as a hexadecimal color triplet (e.g. "FFA500"). + */ + controlBackgroundColor: string; + /** + * Gets the Office theme body control color as a hexadecimal color triplet (e.g. "FFA500"). + */ + controlForegroundColor: string; + } + /** + * The object that is returned when `UI.displayDialogAsync` is called. It exposes methods for registering event handlers and closing the dialog. + */ + interface Dialog { + /** + * Called from a parent page to close the corresponding dialog box. + */ + close(): void; + /** + * Registers an event handler. The two supported events are: + * + * - DialogMessageReceived. Triggered when the dialog box sends a message to its parent. + * + * - DialogEventReceived. Triggered when the dialog box has been closed or otherwise unloaded. + */ + addEventHandler(eventType: Office.EventType, handler: Function): void; + /** + * FOR INTERNAL USE ONLY. DO NOT CALL IN YOUR CODE. + */ + sendMessage(name: string): void; + } +} + +declare namespace Office { + /** + * Returns a promise of an object described in the expression. Callback is invoked only if method fails. + * + * @param expression The object to be retrieved. Example "bindings#BindingName", retrieves a binding promise for a binding named 'BindingName' + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y
+ */ + function select(expression: string, callback?: (result: AsyncResult) => void): Binding; + // Enumerations + /** + * Specifies the state of the active view of the document, for example, whether the user can edit the document. + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
+ */ + enum ActiveView { + /** + * The active view of the host application only lets the user read the content in the document. + */ + Read, + /** + * The active view of the host application lets the user edit the content in the document. + */ + Edit + } + /** + * Specifies the type of the binding object that should be returned. + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + enum BindingType { + /** + * Plain text. Data is returned as a run of characters. + */ + Text, + /** + * Tabular data without a header row. Data is returned as an array of arrays, for example in this form: + * [[row1column1, row1column2],[row2column1, row2column2]] + */ + Matrix, + /** + * Tabular data with a header row. Data is returned as a {@link Office.TableData | TableData} object. + */ + Table + } + /** + * Specifies how to coerce data returned or set by the invoked method. + * + * @remarks + * PowerPoint supports only `Office.CoercionType.Text`, `Office.CoercionType.Image`, and `Office.CoercionType.SlideRange`. + * + * Project supports only `Office.CoercionType.Text`. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + enum CoercionType { + /** + * Return or set data as text (string). Data is returned or set as a one-dimensional run of characters. + */ + Text, + /** + * Return or set data as tabular data with no headers. Data is returned or set as an array of arrays containing one-dimensional runs of + * characters. For example, three rows of string values in two columns would be: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. + * + * Note: Only applies to data in Excel and Word. + */ + Matrix, + /** + * Return or set data as tabular data with optional headers. Data is returned or set as an array of arrays with optional headers. + * + * Note: Only applies to data in Access, Excel, and Word. + */ + Table, + /** + * Return or set data as HTML. + * + * Note: Only applies to data in add-ins for Word and Outlook add-ins for Outlook (compose mode). + */ + Html, + /** + * Return or set data as Office Open XML. + * + * Note: Only applies to data in Word. + */ + Ooxml, + /** + * Return a JSON object that contains an array of the ids, titles, and indexes of the selected slides. For example, + * `{"slides":[{"id":257,"title":"Slide 2","index":2},{"id":256,"title":"Slide 1","index":1}]}` for a selection of two slides. + * + * Note: Only applies to data in PowerPoint when calling the {@link Office.Document | Document}.getSelectedData method to get the current + * slide or selected range of slides. + */ + SlideRange, + /** + * Data is returned or set as an image stream. + * Note: Only applies to data in Excel, Word and PowerPoint. + */ + Image + } + /** + * Specifies whether the document in the associated application is read-only or read-write. + * + * @remarks + * + * Returned by the mode property of the {@link Office.Document | Document} object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y
+ */ + enum DocumentMode { + /** + * The document is read-only. + */ + ReadOnly, + /** + * The document can be read and written to. + */ + ReadWrite + } + /** + * Specifies the type of the XML node. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
+ */ + enum CustomXMLNodeType { + /** + * The node is an attribute. + */ + Attribute, + /** + * The node is CData. + */ + CData, + /** + * The node is a comment. + */ + NodeComment, + /** + * The node is an element. + */ + Element, + /** + * The node is a Document element. + */ + NodeDocument, + /** + * The node is a processing instruction. + */ + ProcessingInstruction, + /** + * The node is text. + */ + Text, + } + /** + * Specifies the kind of event that was raised. Returned by the `type` property of an *EventArgs object. + * + * Add-ins for Project support the `Office.EventType.ResourceSelectionChanged`, `Office.EventType.TaskSelectionChanged`, and + * `Office.EventType.ViewSelectionChanged` event types. + * + * BindingDataChanged and BindingSelectionChanged hosts
Access, Excel, Word
+ * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Outlook Y Y Y
PowerPoint Y Y
Project Y
Word Y Y
+ */ + enum EventType { + /** + * A Document.ActiveViewChanged event was raised. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
+ */ + ActiveViewChanged, + /** + * Triggers when any date or time of the selected appointment or series is changed in Outlook. + * + * [Api set: Mailbox 1.7] + */ + AppointmentTimeChanged, + /** + * Occurs when data within the binding is changed. + * To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object. + * The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + BindingDataChanged, + /** + * Occurs when the selection is changed within the binding. To add an event handler for the BindingSelectionChanged event of a binding, use + * the addHandlerAsync method of the Binding object. The event handler receives an argument of type {@link Office.BindingSelectionChangedEventArgs}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + BindingSelectionChanged, + /** + * Triggers when Dialog sends a message via MessageParent. + */ + DialogMessageReceived, + /** + * Triggers when Dialog has an event, such as dialog closed or dialog navigation failed. + */ + DialogEventReceived, + /** + * Triggers when a document-level selection happens. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
+ */ + DocumentSelectionChanged, + /** + * Triggers when the selected Outlook item is changed. + * + * [Api set: Mailbox 1.1] + */ + ItemChanged, + /** + * Triggers when a customXmlPart node is deleted. + */ + NodeDeleted, + /** + * Triggers when a customXmlPart node is inserted. + */ + NodeInserted, + /** + * Triggers when a customXmlPart node is replaced. + */ + NodeReplaced, + /** + * Triggers when the OfficeTheme is changed in Outlook. + * + * [Api set: Mailbox Preview] + */ + OfficeThemeChanged, + /** + * Triggers when the recipient list of the selected item or the appointment location is changed in Outlook. + * + * [Api set: Mailbox 1.7] + */ + RecipientsChanged, + /** + * Triggers when the recurrence pattern of the selected series is changed in Outlook. + * + * [Api set: Mailbox 1.7] + */ + RecurrenceChanged, + /** + * Triggers when a Resource selection happens in Project. + */ + ResourceSelectionChanged, + /** + * A Settings.settingsChanged event was raised. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ */ + SettingsChanged, + /** + * Triggers when a Task selection happens in Project. + */ + TaskSelectionChanged, + /** + * Triggers when a View selection happens in Project. + */ + ViewSelectionChanged + } + /** + * Specifies the format in which to return the document. + * + * @remarks + * FileType.Text is only supported in Word, FileType.Pdf is only supported in Word for Windows, Word for Mac, Word Online, and PowerPoint. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ */ + enum FileType { + /** + * Returns only the text of the document as a string. (Word only) + */ + Text, + /** + * Returns the entire document (.pptx, .docx, or .xlsx) in Office Open XML (OOXML) format as a byte array. + */ + Compressed, + /** + * Returns the entire document in PDF format as a byte array. + */ + Pdf + } + /** + * Specifies whether filtering from the host application is applied when the data is retrieved. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
+ */ + enum FilterType { + /** + * Return all data (not filtered by the host application). + */ + All, + /** + * Return only the visible data (as filtered by the host application). + */ + OnlyVisible + } + /** + * Specifies the type of place or object to navigate to. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
+ */ + enum GoToType { + /** + * Goes to a binding object using the specified binding id. + * + * Supported hosts: Excel, Word + */ + Binding, + /** + * Goes to a named item using that item's name. + * In Excel, you can use any structured reference for a named range or table: "Worksheet2!Table1" + * + * Supported hosts: Excel + */ + NamedItem, + /** + * Goes to a slide using the specified id. + * + * Supported hosts: PowerPoint + */ + Slide, + /** + * Goes to the specified index by slide number or {@link Office.Index}. + * + * Supported hosts: PowerPoint + */ + Index + } + /** + * Specifies the relative PowerPoint slide. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
+ */ + enum Index { + /** + * Represents the first PowerPoint slide + */ + First, + /** + * Represents the last PowerPoint slide + */ + Last, + /** + * Represents the next PowerPoint slide + */ + Next, + /** + * Represents the previous PowerPoint slide + */ + Previous + } + /** + * Specifies whether to select (highlight) the location to navigate to (when using the {@link Office.Document | Document}.goToByIdAsync method). + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y
Word Y Y
+ */ + enum SelectionMode { + Default, + /** + * The location will be selected (highlighted). + */ + Selected, + /** + * The cursor is moved to the beginning of the location. + */ + None + } + /** + * Specifies whether values, such as numbers and dates, returned by the invoked method are returned with their formatting applied. + * + * @remarks + * For example, if the valueFormat parameter is specified as "formatted", a number formatted as currency, or a date formatted as mm/dd/yy in the + * host application will have its formatting preserved. If the valueFormat parameter is specified as "unformatted", a date will be returned in its + * underlying sequential serial number form. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
+ */ + enum ValueFormat { + /** + * Return unformatted data. + */ + Unformatted, + /** + * Return formatted data. + */ + Formatted + } + // Objects + /** + * Represents a binding to a section of the document. + * + * @remarks + *
Requirement SetsMatrixBinding, TableBinding, TextBinding
+ * + * The Binding object exposes the functionality possessed by all bindings regardless of type. + * + * The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: + * {@link Office.MatrixBinding}, {@link Office.TableBinding}, or {@link Office.TextBinding}. All three of these objects inherit the getDataAsync + * and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the id and type + * properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- + * and table-specific features, such as counting the number of rows and columns. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + interface Binding { + + + /** + * Get the Document object associated with the binding. + */ + document: Office.Document; + /** + * A string that uniquely identifies this binding among the bindings in the same {@link Office.Document} object. + */ + id: string; + /** + * Gets the type of the binding. + */ + type: Office.BindingType; + /** + * Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are + * `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`. + * + * @remarks + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.BindingDataChangedEventArgs} or {@link Office.BindingSelectionChangedEventArgs}. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void; + /** + * Returns the data contained within the binding. + * + * @remarks + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, + * startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range). + * + * @param options Provides options for how to get the data in a binding. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the values in the specified binding. + * If the `coercionType` parameter is specified (and the call is successful), the data is returned in the format described in the CoercionType enumeration topic. + */ + getDataAsync(options?: GetBindingDataOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes the specified handler from the binding for the specified event type. + * + * @remarks + *
Requirement SetsBindingEvents
+ * + * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. + * @param options Provides options to determine which event handler or handlers are removed. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; + /** + * Writes data to the bound section of the document represented by the specified binding object. + * + * @remarks + * + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * The value passed for data contains the data to be written in the binding. The kind of value passed determines what will be written as + * described in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
`data` valueData written
A stringPlain text or anything that can be coerced to a string will be written.
An array of arrays ("matrix")Tabular data without headers will be written. For example, to write data to three rows in two columns, you can pass an array like this: `[["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]`. To write a single column of three rows, pass an array like this: `[["R1C1"], ["R2C1"], ["R3C1"]]`.
An {@link Office.TableData} objectA table with headers will be written.
+ * + * Additionally, these application-specific actions apply when writing data to a binding. For Word, the specified data is written to the + * binding as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
`data` valueData written
A stringThe specified text is written.
An array of arrays ("matrix") or an {@link Office.TableData} objectA Word table is written.
HTMLThe specified HTML is written. If any of the HTML you write is invalid, Word will not raise an error. Word will write as much of the HTML as it can and will omit any invalid data.
Office Open XML ("Open XML")The specified the XML is written.
+ * + * For Excel, the specified data is written to the binding as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
`data` valueData written
A stringThe specified text is inserted as the value of the first bound cell.You can also specify a valid formula to add that formula to the bound cell. For example, setting data to `"=SUM(A1:A5)"` will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added formula (or any pre-existing formula) from the bound cell. If you call the Binding.getDataAsync method on the bound cell to read its data, the method can return only the data displayed in the cell (the formula's result).
An array of arrays ("matrix"), and the shape exactly matches the shape of the binding specifiedThe set of rows and columns are written.You can also specify an array of arrays that contain valid formulas to add them to the bound cells. For example, setting data to `[["=SUM(A1:A5)","=AVERAGE(A1:A5)"]]` will add those two formulas to a binding that contains two cells. Just as when setting a formula on a single bound cell, you can't read the added formulas (or any pre-existing formulas) from the binding with the `Binding.getDataAsync` method - it returns only the data displayed in the bound cells.
An {@link Office.TableData} object, and the shape of the table matches the bound table.The specified set of rows and/or headers are written, if no other data in surrounding cells will be overwritten. Note: If you specify formulas in the TableData object you pass for the *data* parameter, you might not get the results you expect due to the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to write *data* that contains formulas to a bound table, try specifying the data as an array of arrays (instead of a TableData object), and specify the *coercionType* as Microsoft.Office.Matrix or "matrix".
+ * + * For Excel Online: + * + * - The total number of cells in the value passed to the data parameter can't exceed 20,000 in a single call to this method. + * + * - The number of formatting groups passed to the cellFormat parameter can't exceed 100. + * A single formatting group consists of a set of formatting applied to a specified range of cells. + * + * In all other cases, an error is returned. + * + * The setDataAsync method will write data in a subset of a table or matrix binding if the optional startRow and startColumn parameters are + * specified, and they specify a valid range. + * + * In the callback function passed to the setDataAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * @param data The data to be set in the current selection. Possible data types by host: + * + * string: Excel, Excel Online, Word, and Word Online only + * + * array of arrays: Excel and Word only + * + * {@link Office.TableData}: Access, Excel, and Word only + * + * HTML: Word and Word Online only + * + * Office Open XML: Word only + * + * @param options Provides options for how to set the data in a binding. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setDataAsync(data: TableData | any, options?: SetBindingDataOptions, callback?: (result: AsyncResult) => void): void; + } + + /** + * Provides information about the binding that raised the DataChanged event. + * + * @remarks + *
HostsAccess, Excel, Word
+ */ + interface BindingDataChangedEventArgs { + /** + * Gets an {@link Office.Binding} object that represents the binding that raised the DataChanged event. + */ + binding: Binding; + + /** + * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + + /** + * Provides information about the binding that raised the SelectionChanged event. + * + * @remarks + *
HostsAccess, Excel, Word
+ */ + interface BindingSelectionChangedEventArgs { + /** + * Gets an {@link Office.Binding} object that represents the binding that raised the SelectionChanged event. + */ + binding: Binding; + /** + * Gets the number of columns selected. If a single cell is selected returns 1. + * + * If the user makes a non-contiguous selection, the count for the last contiguous selection within the binding is returned. + * + * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is + * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property + * to work correctly. + */ + columnCount: number; + /** + * Gets the number of rows selected. If a single cell is selected returns 1. + * + * If the user makes a non-contiguous selection, the count for the last contiguous selection within the binding is returned. + * + * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is + * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property + * to work correctly. + */ + rowCount: number; + /** + * The zero-based index of the first column of the selection counting from the leftmost column in the binding. + * + * If the user makes a non-contiguous selection, the coordinates for the last contiguous selection within the binding are returned. + * + * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is + * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property + * to work correctly. + */ + startColumn: number; + /** + * The zero-based index of the first row of the selection counting from the first row in the binding. + * + * If the user makes a non-contiguous selection, the coordinates for the last contiguous selection within the binding are returned. + * + * For Word, this property will work only for bindings of {@link Office.BindingType} "table". If the binding is of type "matrix", null is + * returned. Also, the call will fail if the table contains merged cells, because the structure of the table must be uniform for this property + * to work correctly. + */ + startRow: number; + /** + * Gets an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + + /** + * Represents the bindings the add-in has within the document. + */ + interface Bindings { + /** + * Gets an {@link Office.Document} object that represents the document associated with this set of bindings. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + document: Document; + /** + * Creates a binding against a named object in the document. + * + * @remarks + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * For Excel, the itemName parameter can refer to a named range or a table. + * + * By default, adding a table in Excel assigns the name "Table1" for the first table you add, "Table2" for the second table you add, and so on. + * To assign a meaningful name for a table in the Excel UI, use the Table Name property on the Table Tools | Design tab of the ribbon. + * + * Note: In Excel, when specifying a table as a named item, you must fully qualify the name to include the worksheet name in the name of + * the table in this format: "Sheet1!Table1" + * + * For Word, the itemName parameter refers to the Title property of a Rich Text content control. (You can't bind to content controls other + * than the Rich Text content control). + * + * By default, a content control has no Title value assigned. To assign a meaningful name in the Word UI, after inserting a Rich Text content + * control from the Controls group on the Developer tab of the ribbon, use the Properties command in the Controls group to display the Content + * Control Properties dialog box. Then set the Title property of the content control to the name you want to reference from your code. + * + * Note: In Word, if there are multiple Rich Text content controls with the same Title property value (name), and you try to bind to one + * these content controls with this method (by specifying its name as the itemName parameter), the operation will fail. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * @param itemName Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." + * @param bindingType The {@link Office.BindingType} for the data. The method returns null if the selected object cannot be coerced into the specified type. + * @param options Provides options for configuring the binding that is created. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the Binding object that represents the specified named item. + */ + addFromNamedItemAsync(itemName: string, bindingType: BindingType, options?: AddBindingFromNamedItemOptions, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding by prompting the user to make a selection on the document. + * + * @remarks + *
Requirement SetsNot in a set
+ * + * Adds a binding object of the specified type to the Bindings collection, which will be identified with the supplied id. + * The method fails if the specified selection cannot be bound. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
+ * + * @param bindingType Specifies the type of the binding object to create. Required. + * Returns null if the selected object cannot be coerced into the specified type. + * @param options Provides options for configuring the prompt and identifying the binding that is created. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the Binding object that represents the selection specified by the user. + */ + addFromPromptAsync(bindingType: BindingType, options?: AddBindingFromPromptOptions, callback?: (result: AsyncResult) => void): void; + /** + * Create a binding based on the user's current selection. + * + * @remarks + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * Adds the specified type of binding object to the Bindings collection, which will be identified with the supplied id. + * + * Note In Excel, if you call the addFromSelectionAsync method passing in the Binding.id of an existing binding, the Binding.type of that + * binding is used, and its type cannot be changed by specifying a different value for the bindingType parameter. + * If you need to use an existing id and change the bindingType, call the Bindings.releaseByIdAsync method first to release the binding, and + * then call the addFromSelectionAsync method to reestablish the binding with a new type. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param bindingType Specifies the type of the binding object to create. Required. + * Returns null if the selected object cannot be coerced into the specified type. + * @param options Provides options for configuring the prompt and identifying the binding that is created. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the Binding object that represents the selection specified by the user. + */ + addFromSelectionAsync(bindingType: BindingType, options?: AddBindingFromSelectionOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets all bindings that were previously created. + * + * @remarks + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an array that contains each binding created for the referenced Bindings object. + */ + getAllAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Retrieves a binding based on its Name + * + * @remarks + *
Requirement SetsCustomXmlParts, MatrixBindings, TableBindings, TextBindings
+ * + * Fails if the specified id does not exist. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param id Specifies the unique name of the binding object. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the Binding object specified by the id in the call. + */ + getByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes the binding from the document + * + * @remarks + *
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * Fails if the specified id does not exist. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param id Specifies the unique name to be used to identify the binding object. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + releaseByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents an XML node in a tree in a document. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
+ */ + interface CustomXmlNode { + /** + * Gets the base name of the node without the namespace prefix, if one exists. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ */ + baseName: string; + /** + * Retrieves the string GUID of the CustomXMLPart. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ */ + namespaceUri: string; + /** + * Gets the type of the CustomXMLNode. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ */ + nodeType: string; + /** + * Gets the nodes associated with the XPath expression. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param xPath The XPath expression that specifies the nodes to get. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the `xPath` parameter. + */ + getNodesAsync(xPath: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets the node value. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the value of the referenced node. + */ + getNodeValueAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets the text of an XML node in a custom XML part. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the inner text of the referenced nodes. + */ + getTextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets the node's XML. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the XML of the referenced node. + */ + getXmlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the node value. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param value The value to be set on the node + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setNodeValueAsync(value: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously sets the text of an XML node in a custom XML part. + * + * @remarks + * + * + *
HostsWord
Requirement SetsCustomXmlParts
+ * + * @param text Required. The text value of the XML node. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setTextAsync(text: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the node XML. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * @param xml The XML to be set on the node + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setXmlAsync(xml: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a single CustomXMLPart in an {@link Office.CustomXmlParts} collection. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
+ */ + interface CustomXmlPart { + /** + * True, if the custom XML part is built in; otherwise false. + */ + builtIn: boolean; + /** + * Gets the GUID of the CustomXMLPart. + */ + id: string; + /** + * Gets the set of namespace prefix mappings ({@link Office.CustomXmlPrefixMappings}) used against the current CustomXmlPart. + */ + namespaceManager: CustomXmlPrefixMappings; + + /** + * Adds an event handler to the object using the specified event type. + * + * @remarks + * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. For a CustomXmlPart object, the eventType parameter can be specified as + * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.NodeDeletedEventArgs}, + * {@link Office.NodeInsertedEventArgs}, or {@link Office.NodeReplacedEventArgs} + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: (result: any) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Deletes the Custom XML Part. + * + * @remarks + * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. + * + * @remarks + * + * @param xPath An XPath expression that specifies the nodes you want returned. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an array of CustomXmlNode objects that represent the nodes specified by the XPath expression passed to the xPath parameter. + */ + getNodesAsync(xPath: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the XML inside this custom XML part. + * + * @remarks + * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the XML of the referenced CustomXmlPart object. + */ + getXmlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + * + * @param eventType Specifies the type of event to remove. For a CustomXmlPart object, the eventType parameter can be specified as + * `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. + * @param handler The name of the handler to remove. + * @param options Provides options to determine which event handler or handlers are removed. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + removeHandlerAsync(eventType: Office.EventType, handler?: (result: any) => void, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; + } + + /** + * Provides information about the deleted node that raised the nodeDeleted event. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + interface NodeDeletedEventArgs { + /** + * Gets whether the node was deleted as part of an Undo/Redo action by the user. + */ + isUndoRedo: boolean; + /** + * Gets the former next sibling of the node that was just deleted from the {@link Office.CustomXmlPart} object. + */ + oldNextSibling: CustomXmlNode; + /** + * Gets the node which was just deleted from the {@link Office.CustomXmlPart} object. + * + * Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in + * that you can query down from the node, but you cannot query up the tree - the node appears to exist alone. + */ + oldNode: CustomXmlNode; + } + + /** + * Provides information about the inserted node that raised the nodeInserted event. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + interface NodeInsertedEventArgs { + /** + * Gets whether the node was inserted as part of an Undo/Redo action by the user. + */ + isUndoRedo: boolean; + /** + * Gets the node that was just added to the CustomXMLPart object. + * + * Note that this node may have children, if a subtree was just added to the document. + */ + newNode: CustomXmlNode; + } + + /** + * Provides information about the replaced node that raised the nodeReplaced event. + * + * @remarks + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + interface NodeReplacedEventArgs { + /** + * Gets whether the replaced node was inserted as part of an undo or redo operation by the user. + */ + isUndoRedo: boolean; + /** + * Gets the node that was just added to the CustomXMLPart object. + * + * Note that this node may have children, if a subtree was just added to the document. + */ + newNode: CustomXmlNode; + /** + * Gets the node which was just deleted (replaced) from the CustomXmlPart object. + * + * Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in + * that you can query down from the node, but you cannot query up the tree - the node appears to exist alone. + */ + oldNode: CustomXmlNode; + } + + /** + * Represents a collection of CustomXmlPart objects. + * + * @remarks + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + interface CustomXmlParts { + /** + * Asynchronously adds a new custom XML part to a file. + * + * @param xml The XML to add to the newly created custom XML part. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the newly created CustomXmlPart object. + */ + addAsync(xml: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML part by its id. + * + * @param id The GUID of the custom XML part, including opening and closing braces. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a CustomXmlPart object that represents the specified custom XML part. + * If there is no custom XML part with the specified id, the method returns null. + */ + getByIdAsync(id: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the specified custom XML part(s) by its namespace. + * + * @param ns The namespace URI. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an array of CustomXmlPart objects that match the specified namespace. + */ + getByNamespaceAsync(ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents a collection of CustomXmlPart objects. + * + * @remarks + * + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + interface CustomXmlPrefixMappings { + /** + * Asynchronously adds a prefix to namespace mapping to use when querying an item. + * + * @remarks + * If no namespace is assigned to the requested prefix, the method returns an empty string (""). + * + * @param prefix Specifies the prefix to add to the prefix mapping list. Required. + * @param ns Specifies the namespace URI to assign to the newly added prefix. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addNamespaceAsync(prefix: string, ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the namespace mapped to the specified prefix. + * + * @remarks + * + * If the prefix already exists in the namespace manager, this method will overwrite the mapping of that prefix except when the prefix is one + * added or used by the data store internally, in which case it will return an error. + * + * @param prefix TSpecifies the prefix to get the namespace for. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the namespace mapped to the specified prefix. + */ + getNamespaceAsync(prefix: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously gets the prefix for the specified namespace. + * + * @remarks + * + * If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in + * the namespace manager, the method returns the first prefix that matches the supplied namespace. + * + * @param ns Specifies the namespace to get the prefix for. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is a string that contains the prefix of the specified namespace. + */ + getPrefixAsync(ns: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * An abstract class that represents the document the add-in is interacting with. + * + * @remarks + *
HostsAccess, Excel, PowerPoint, Project, Word
+ */ + interface Document { + /** + * Gets an object that provides access to the bindings defined in the document. + * + * @remarks + * You don't instantiate the Document object directly in your script. To call members of the Document object to interact with the current + * document or worksheet, use `Office.context.document` in your script. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
PowerPoint Y Y Y
Word Y Y Y
+ */ + bindings: Bindings; + /** + * Gets an object that represents the custom XML parts in the document. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
+ */ + customXmlParts: CustomXmlParts; + /** + * Gets the mode the document is in. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ */ + mode: DocumentMode; + /** + * Gets an object that represents the saved custom settings of the content or task pane add-in for the current document. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ */ + settings: Settings; + /** + * Gets the URL of the document that the host application currently has open. Returns null if the URL is unavailable. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y
Word Y Y Y
+ */ + url: string; + /** + * Adds an event handler for a Document object event. + * + * @remarks + *
Requirement SetsDocumentEvents
+ * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ * + * @param eventType For a Document object event, the eventType parameter can be specified as `Office.EventType.Document.SelectionChanged` or + * `Office.EventType.Document.ActiveViewChanged`, or the corresponding text value of this enumeration. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.DocumentSelectionChangedEventArgs}. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Returns the state of the current view of the presentation (edit or read). + * + * @remarks + *
Requirement SetsActiveView
+ * + * Can trigger an event when the view changes. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the state of the presentation's current view. + * The value returned can be either "edit" or "read". "edit" corresponds to any of the views in which you can edit slides, + * such as Normal or Outline View. "read" corresponds to either Slide Show or Reading View. + */ + getActiveViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<"edit" | "read">) => void): void; + /** + * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins for iOS, file slice is supported up to 65536 (64 KB). + * Note that specifying file slice size of above permitted limit will result in an "Internal Error" failure. + * + * @remarks + *
Requirement SetsFile
+ * + * For add-ins running in Office host applications other than Office for iOS, the getFileAsync method supports getting files in slices of up + * to 4194304 bytes (4 MB). For add-ins running in Office for iOS apps, the getFileAsync method supports getting files in slices of up to + * 65536 (64 KB). + * + * The fileType parameter can be specified by using the {@link Office.FileType} enumeration or text values. But the possible values vary with + * the host: + * + * Excel Online, Win32, Mac, and iOS: `Office.FileType.Compressed` + * + * PowerPoint on Windows desktop, Mac, and iPad, and PowerPoint Online: `Office.FileType.Compressed`, `Office.FileType.Pdf` + * + * Word on Windows desktop, Word on Mac, and Word Online: `Office.FileType.Compressed`, `Office.FileType.Pdf`, `Office.FileType.Text` + * + * Word on iPad: `Office.FileType.Compressed`, `Office.FileType.Text` + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y Y
+ * + * @param fileType The format in which the file will be returned + * @param options Provides options for setting the size of slices that the document will be divided into. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the File object. + */ + getFileAsync(fileType: FileType, options?: GetFileOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets file properties of the current document. + * + * @remarks + *
Requirement SetsNot in a set
+ * + * You get the file's URL with the url property `asyncResult.value.url`. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the file's properties (with the URL found at `asyncResult.value.url`). + */ + getFilePropertiesAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Reads the data contained in the current selection in the document. + * + * @remarks + *
Requirement SetsSelection
+ * + * In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return + * the following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * The possible values for the {@link Office.CoercionType} parameter vary by the host. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
HostSupported coercionType
Excel, Excel Online, PowerPoint, PowerPoint Online, Word, and Word Online`Office.CoercionType.Text` (string)
Excel, Word, and Word Online`Office.CoercionType.Matrix` (array of arrays)
Access, Excel, Word, and Word Online`Office.CoercionType.Table` (TableData object)
Word`Office.CoercionType.Html`
Word and Word Online `Office.CoercionType.Ooxml` (Office Open XML)
PowerPoint and PowerPoint Online`Office.CoercionType.SlideRange`
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Project Y Y
Word Y Y
+ * + * @param coercionType The type of data structure to return. See the remarks section for each host's supported coercion types. + * + * @param options Provides options for customizing what data is returned and how it is formatted. + * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the data in the current selection. + * This is returned in the data structure or format you specified with the coercionType parameter. + * (See Remarks for more information about data coercion.) + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, options?: GetSelectedDataOptions, callback?: (result: AsyncResult) => void): void; + /** + * Goes to the specified object or location in the document. + * + * @remarks + *
Requirement Setsnot in a set
+ * + * PowerPoint doesn't support the goToByIdAsync method in Master Views. + * + * The behavior caused by the selectionMode option varies by host: + * + * In Excel: `Office.SelectionMode.Selected` selects all content in the binding, or named item. Office.SelectionMode.None for text bindings, + * selects the cell; for matrix bindings, table bindings, and named items, selects the first data cell (not first cell in header row for tables). + * + * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. + * `Office.SelectionMode.None` doesn't select anything. + * + * In Word: `Office.SelectionMode.Selected` selects all content in the binding. Office.SelectionMode.None for text bindings, moves the cursor + * to the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
+ * + * @param id The identifier of the object or location to go to. + * @param goToType The type of the location to go to. + * @param options Provides options for whether to select the location that is navigated to. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the current view. + */ + goToByIdAsync(id: string | number, goToType: GoToType, options?: GoToByIdOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for the specified event type. + * + * @remarks + *
Requirement SetsDocumentEvents
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. + * @param options Provides options to determine which event handler or handlers are removed. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; + /** + * Writes the specified data into the current selection. + * + * @remarks + *
Requirement SetsSelection
+ * + * **Application-specific behaviors** + * + * The following application-specific actions apply when writing data to a selection. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
WordIf there is no selection and the insertion point is at a valid location, the specified `data` is inserted at the insertion pointIf `data` is a string, the specified text is inserted.
If `data` is an array of arrays ("matrix") or a TableData object, a new Word table is inserted.
If `data` is HTML, the specified HTML is inserted. (Important: If any of the HTML you insert is invalid, Word won't raise an error. Word will insert as much of the HTML as it can and omits any invalid data).
If `data` is Office Open XML, the specified XML is inserted.
If `data` is a base64 encoded image stream, the specified image is inserted.
If there is a selectionIt will be replaced with the specified `data` following the same rules as above.
Insert imagesInserted images are placed inline. The imageLeft and imageTop parameters are ignored. The image aspect ratio is always locked. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
ExcelIf a single cell is selectedIf `data` is a string, the specified text is inserted as the value of the current cell.
If `data` is an array of arrays ("matrix"), the specified set of rows and columns are inserted, if no other data in surrounding cells will be overwritten.
If `data` is a TableData object, a new Excel table with the specified set of rows and headers is inserted, if no other data in surrounding cells will be overwritten.
If multiple cells are selectedIf the shape does not match the shape of `data`, an error is returned.
If the shape of the selection exactly matches the shape of `data`, the values of the selected cells are updated based on the values in `data`.
Insert imagesInserted images are floating. The position imageLeft and imageTop parameters are relative to currently selected cell(s). Negative imageLeft and imageTop values are allowed and possibly readjusted by Excel to position the image inside a worksheet. Image aspect ratio is locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
All other casesAn error is returned.
Excel OnlineIn addition to the behaviors described for Excel above, these limits apply when writing data in Excel OnlineThe total number of cells you can write to a worksheet with the `data` parameter can't exceed 20,000 in a single call to this method.
The number of formatting groups passed to the `cellFormat` parameter can't exceed 100. A single formatting group consists of a set of formatting applied to a specified range of cells.
PowerPointInsert imageInserted images are floating. The position imageLeft and imageTop parameters are optional but if provided, both should be present. If a single value is provided, it will be ignored. Negative imageLeft and imageTop values are allowed and can position an image outside of a slide. If no optional parameter is given and slide has a placeholder, the image will replace the placeholder in the slide. Image aspect ratio will be locked unless both imageWidth and imageHeight parameters are provided. If only one of the imageWidth and imageHeight parameter is given, the other value will be automatically scaled to keep the original aspect ratio.
+ * + * The possible values for the {@link Office.CoercionType} parameter vary by the host. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
HostSupported coercionType
Excel, Excel Online, PowerPoint, PowerPoint Online, Word, and Word Online`Office.CoercionType.Text` (string)
Excel, Word, and Word Online`Office.CoercionType.Matrix` (array of arrays)
Access, Excel, Word, and Word Online`Office.CoercionType.Table` (TableData object)
Word`Office.CoercionType.Html`
Word and Word Online `Office.CoercionType.Ooxml` (Office Open XML)
PowerPoint and PowerPoint Online`Office.CoercionType.SlideRange`
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param data The data to be set. Either a string or {@link Office.CoercionType} value, 2d array or TableData object. + * + * If the value passed for `data` is: + * + * - A string: Plain text or anything that can be coerced to a string will be inserted. + * In Excel, you can also specify data as a valid formula to add that formula to the selected cell. For example, setting data to "=SUM(A1:A5)" + * will total the values in the specified range. However, when you set a formula on the bound cell, after doing so, you can't read the added + * formula (or any pre-existing formula) from the bound cell. If you call the Document.getSelectedDataAsync method on the selected cell to + * read its data, the method can return only the data displayed in the cell (the formula's result). + * + * - An array of arrays ("matrix"): Tabular data without headers will be inserted. For example, to write data to three rows in two columns, + * you can pass an array like this: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]]. To write a single column of three rows, pass an + * array like this: [["R1C1"], ["R2C1"], ["R3C1"]] + * + * In Excel, you can also specify data as an array of arrays that contains valid formulas to add them to the selected cells. For example if no + * other data will be overwritten, setting data to [["=SUM(A1:A5)","=AVERAGE(A1:A5)"]] will add those two formulas to the selection. Just as + * when setting a formula on a single cell as "text", you can't read the added formulas (or any pre-existing formulas) after they have been + * set - you can only read the formulas' results. + * + * - A TableData object: A table with headers will be inserted. + * In Excel, if you specify formulas in the TableData object you pass for the data parameter, you might not get the results you expect due to + * the "calculated columns" feature of Excel, which automatically duplicates formulas within a column. To work around this when you want to + * write `data` that contains formulas to a selected table, try specifying the data as an array of arrays (instead of a TableData object), and + * specify the coercionType as Microsoft.Office.Matrix or "matrix". + * + * @param options Provides options for how to insert data to the selection. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The AsyncResult.value property always returns undefined because there is no object or data to retrieve. + */ + setSelectedDataAsync(data: string | TableData | any[][], options?: SetSelectedDataOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get Project field (Ex. ProjectWebAccessURL). + * @param fieldId Project level fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get resource field for provided resource Id. (Ex.ResourceName) + * @param resourceId Either a string or value of the Resource Id. + * @param fieldId Resource Fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the GUID of the resource as a string. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getResourceFieldAsync(resourceId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Resource's Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the GUID of the resource as a string. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Task's Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the GUID of the resource as a string. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected View Type (Ex. Gantt) and View Name. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result contains the following properties: + * `viewName` - The name of the view, as a ProjectViewTypes constant. + * `viewType` - The type of view, as the integer value of a ProjectViewTypes constant. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the Task Name, WSS Task Id, and ResourceNames for given taskId. + * @param taskId Either a string or value of the Task Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result contains the following properties: + * `taskName` - The name of the task. + * `wssTaskId` - The ID of the task in the synchronized SharePoint task list. If the project is not synchronized with a SharePoint task list, the value is 0. + * `resourceNames` - The comma-separated list of the names of resources that are assigned to the task. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getTaskAsync(taskId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get task field for provided task Id. (Ex. StartDate). + * @param taskId Either a string or value of the Task Id. + * @param fieldId Task Fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result contains the `fieldValue` property, which represents the value of the specified field. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getTaskFieldAsync(taskId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the WSS Url and list name for the Tasks List, the MPP is synced too. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result contains the following properties: + * `listName` - the name of the synchronized SharePoint task list. + * `serverUrl` - the URL of the synchronized SharePoint task list. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getWSSUrlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the maximum index of the collection of resources in the current project. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the highest index number in the current project's resource collection. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getMaxResourceIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the maximum index of the collection of tasks in the current project. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the highest index number in the current project's task collection. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getMaxTaskIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the GUID of the resource that has the specified index in the resource collection. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param resourceIndex The index of the resource in the collection of resources for the project. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the GUID of the resource as a string. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getResourceByIndexAsync(resourceIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the GUID of the task that has the specified index in the task collection. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param taskIndex The index of the task in the collection of tasks for the project. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the GUID of the task as a string. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + getTaskByIndexAsync(taskIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Set resource field for specified resource Id. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param resourceId Either a string or value of the Resource Id. + * @param fieldId Resource Fields. + * @param fieldValue Value of the target field. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Set task field for specified task Id. + * + * Important: This API works only in Project 2016 on Windows desktop. + * + * @param taskId Either a string or value of the Task Id. + * @param fieldId Task Fields. + * @param fieldValue Value of the target field. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * Provides information about the document that raised the SelectionChanged event. + */ + interface DocumentSelectionChangedEventArgs { + /** + * Gets an {@link Office.Document} object that represents the document that raised the SelectionChanged event. + */ + document: Document; + /** + * Get an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + /** + * Represents the document file associated with an Office Add-in. + * + * @remarks + * Access the File object with the AsyncResult.value property in the callback function passed to the Document.getFileAsync method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
+ */ + interface File { + /** + * Gets the document file size in bytes. + * + * @remarks + *
Requirement SetsFile
+ */ + size: number; + /** + * Gets the number of slices into which the file is divided. + */ + sliceCount: number; + /** + * Closes the document file. + * + * @remarks + * + *
Requirement SetsFile
+ * + * No more than two documents are allowed to be in memory; otherwise the Document.getFileAsync operation will fail. Use the File.closeAsync + * method to close the file when you are finished working with it. + * + * In the callback function passed to the closeAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + closeAsync(callback?: (result: AsyncResult) => void): void; + /** + * Returns the specified slice. + * + * @remarks + *
Requirement SetsFile
+ * + * In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAccess the Slice object.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * @param sliceIndex Specifies the zero-based index of the slice to be retrieved. Required. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is the {@link Office.Slice} object. + */ + getSliceAsync(sliceIndex: number, callback?: (result: AsyncResult) => void): void; + } + interface FileProperties { + /** + * File's URL + */ + url: string + } + /** + * Represents a binding in two dimensions of rows and columns. + * + * @remarks + *
Requirement SetsMatrixBindings
+ * + * The MatrixBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the Binding object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
+ */ + interface MatrixBinding extends Binding { + /** + * Gets the number of columns in the matrix data structure, as an integer value. + * + * @remarks + * + * + *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsMatrixBindings
+ */ + columnCount: number; + /** + * Gets the number of rows in the matrix data structure, as an integer value. + * + * @remarks + * + * + *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsMatrixBindings
+ */ + rowCount: number; + } + /** + * Represents custom settings for a task pane or content add-in that are stored in the host document as name/value pairs. + * + * @remarks + * + * + *
HostsAccess, Excel, PowerPoint, Word
Requirement SetsSettings
+ * + * The settings created by using the methods of the Settings object are saved per add-in and per document. + * That is, they are available only to the add-in that created them, and only from the document in which they are saved. + * + * The name of a setting is a string, while the value can be a string, number, boolean, null, object, or array. + * + * The Settings object is automatically loaded as part of the Document object, and is available by calling the settings property of that object + * when the add-in is activated. + * + * The developer is responsible for calling the saveAsync method after adding or deleting settings to save the settings in the document. + */ + interface Settings { + /** + * Adds an event handler for the settingsChanged event. + * + * Important: Your add-in's code can register a handler for the settingsChanged event when the add-in is running with any Excel client, but + * the event will fire only when the add-in is loaded with a spreadsheet that is opened in Excel Online, and more than one user is editing the + * spreadsheet (co-authoring). Therefore, effectively the settingsChanged event is supported only in Excel Online in co-authoring scenarios. + * + * @remarks + * + *
Requirement SetsSettings
+ * + * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * @param eventType Specifies the type of event to add. Required. + * @param handler The event handler function to add, whose only parameter is of type {@link Office.SettingsChangedEventArgs}. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no data or object to retrieve when adding an event handler.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
+ */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Retrieves the specified setting. + * + * @remarks + *
Requirement SetsSettings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param settingName The case-sensitive name of the setting to retrieve. + * @returns An object that has property names mapped to JSON serialized values. + */ + get(name: string): any; + /** + * Reads all settings persisted in the document and refreshes the content or task pane add-in's copy of those settings held in memory. + * + * @remarks + * + *
Requirement SetsSettings
+ * + * This method is useful in Excel, Word, and PowerPoint coauthoring scenarios when multiple instances of the same add-in are working against + * the same document. Because each add-in is working against an in-memory copy of the settings loaded from the document at the time the user + * opened it, the settings values used by each user can get out of sync. This can happen whenever an instance of the add-in calls the + * Settings.saveAsync method to persist all of that user's settings to the document. Calling the refreshAsync method from the event handler + * for the settingsChanged event of the add-in will refresh the settings values for all users. + * + * In the callback function passed to the refreshAsync method, you can use the properties of the AsyncResult object to return the following + * information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAccess a Settings object with the refreshed values.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an {@link Office.Settings} object with the refreshed values. + */ + refreshAsync(callback?: (result: AsyncResult) => void): void; + /** + * Removes the specified setting. + * + * Important: Be aware that the Settings.remove method affects only the in-memory copy of the settings property bag. To persist the removal of + * the specified setting in the document, at some point after calling the Settings.remove method and before the add-in is closed, you must + * call the Settings.saveAsync method. + * + * @remarks + *
Requirement SetsSettings
+ * + * null is a valid value for a setting. Therefore, assigning null to the setting will not remove it from the settings property bag. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
+ * + * @param settingName The case-sensitive name of the setting to remove. + */ + remove(name: string): void; + /** + * Removes an event handler for the settingsChanged event. + * + * @remarks + * + *
Requirement SetsSettings
+ * + * If the optional handler parameter is omitted when calling the removeHandlerAsync method, all event handlers for the specified eventType + * will be removed. + * + * When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback + * function's only parameter. + * + * In the callback function passed to the removeHandlerAsync method, you can use the properties of the AsyncResult object to return the + * following information. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
+ * + * @param eventType Specifies the type of event to remove. Required. + * @param options Provides options to determine which event handler or handlers are removed. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; + /** + * Persists the in-memory copy of the settings property bag in the document. + * + * @remarks + * Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use the + * set and get methods to work with the in-memory copy of the settings property bag. When you want to persist the settings so that they are + * available the next time the add-in is used, use the saveAsync method. + * + * Note: The saveAsync method persists the in-memory settings property bag into the document file. However, the changes to the document file + * itself are saved only when the user (or AutoRecover setting) saves the document to the file system. The refreshAsync method is only useful + * in coauthoring scenarios when other instances of the same add-in might change the settings and those changes should be made available to + * all instances. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no object or data to retrieve.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param options Provides options for saving settings. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + saveAsync(options?: SaveSettingsOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets or creates the specified setting. + * + * Important: Be aware that the Settings.set method affects only the in-memory copy of the settings property bag. + * To make sure that additions or changes to settings will be available to your add-in the next time the document is opened, at some point + * after calling the Settings.set method and before the add-in is closed, you must call the Settings.saveAsync method to persist settings in + * the document. + * + * @remarks + *
Requirement SetsSettings
+ * + * The set method creates a new setting of the specified name if it does not already exist, or sets an existing setting of the specified name + * in the in-memory copy of the settings property bag. After you call the Settings.saveAsync method, the value is stored in the document as + * the serialized JSON representation of its data type. A maximum of 2MB is available for the settings of each add-in. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * + * @param settingName The case-sensitive name of the setting to set or create. + * @param value Specifies the value to be stored. + */ + set(name: string, value: any): void; + } + /** + * Provides information about the settings that raised the settingsChanged event. + * + * @remarks + *
Requirement SetsSettings
+ * + * To add an event handler for the settingsChanged event, use the addHandlerAsync method of the + * {@link Office.Settings} object. + * + * The settingsChanged event fires only when your add-in's script calls the Settings.saveAsync method to persist + * the in-memory copy of the settings into the document file. The settingsChanged event is not triggered when the + * Settings.set or Settings.remove methods are called. + * + * The settingsChanged event was designed to let you to handle potential conflicts when two or more users are + * attempting to save settings at the same time when your add-in is used in a shared (co-authored) document. + * + * **Important:** Your add-in's code can register a handler for the settingsChanged event when the add-in + * is running with any Excel client, but the event will fire only when the add-in is loaded with a spreadsheet + * that is opened in Excel Online, and more than one user is editing the spreadsheet (co-authoring). + * Therefore, effectively the settingsChanged event is supported only in Excel Online in co-authoring scenarios. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
+ */ + interface SettingsChangedEventArgs { + /** + * Gets an {@link Office.Settings} object that represents the settings that raised the settingsChanged event. + */ + settings: Settings; + /** + * Get an {@link Office.EventType} enumeration value that identifies the kind of event that was raised. + */ + type: EventType; + } + /** + * Represents a slice of a document file. + * + * @remarks + *
Requirement SetsFile
+ * + * The Slice object is accessed with the File.getSliceAsync method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
+ */ + interface Slice { + /** + * Gets the raw data of the file slice in `Office.FileType.Text` ("text") or `Office.FileType.Compressed` ("compressed") format as specified + * by the fileType parameter of the call to the Document.getFileAsync method. + * + * @remarks + * + * Files in the "compressed" format will return a byte array that can be transformed to a base64-encoded string if required. + */ + data: any; + /** + * Gets the zero-based index of the file slice. + */ + index: number; + /** + * Gets the size of the slice in bytes. + */ + size: number; + } + /** + * Represents a binding in two dimensions of rows and columns, optionally with headers. + * + * @remarks + *
Requirement SetsTableBindings
+ * + * The TableBinding object inherits the `id` property, `type` property, `getDataAsync` method, and `setDataAsync` method from the + * {@link Office.Binding} object. + * + * For Excel, note that after you establish a table binding, each new row a user adds to the table is automatically included in the binding and + * rowCount increases. + */ + interface TableBinding extends Binding { + /** + * Gets the number of columns in the TableBinding, as an integer value. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + columnCount: number; + /** + * True, if the table has headers; otherwise false. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + hasHeaders: boolean; + /** + * Gets the number of rows in the TableBinding, as an integer value. + * + * @remarks + * When you insert an empty table by selecting a single row in Excel 2013 and Excel Online (using Table on the Insert tab), both Office host + * applications create a single row of headers followed by a single blank row. However, if your add-in's script creates a binding for this + * newly inserted table (for example, by using the {@link Office.Bindings}.addFromSelectionAsync method), and then checks the value of the + * rowCount property, the value returned will differ depending whether the spreadsheet is open in Excel 2013 or Excel Online. + * + * - In Excel on the desktop, rowCount will return 0 (the blank row following the headers is not counted). + * + * - In Excel Online, rowCount will return 1 (the blank row following the headers is counted). + * + * You can work around this difference in your script by checking if rowCount == 1, and if so, then checking if the row contains all empty + * strings. + * + * In content add-ins for Access, for performance reasons the rowCount property always returns -1. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ + rowCount: number; + /** + * Adds the specified data to the table as additional columns. + * + * @remarks + * + * To add one or more columns specifying the values of the data and headers, pass a TableData object as the data parameter. To add one or more + * columns specifying only the data, pass an array of arrays ("matrix") as the data parameter. + * + * The success or failure of an addColumnsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be + * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): + * + * - Each row in the array you pass as the data argument must have the same number of rows as the table being updated. If not, the entire + * operation will fail. + * + * - Each row and cell in the array must successfully add that row or cell to the table in the newly added column(s). If any row or cell + * fails to be set for any reason, the entire operation will fail. + * + * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. + * + * Additional remark for Excel Online: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in + * a single call to this method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
+ * + * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addColumnsAsync(tableData: TableData | any[][], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds the specified data to the table as additional rows. + * + * @remarks + * + * The success or failure of an addRowsAsync operation is atomic. That is, the entire add columns operation must succeed, or it will be + * completely rolled back (and the AsyncResult.status property returned to the callback will report failure): + * + * - Each row in the array you pass as the data argument must have the same number of columns as the table being updated. If not, the entire + * operation will fail. + * + * - Each column and cell in the array must successfully add that column or cell to the table in the newly added rows(s). If any column or + * cell fails to be set for any reason, the entire operation will fail. + * + * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. + * + * Additional remark for Excel Online: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in + * a single call to this method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + addRowsAsync(rows: TableData | any[][], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Deletes all non-header rows and their values in the table, shifting appropriately for the host application. + * + * @remarks + * + * In Excel, if the table has no header row, this method will delete the table itself. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + deleteAllDataValuesAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Clears formatting on the bound table. + * + * @remarks + * See {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
+ * + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + clearFormatsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets the formatting on specified items in the table. + * + * @remarks + * + * **Returned format structure** + * + * Each JavaScript object in the return value array has this form: `\{cells:\{ cell_range \}, format:\{ format_definition \}\}` + * + * The `cells:` property specifies the range you want format using one of the following values: + * + * **Supported ranges in cells property** + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
cells range settingsDescription
\{row: n\}Specifies the range that is the zero-based nth row of data in the table.
\{column: n\}Specifies the range that is the zero-based nth column of data in the table.
\{row: i, column: j\}Specifies the single cell that is the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
+ * + * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel + * (Right-click \> Format Cells or Home \> Format \> Format Cells). + * + * @param cellReference An object literal containing name-value pairs that specify the range of cells to get formatting from. + * @param formats An array specifying the format properties to get. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * The `value` property of the result is an array containing one or more JavaScript objects specifying the formatting of their corresponding cells. + */ + getFormatsAsync(cellReference?: any, formats?: any[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult< ({ cells: any, format: any})[]>) => void): void; + /** + * Sets formatting on specified items and data in the table. + * + * @remarks + * + * **Specifying the cellFormat parameter** + * + * Use the cellFormat parameter to set or change cell formatting values, such as width, height, font, background, alignment, and so on. + * The value you pass as the cellFormat parameter is an array that contains a list of one or more JavaScript objects that specify which cells + * to target (`cells:`) and the formats (`format:`) to apply to them. + * + * Each JavaScript object in the cellFormat array has this form: `\{cells:\{ cell_range \}, format:\{ format_definition \}\}` + * + * The `cells:` property specifies the range you want format using one of the following values: + * + * **Supported ranges in cells property** + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
cells range settingsDescription
\{row: n\}Specifies the range that is the zero-based nth row of data in the table.
\{column: n\}Specifies the range that is the zero-based nth column of data in the table.
\{row: i, column: j\}Specifies the single cell that is the ith row and jth column of the table.
Office.Table.AllSpecifies the entire table, including column headers, data, and totals (if any).
Office.Table.DataSpecifies only the data in the table (no headers and totals).
Office.Table.HeadersSpecifies only the header row.
+ * + * The `format:` property specifies values that correspond to a subset of the settings available in the Format Cells dialog box in Excel + * (Right-click \> Format Cells or Home \> Format \> Format Cells). + * + * You specify the value of the `format:` property as a list of one or more property name - value pairs in a JavaScript object literal. The + * property name specifies the name of the formatting property to set, and value specifies the property value. + * You can specify multiple values for a given format, such as both a font's color and size. + * + * Here's three `format:` property value examples: + * + * `//Set cells: font color to green and size to 15 points.` + * + * `format: \{fontColor : "green", fontSize : 15\}` + * + * `//Set cells: border to dotted blue.` + * + * `format: \{borderStyle: "dotted", borderColor: "blue"\}` + * + * `//Set cells: background to red and alignment to centered.` + * + * `format: \{backgroundColor: "red", alignHorizontal: "center"\}` + * + * + * You can specify number formats by specifying the number formatting "code" string in the `numberFormat:` property. + * The number format strings you can specify correspond to those you can set in Excel using the Custom category on the Number tab of the Format Cells dialog box. + * This example shows how to format a number as a percentage with two decimal places: + * + * `format: \{numberFormat:"0.00%"\}` + * + * For more detail, see how to {@link https://support.office.com/article/create-or-delete-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4 | Create a custom number format}. + * + * To set formatting on tables when writing data, use the tableOptions and cellFormat optional parameters of the + * `Document.setSelectedDataAsync` or `TableBinding.setDataAsync` methods. + * + * Setting formatting with the optional parameters of the `Document.setSelectedDataAsync` and `TableBinding.setDataAsync` methods only works + * to set formatting when writing data the first time. + * To make formatting changes after writing data, use the following methods: + * + * - To update cell formatting, such as font color and style, use the `TableBinding.setFormatsAsync` method (this method). + * + * - To update table options, such as banded rows and filter buttons, use the `TableBinding.setTableOptions` method. + * + * - To clear formatting, use the `TableBinding.clearFormats` method. + * + * For more details and examples, see + * {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | How to format tables in add-ins for Excel}. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
+ * + * @param cellFormat An array that contains one or more JavaScript objects that specify which cells to target and the formatting to apply to them. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + */ + setFormatsAsync(cellFormat: any[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Updates table formatting options on the bound table. + * + * @remarks + * + * + *
HostsExcel
Requirement SetsNot in a set
+ * + * In the callback function passed to the goToByIdAsync method, you can use the properties of the AsyncResult object to return the following information. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyUse to...
AsyncResult.valueAlways returns undefined because there is no data or object to retrieve when setting formats.
AsyncResult.statusDetermine the success or failure of the operation.
AsyncResult.errorAccess an Error object that provides error information if the operation failed.
AsyncResult.asyncContextA user-defined item of any type that is returned in the AsyncResult object without being altered.
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
+ * + * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. + * + */ + setTableOptionsAsync(tableOptions: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + /** + * Represents the data in a table or a {@link Office.TableBinding}. + * + * @remarks + * + * + *
HostsExcel, Word
Requirement SetsTableBindings
+ */ + class TableData { + constructor(rows: any[][], headers: any[]); + constructor(); + /** + * Gets or sets the headers of the table. + * + * @remarks + * + * + *
HostsExcel, Word
Requirement SetsTableBindings
+ * + * To specify headers, you must specify an array of arrays that corresponds to the structure of the table. For example, to specify headers + * for a two-column table you would set the header property to [['header1', 'header2']]. + * + * If you specify null for the headers property (or leaving the property empty when you construct a TableData object), the following results + * occur when your code executes: + * + * - If you insert a new table, the default column headers for the table are created. + * + * - If you overwrite or update an existing table, the existing headers are not altered. + */ + headers: any[]; + /** + * Gets or sets the rows in the table. Returns an array of arrays that contains the data in the table. + * Returns an empty array if there are no rows. + * + * @remarks + * + * + *
HostsExcel, Word
Requirement SetsTableBindings
+ * + * To specify rows, you must specify an array of arrays that corresponds to the structure of the table. For example, to specify two rows of + * string values in a two-column table you would set the rows property to [['a', 'b'], ['c', 'd']]. + * + * If you specify null for the rows property (or leave the property empty when you construct a TableData object), the following results occur + * when your code executes: + * + * - If you insert a new table, a blank row will be inserted. + * + * - If you overwrite or update an existing table, the existing rows are not altered. + */ + rows: any[][]; + } + /** + * Specifies enumerated values for the `cells` property in the cellFormat parameter of + * {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | table formatting methods}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
+ */ + enum Table { + /** + * The entire table, including column headers, data, and totals (if any). + */ + All, + /** + * Only the data (no headers and totals). + */ + Data, + /** + * Only the header row. + */ + Headers + } + /** + * Represents a bound text selection in the document. + * + * @remarks + *
Requirement SetsTextBindings
+ * + * The TextBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the {@link Office.Binding} + * object. It does not implement any additional properties or methods of its own. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
+ */ + interface TextBinding extends Binding { } + /** + * Specifies the project fields that are available as a parameter for the {@link Office.Document | Document}.getProjectFieldAsync method. + * + * @remarks + * + * A ProjectProjectFields constant can be used as a parameter of the {@link Office.Document | Document}.getProjectFieldAsync method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + enum ProjectProjectFields { + /** + * The number of digits after the decimal for the currency. + */ + CurrencyDigits, + /** + * The currency symbol. + */ + CurrencySymbol, + /** + * The placement of the currency symbol: Not specified = -1; Before the value with no space ($0) = 0; After the value with no space (0$) = 1; + * Before the value with a space ($ 0) = 2; After the value with a space (0 $) = 3. + */ + CurrencySymbolPosition, + DurationUnits, + /** + * The GUID of the project. + */ + GUID, + /** + * The project finish date. + */ + Finish, + /** + * The project start date. + */ + Start, + /** + * Specifies whether the project is read-only. + */ + ReadOnly, + /** + * The project version. + */ + VERSION, + /** + * The work units of the project, such as days or hours. + */ + WorkUnits, + /** + * The Project Web App URL, for projects that are stored in Project Server. + */ + ProjectServerUrl, + /** + * The SharePoint URL, for projects that are synchronized with a SharePoint list. + */ + WSSUrl, + /** + * The name of the SharePoint list, for projects that are synchronized with a tasks list. + */ + WSSList + } + /** + * Specifies the resource fields that are available as a parameter for the {@link Office.Document | Document}.getResourceFieldAsync method. + * + * @remarks + * A ProjectResourceFields constant can be used as a parameter of the {@link Office.Document | Document}.getResourceFieldAsync method. + * + * For more information about working with fields in Project, see + * {@link https://support.office.com/article/Available-fields-reference-615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. In + * Project Help, search for Available fields. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + enum ProjectResourceFields { + /** + * The accrual method that defines how a task accrues the cost of the resource: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Accrual, + /** + * The calculated actual cost of the resource for assignments in the project. + */ + ActualCost, + /** + * The actual overtime cost for a resource. + */ + ActualOvertimeCost, + /** + * The actual overtime work for a resource, in minutes. + */ + ActualOvertimeWork, + /** + * The actual overtime work for the resource that has been protected (made read-only). + */ + ActualOvertimeWorkProtected, + /** + * The actual work that the resource has done on assignments in the project. + */ + ActualWork, + /** + * The actual work for the resource that has been protected (made read-only). + */ + ActualWorkProtected, + /** + * The name of the base calendar for the resource. + */ + BaseCalendar, + /** + * The budget cost for the baseline resource. + */ + Baseline10BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline10BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline10Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline10Work, + /** + * The budget cost for the baseline resource. + */ + Baseline1BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline1BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline1Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline1Work, + /** + * The budget cost for the baseline resource. + */ + Baseline2BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline2BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline2Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline2Work, + /** + * The budget cost for the baseline resource. + */ + Baseline3BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline3BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline3Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline3Work, + /** + * The budget cost for the baseline resource. + */ + Baseline4BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline4BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline4Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline4Work, + /** + * The budget cost for the baseline resource. + */ + Baseline5BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline5BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline5Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline5Work, + /** + * The budget cost for the baseline resource. + */ + Baseline6BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline6BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline6Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline6Work, + /** + * The budget cost for the baseline resource. + */ + Baseline7BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline7BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline7Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline7Work, + /** + * The budget cost for the baseline resource. + */ + Baseline8BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline8BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline8Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline8Work, + /** + * The budget cost for the baseline resource. + */ + Baseline9BudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + Baseline9BudgetWork, + /** + * The cost for the baseline resource. + */ + Baseline9Cost, + /** + * The work for the baseline resource, in minutes. + */ + Baseline9Work, + /** + * The budget cost for the baseline resource. + */ + BaselineBudgetCost, + /** + * The budget work for the baseline resource, in hours. + */ + BaselineBudgetWork, + /** + * The baseline cost for the resource for assignments in the project. + */ + BaselineCost, + /** + * The baseline work for the resource for assignments in the project, in minutes. + */ + BaselineWork, + /** + * The budget cost for the resource. + */ + BudgetCost, + /** + * The budget work for the resource. + */ + BudgetWork, + /** + * The GUID of the resource calendar. + */ + ResourceCalendarGUID, + /** + * The code value of the resource. + */ + Code, + /** + * A cost field for the resource. + */ + Cost1, + /** + * A cost field for the resource. + */ + Cost10, + /** + * A cost field for the resource. + */ + Cost2, + /** + * A cost field for the resource. + */ + Cost3, + /** + * A cost field for the resource. + */ + Cost4, + /** + * A cost field for the resource. + */ + Cost5, + /** + * A cost field for the resource. + */ + Cost6, + /** + * A cost field for the resource. + */ + Cost7, + /** + * A cost field for the resource. + */ + Cost8, + /** + * A cost field for the resource. + */ + Cost9, + /** + * The date the resource was created. + */ + ResourceCreationDate, + /** + * A date field for the resource. + */ + Date1, + /** + * A date field for the resource. + */ + Date10, + /** + * A date field for the resource. + */ + Date2, + /** + * A date field for the resource. + */ + Date3, + /** + * A date field for the resource. + */ + Date4, + /** + * A date field for the resource. + */ + Date5, + /** + * A date field for the resource. + */ + Date6, + /** + * A date field for the resource. + */ + Date7, + /** + * A date field for the resource. + */ + Date8, + /** + * A date field for the resource. + */ + Date9, + /** + * A duration field for the resource. + */ + Duration1, + /** + * A duration field for the resource. + */ + Duration10, + /** + * A duration field for the resource. + */ + Duration2, + /** + * A duration field for the resource. + */ + Duration3, + /** + * A duration field for the resource. + */ + Duration4, + /** + * A duration field for the resource. + */ + Duration5, + /** + * A duration field for the resource. + */ + Duration6, + /** + * A duration field for the resource. + */ + Duration7, + /** + * A duration field for the resource. + */ + Duration8, + /** + * A duration field for the resource. + */ + Duration9, + /** + * The email address of the resource. + */ + Email, + /** + * The end date of the resource availability. + */ + End, + /** + * A finish field for the task. + */ + Finish1, + /** + * A finish field for the task. + */ + Finish10, + /** + * A finish field for the task. + */ + Finish2, + /** + * A finish field for the task. + */ + Finish3, + /** + * A finish field for the task. + */ + Finish4, + /** + * A finish field for the task. + */ + Finish5, + /** + * A finish field for the task. + */ + Finish6, + /** + * A finish field for the task. + */ + Finish7, + /** + * A finish field for the task. + */ + Finish8, + /** + * A finish field for the task. + */ + Finish9, + /** + * A Boolean flag field for the resource. + */ + Flag10, + /** + * A Boolean flag field for the resource. + */ + Flag1, + /** + * A Boolean flag field for the resource. + */ + Flag11, + /** + * A Boolean flag field for the resource. + */ + Flag12, + /** + * A Boolean flag field for the resource. + */ + Flag13, + /** + * A Boolean flag field for the resource. + */ + Flag14, + /** + * A Boolean flag field for the resource. + */ + Flag15, + /** + * A Boolean flag field for the resource. + */ + Flag16, + /** + * A Boolean flag field for the resource. + */ + Flag17, + /** + * A Boolean flag field for the resource. + */ + Flag18, + /** + * A Boolean flag field for the resource. + */ + Flag19, + /** + * A Boolean flag field for the resource. + */ + Flag2, + /** + * A Boolean flag field for the resource. + */ + Flag20, + /** + * A Boolean flag field for the resource. + */ + Flag3, + /** + * A Boolean flag field for the resource. + */ + Flag4, + /** + * A Boolean flag field for the resource. + */ + Flag5, + /** + * A Boolean flag field for the resource. + */ + Flag6, + /** + * A Boolean flag field for the resource. + */ + Flag7, + /** + * A Boolean flag field for the resource. + */ + Flag8, + /** + * A Boolean flag field for the resource. + */ + Flag9, + /** + * The group the resource belongs to. + */ + Group, + /** + * The percentage of work units that the resource has assigned in the project. If the resource is working full-time on the project, Units = 100. + */ + Units, + /** + * The name of the resource. + */ + Name, + /** + * The text value of the notes regarding the resource. + */ + Notes, + /** + * A number field for the resource. + */ + Number1, + /** + * A number field for the resource. + */ + Number10, + /** + * A number field for the resource. + */ + Number11, + /** + * A number field for the resource. + */ + Number12, + /** + * A number field for the resource. + */ + Number13, + /** + * A number field for the resource. + */ + Number14, + /** + * A number field for the resource. + */ + Number15, + /** + * A number field for the resource. + */ + Number16, + /** + * A number field for the resource. + */ + Number17, + /** + * A number field for the resource. + */ + Number18, + /** + * A number field for the resource. + */ + Number19, + /** + * A number field for the resource. + */ + Number2, + /** + * A number field for the resource. + */ + Number20, + /** + * A number field for the resource. + */ + Number3, + /** + * A number field for the resource. + */ + Number4, + /** + * A number field for the resource. + */ + Number5, + /** + * A number field for the resource. + */ + Number6, + /** + * A number field for the resource. + */ + Number7, + /** + * A number field for the resource. + */ + Number8, + /** + * A number field for the resource. + */ + Number9, + /** + * The overtime cost for a resource. + */ + OvertimeCost, + /** + * The overtime rate for a resource. + */ + OvertimeRate, + /** + * The overtime work for a resource. + */ + OvertimeWork, + /** + * The percentage of work complete for a resource. + */ + PercentWorkComplete, + /** + * The cost per use of the resource. + */ + CostPerUse, + /** + * Indicates whether the resource is a generic resource (identified by skill rather than by name). + */ + Generic, + /** + * Indicates whether the resource is overallocated. + */ + OverAllocated, + /** + * The amount of regular work for the resource. + */ + RegularWork, + /** + * The remaining cost for the resource. + */ + RemainingCost, + /** + * The remaining overtime cost for the resource. + */ + RemainingOvertimeCost, + /** + * The remaining overtime work for the resource, in minutes. + */ + RemainingOvertimeWork, + /** + * The remaining work for the resource, in minutes. + */ + RemainingWork, + /** + * The ID of the resource. + */ + ResourceGUID, + /** + * The total cost of the resource. + */ + Cost, + /** + * The total work for the resource, in minutes. + */ + Work, + /** + * The start date for the resource. + */ + Start, + /** + * A start field for the resource. + */ + Start1, + /** + * A start field for the resource. + */ + Start10, + /** + * A start field for the resource. + */ + Start2, + /** + * A start field for the resource. + */ + Start3, + /** + * A start field for the resource. + */ + Start4, + /** + * A start field for the resource. + */ + Start5, + /** + * A start field for the resource. + */ + Start6, + /** + * A start field for the resource. + */ + Start7, + /** + * A start field for the resource. + */ + Start8, + /** + * A start field for the resource. + */ + Start9, + /** + * The standard rate of pay for the resource, in cost per hour. + */ + StandardRate, + /** + * A text field for the resource. + */ + Text1, + /** + * A text field for the resource. + */ + Text10, + /** + * A text field for the resource. + */ + Text11, + /** + * A text field for the resource. + */ + Text12, + /** + * A text field for the resource. + */ + Text13, + /** + * A text field for the resource. + */ + Text14, + /** + * A text field for the resource. + */ + Text15, + /** + * A text field for the resource. + */ + Text16, + /** + * A text field for the resource. + */ + Text17, + /** + * A text field for the resource. + */ + Text18, + /** + * A text field for the resource. + */ + Text19, + /** + * A text field for the resource. + */ + Text2, + /** + * A text field for the resource. + */ + Text20, + /** + * A text field for the resource. + */ + Text21, + /** + * A text field for the resource. + */ + Text22, + /** + * A text field for the resource. + */ + Text23, + /** + * A text field for the resource. + */ + Text24, + /** + * A text field for the resource. + */ + Text25, + /** + * A text field for the resource. + */ + Text26, + /** + * A text field for the resource. + */ + Text27, + /** + * A text field for the resource. + */ + Text28, + /** + * A text field for the resource. + */ + Text29, + /** + * A text field for the resource. + */ + Text3, + /** + * A text field for the resource. + */ + Text30, + /** + * A text field for the resource. + */ + Text4, + /** + * A text field for the resource. + */ + Text5, + /** + * A text field for the resource. + */ + Text6, + /** + * A text field for the resource. + */ + Text7, + /** + * A text field for the resource. + */ + Text8, + /** + * A text field for the resource. + */ + Text9 + } + /** + * Specifies the task fields that are available as a parameter for the {@link Office.Document | Document}.getTaskFieldAsync method. + * + * @remarks + * A ProjectTaskFields constant can be used as a parameter of the {@link Office.Document | Document}.getTaskFieldAsync method. + * + * For more information about working with fields in Project, see the + * {@link https://support.office.com/article/Available-fields-reference-615a4563-1cc3-40f4-b66f-1b17e793a460 | Available fields} reference. + * In Project Help, search for Available fields. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + enum ProjectTaskFields { + /** + * The current actual cost for the task. + */ + ActualCost, + /** + * The actual duration of the task, in minutes. + */ + ActualDuration, + /** + * The actual finish date of the task. + */ + ActualFinish, + /** + * The actual overtime cost for the task. + */ + ActualOvertimeCost, + /** + * The actual overtime work for the task, in minutes. + */ + ActualOvertimeWork, + /** + * The actual start date of the task. + */ + ActualStart, + /** + * The actual work for the task, in minutes. + */ + ActualWork, + /** + * A text field for the task. + */ + Text1, + /** + * A text field for the task. + */ + Text10, + /** + * A finish field for the task. + */ + Finish10, + /** + * A start field for the task. + */ + Start10, + /** + * A text field for the task. + */ + Text11, + /** + * A text field for the task. + */ + Text12, + /** + * A text field for the task. + */ + Text13, + /** + * A text field for the task. + */ + Text14, + /** + * A text field for the task. + */ + Text15, + /** + * A text field for the task. + */ + Text16, + /** + * A text field for the task. + */ + Text17, + /** + * A text field for the task. + */ + Text18, + /** + * A text field for the task. + */ + Text19, + /** + * A finish field for the task. + */ + Finish1, + /** + * A start field for the task. + */ + Start1, + /** + * A text field for the task. + */ + Text2, + /** + * A text field for the task. + */ + Text20, + /** + * A text field for the task. + */ + Text21, + /** + * A text field for the task. + */ + Text22, + /** + * A text field for the task. + */ + Text23, + /** + * A text field for the task. + */ + Text24, + /** + * A text field for the task. + */ + Text25, + /** + * A text field for the task. + */ + Text26, + /** + * A text field for the task. + */ + Text27, + /** + * A text field for the task. + */ + Text28, + /** + * A text field for the task. + */ + Text29, + /** + * A finish field for the task. + */ + Finish2, + /** + * A start field for the task. + */ + Start2, + /** + * A text field for the task. + */ + Text3, + /** + * A text field for the task. + */ + Text30, + /** + * A finish field for the task. + */ + Finish3, + /** + * A start field for the task. + */ + Start3, + /** + * A text field for the task. + */ + Text4, + /** + * A finish field for the task. + */ + Finish4, + /** + * A start field for the task. + */ + Start4, + /** + * A text field for the task. + */ + Text5, + /** + * A finish field for the task. + */ + Finish5, + /** + * A start field for the task. + */ + Start5, + /** + * A text field for the task. + */ + Text6, + /** + * A finish field for the task. + */ + Finish6, + /** + * A start field for the task. + */ + Start6, + /** + * A text field for the task. + */ + Text7, + /** + * A finish field for the task. + */ + Finish7, + /** + * A start field for the task. + */ + Start7, + /** + * A text field for the task. + */ + Text8, + /** + * A finish field for the task. + */ + Finish8, + /** + * A start field for the task. + */ + Start8, + /** + * A text field for the task. + */ + Text9, + /** + * A finish field for the task. + */ + Finish9, + /** + * A start field for the task. + */ + Start9, + /** + * The budget cost for the baseline task. + */ + Baseline10BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline10BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline10Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline10Duration, + /** + * The finish date for the baseline task. + */ + Baseline10Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline10FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline10FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline10Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline10Work, + /** + * The budget cost for the baseline task. + */ + Baseline1BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline1BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline1Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline1Duration, + /** + * The finish date for the baseline task. + */ + Baseline1Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline1FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline1FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline1Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline1Work, + /** + * The budget cost for the baseline task. + */ + Baseline2BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline2BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline2Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline2Duration, + /** + * The finish date for the baseline task. + */ + Baseline2Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline2FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline2FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline2Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline2Work, + /** + * The budget cost for the baseline task. + */ + Baseline3BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline3BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline3Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline3Duration, + /** + * The finish date for the baseline task. + */ + Baseline3Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline3FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline3FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Basline3Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline3Work, + /** + * The budget cost for the baseline task. + */ + Baseline4BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline4BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline4Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline4Duration, + /** + * The finish date for the baseline task. + */ + Baseline4Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline4FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline4FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline4Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline4Work, + /** + * The budget cost for the baseline task. + */ + Baseline5BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline5BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline5Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline5Duration, + /** + * The finish date for the baseline task. + */ + Baseline5Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline5FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline5FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline5Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline5Work, + /** + * The budget cost for the baseline task. + */ + Baseline6BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline6BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline6Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline6Duration, + /** + * The finish date for the baseline task. + */ + Baseline6Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline6FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline6FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline6Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline6Work, + /** + * The budget cost for the baseline task. + */ + Baseline7BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline7BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline7Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline7Duration, + /** + * The finish date for the baseline task. + */ + Baseline7Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline7FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline7FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline7Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline7Work, + /** + * The budget cost for the baseline task. + */ + Baseline8BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline8BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline8Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline8Duration, + /** + * The finish date for the baseline task. + */ + Baseline8Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline8FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline8FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline8Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline8Work, + /** + * The budget cost for the baseline task. + */ + Baseline9BudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + Baseline9BudgetWork, + /** + * The cost for the baseline task. + */ + Baseline9Cost, + /** + * The duration for the baseline task, in minutes. + */ + Baseline9Duration, + /** + * The finish date for the baseline task. + */ + Baseline9Finish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + Baseline9FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + Baseline9FixedCostAccrual, + /** + * The start date for the baseline task. + */ + Baseline9Start, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + Baseline9Work, + /** + * The budget cost for the baseline task. + */ + BaselineBudgetCost, + /** + * The budget work for the baseline task, in hours. + */ + BaselineBudgetWork, + /** + * The cost for the baseline task. + */ + BaselineCost, + /** + * The duration for the baseline task, in minutes. + */ + BaselineDuration, + /** + * The finish date for the baseline task. + */ + BaselineFinish, + /** + * The fixed cost of any non-resource expense for the baseline task. + */ + BaselineFixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + BaselineFixedCostAccrual, + /** + * The start date for the baseline task. + */ + BaselineStart, + /** + * The total person-hours scheduled for the baseline task, in minutes. + */ + BaselineWork, + /** + * The budget cost for the task. + */ + BudgetCost, + BudgetFixedCost, + BudgetFixedWork, + /** + * The budget work for the task, in hours. + */ + BudgetWork, + /** + * The GUID of the task calendar. + */ + TaskCalendarGUID, + /** + * A constraint date for the task. + */ + ConstraintDate, + /** + * A constraint type for the task: As Soon As Possible = 0, As Late As Possible = 1, Must Start On = 2, Must Finish On = 3, + * Start No Earlier Than = 4, Start No Later Than = 5, Finish No Earlier Than = 6, Finish No Later Than = 7. + */ + ConstraintType, + /** + * A cost field of the task. + */ + Cost1, + /** + * A cost field of the task. + */ + Cost10, + /** + * A cost field of the task. + */ + Cost2, + /** + * A cost field of the task. + */ + Cost3, + /** + * A cost field of the task. + */ + Cost4, + /** + * A cost field of the task. + */ + Cost5, + /** + * A cost field of the task. + */ + Cost6, + /** + * A cost field of the task. + */ + Cost7, + /** + * A cost field of the task. + */ + Cost8, + /** + * A cost field of the task. + */ + Cost9, + /** + * A date field of the task. + */ + Date1, + /** + * A date field of the task. + */ + Date10, + /** + * A date field of the task. + */ + Date2, + /** + * A date field of the task. + */ + Date3, + /** + * A date field of the task. + */ + Date4, + /** + * A date field of the task. + */ + Date5, + /** + * A date field of the task. + */ + Date6, + /** + * A date field of the task. + */ + Date7, + /** + * A date field of the task. + */ + Date8, + /** + * A date field of the task. + */ + Date9, + /** + * The deadline for a task. + */ + Deadline, + /** + * A duration field of the task. + */ + Duration1, + /** + * A duration field of the task. + */ + Duration10, + /** + * A duration field of the task. + */ + Duration2, + /** + * A duration field of the task. + */ + Duration3, + /** + * A duration field of the task. + */ + Duration4, + /** + * A duration field of the task. + */ + Duration5, + /** + * A duration field of the task. + */ + Duration6, + /** + * A duration field of the task. + */ + Duration7, + /** + * A duration field of the task. + */ + Duration8, + /** + * A duration field of the task. + */ + Duration9, + /** + * A duration field of the task. + */ + Duration, + /** + * The method for calculating earned value for the task. + */ + EarnedValueMethod, + /** + * The duration between the Early Finish and Late Finish dates for the task, in minutes. + */ + FinishSlack, + /** + * The fixed cost for the task. + */ + FixedCost, + /** + * The accrual method that defines how the baseline task accrues fixed costs: Accrues when the task starts = 1, + * accrues when the task ends = 2, accrues as the task progresses (prorated) = 3. + */ + FixedCostAccrual, + /** + * A Boolean flag field for the task. + */ + Flag10, + /** + * A Boolean flag field for the task. + */ + Flag1, + /** + * A Boolean flag field for the task. + */ + Flag11, + /** + * A Boolean flag field for the task. + */ + Flag12, + /** + * A Boolean flag field for the task. + */ + Flag13, + /** + * A Boolean flag field for the task. + */ + Flag14, + /** + * A Boolean flag field for the task. + */ + Flag15, + /** + * A Boolean flag field for the task. + */ + Flag16, + /** + * A Boolean flag field for the task. + */ + Flag17, + /** + * A Boolean flag field for the task. + */ + Flag18, + /** + * A Boolean flag field for the task. + */ + Flag19, + /** + * A Boolean flag field for the task. + */ + Flag2, + /** + * A Boolean flag field for the task. + */ + Flag20, + /** + * A Boolean flag field for the task. + */ + Flag3, + /** + * A Boolean flag field for the task. + */ + Flag4, + /** + * A Boolean flag field for the task. + */ + Flag5, + /** + * A Boolean flag field for the task. + */ + Flag6, + /** + * A Boolean flag field for the task. + */ + Flag7, + /** + * A Boolean flag field for the task. + */ + Flag8, + /** + * A Boolean flag field for the task. + */ + Flag9, + /** + * The amount of time that the task can be delayed without delaying its successor tasks. + */ + FreeSlack, + /** + * Indicates whether the task has rollup subtasks. + */ + HasRollupSubTasks, + /** + * The index of the selected task. After the project summary task, the index of the first task in a project is 1. + */ + ID, + /** + * The name of the task. + */ + Name, + /** + * The text value of the notes regarding the task. + */ + Notes, + /** + * A number field for the task. + */ + Number1, + /** + * A number field for the task. + */ + Number10, + /** + * A number field for the task. + */ + Number11, + /** + * A number field for the task. + */ + Number12, + /** + * A number field for the task. + */ + Number13, + /** + * A number field for the task. + */ + Number14, + /** + * A number field for the task. + */ + Number15, + /** + * A number field for the task. + */ + Number16, + /** + * A number field for the task. + */ + Number17, + /** + * A number field for the task. + */ + Number18, + /** + * A number field for the task. + */ + Number19, + /** + * A number field for the task. + */ + Number2, + /** + * A number field for the task. + */ + Number20, + /** + * A number field for the task. + */ + Number3, + /** + * A number field for the task. + */ + Number4, + /** + * A number field for the task. + */ + Number5, + /** + * A number field for the task. + */ + Number6, + /** + * A number field for the task. + */ + Number7, + /** + * A number field for the task. + */ + Number8, + /** + * A number field for the task. + */ + Number9, + /** + * The scheduled (as opposed to actual) duration of the task. + */ + ScheduledDuration, + /** + * The scheduled (as opposed to actual) finish date of the task. + */ + ScheduledFinish, + /** + * The scheduled (as opposed to actual) start date of the task. + */ + ScheduledStart, + /** + * The level of the task in the outline hierarchy. + */ + OutlineLevel, + /** + * The overtime cost for the task. + */ + OvertimeCost, + /** + * The overtime work for the task. + */ + OvertimeWork, + /** + * The percent complete status of the task. + */ + PercentComplete, + /** + * The percentage of work completed for the task. + */ + PercentWorkComplete, + /** + * The IDs of the task's predecessors. + */ + Predecessors, + /** + * The finish date of a task before leveling occurred. + */ + PreleveledFinish, + /** + * The start date of a task before leveling occurred. + */ + PreleveledStart, + /** + * The priority of the task, with values from 0 (low) to 1000 (high). The default priority value is 500. + */ + Priority, + /** + * Indicates whether the task is active. + */ + Active, + /** + * Indicates whether the task is on the critical path. + */ + Critical, + /** + * Indicates whether the task is a milestone. + */ + Milestone, + /** + * Indicates whether any assignments for a task are overallocated. + */ + Overallocated, + /** + * Indicates whether subtask information is rolled up to the summary task bar. + */ + IsRollup, + /** + * Indicates whether the task is a summary task. + */ + Summary, + /** + * The amount of regular work for the task. + */ + RegularWork, + /** + * The remaining cost for the task. + */ + RemainingCost, + /** + * The remaining duration for the task, in minutes. + */ + RemainingDuration, + /** + * The remaining overtime cost for the task. + */ + RemainingOvertimeCost, + /** + * The remaining work for the task, in minutes. + */ + RemainingWork, + /** + * The names of the resources assigned to a task. + */ + ResourceNames, + /** + * The total cost of the task. + */ + Cost, + /** + * The finish date of the task. + */ + Finish, + /** + * The start date of the task. + */ + Start, + /** + * The total person-hours scheduled for the task, in minutes. + */ + Work, + /** + * The duration between the Early Start and Late Start dates for the task. + */ + StartSlack, + /** + * The status of the task: Complete = 0, on schedule = 1, late = 2, future task = 3, status not available = 4. + */ + Status, + /** + * The IDs of the task's successors. + */ + Successors, + /** + * The enterprise resource responsible for accepting or rejecting assignment progress updates for the task. + */ + StatusManager, + /** + * The total slack time for the task, in minutes. + */ + TotalSlack, + /** + * The GUID of the task. + */ + TaskGUID, + /** + * The way the task is calculated: Fixed units = 0, fixed duration = 1, fixed work = 2. + */ + Type, + /** + * The work breakdown structure code of the task. + */ + WBS, + /** + * The work breakdown structure codes of the task predecessors, separated by the list separator. + */ + WBSPREDECESSORS, + /** + * The work breakdown structure codes of the task successors, separated by the list separator. + */ + WBSSUCCESSORS, + /** + * The ID of the task in a SharePoint list, for a project that is synchronized with a SharePoint tasks list. + */ + WSSID + } + /** + * Specifies the types of views that the {@link Office.Document | Document}.getSelectedViewAsync method can recognize. + * + * @remarks + * The {@link Office.Document | Document}.getSelectedViewAsync method returns the ProjectViewTypes constant value and name that corresponds to the + * active view. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
+ */ + enum ProjectViewTypes { + /** + * The Gantt chart view. + */ + Gantt, + /** + * The Network Diagram view. + */ + NetworkDiagram, + /** + * The Task Diagram view. + */ + TaskDiagram, + /** + * The Task form view. + */ + TaskForm, + /** + * The Task Sheet view. + */ + TaskSheet, + /** + * The Resource Form view. + */ + ResourceForm, + /** + * The Resource Sheet view. + */ + ResourceSheet, + /** + * The Resource Graph view. + */ + ResourceGraph, + /** + * The Team Planner view. + */ + TeamPlanner, + /** + * The Task Details view. + */ + TaskDetails, + /** + * The Task Name Form view. + */ + TaskNameForm, + /** + * The Resource Names view. + */ + ResourceNames, + /** + * The Calendar view. + */ + Calendar, + /** + * The Task Usage view. + */ + TaskUsage, + /** + * The Resource Usage view. + */ + ResourceUsage, + /** + * The Timeline view. + */ + Timeline + } +} + + +//////////////////////////////////////////////////////////////// +///////////////////// End Office namespace ///////////////////// +//////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////// +////////////////////// Begin Exchange APIs ///////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Office { + namespace MailboxEnums { + /** + * Specifies an attachment's type. + * + * [Api set: Mailbox 1.0] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum AttachmentType { + /** + * The attachment is a file + */ + File = "file", + /** + * The attachment is an Exchange item + */ + Item = "item", + /** + * The attachment is stored in a cloud location, such as OneDrive. The id property of the attachment contains a URL to the file. + */ + Cloud = "cloud" + } + /** + * Specifies the day of week or type of day. + * + * [Api set: Mailbox 1.7] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum Days { + /** + * Monday + */ + Mon = "mon", + /** + * Tuesday + */ + Tue = "tue", + /** + * Wednesday + */ + Wed = "wed", + /** + * Thursday + */ + Thu = "thu", + /** + * Friday + */ + Fri = "fri", + /** + * Saturday + */ + Sat = "sat", + /** + * Sunday + */ + Sun = "sun", + /** + * Week day (excludes weekend days): 'Mon', 'Tue', 'Wed', 'Thu', and 'Fri'. + */ + Weekday = "weekday", + /** + * Weekend day: 'Sat' and 'Sun'. + */ + WeekendDay = "weekendDay", + /** + * Day of week. + */ + Day = "day" + } + /** + * This bit mask represents a delegate's permissions on a shared folder. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum DelegatePermissions { + /** + * Delegate has permission to read items. + */ + Read = 1, + /** + * Delegate has permission to create and write items. + */ + Write = 2, + /** + * Delegate has permission to delete only the items they created. + */ + DeleteOwn = 4, + /** + * Delegate has permission to delete any items. + */ + DeleteAll = 8, + /** + * Delegate has permission to edit only they items they created. + */ + EditOwn = 16, + /** + * Delegate has permission to edit any items. + */ + EditAll = 32 + } + /** + * Specifies an entity's type. + * + * [Api set: Mailbox 1.0] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum EntityType { + /** + * Specifies that the entity is a meeting suggestion. + */ + MeetingSuggestion = "meetingSuggestion", + /** + * Specifies that the entity is a task suggestion. + */ + TaskSuggestion = "taskSuggestion", + /** + * Specifies that the entity is a postal address. + */ + Address = "address", + /** + * Specifies that the entity is an SMTP email address. + */ + EmailAddress = "emailAddress", + /** + * Specifies that the entity is an Internet URL. + */ + Url = "url", + /** + * Specifies that the entity is a US phone number. + */ + PhoneNumber = "phoneNumber", + /** + * Specifies that the entity is a contact. + */ + Contact = "contact" + } + /** + * Specifies the notification message type for an appointment or message. + * + * [Api set: Mailbox 1.3] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum ItemNotificationMessageType { + /** + * The notificationMessage is a progress indicator. + */ + ProgressIndicator = "progressIndicator", + /** + * The notificationMessage is an informational message. + */ + InformationalMessage = "informationalMessage", + /** + * The notificationMessage is an error message. + */ + ErrorMessage = "errorMessage" + } + /** + * Specifies an item's type. + * + * [Api set: Mailbox 1.0] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum ItemType { + /** + * An email, meeting request, meeting response, or meeting cancellation. + */ + Message = "message", + /** + * An appointment item. + */ + Appointment = "appointment" + } + /** + * Specifies the month. + * + * [Api set: Mailbox 1.7] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum Month { + /** + * January + */ + Jan = "jan", + /** + * February + */ + Feb = "feb", + /** + * March + */ + Mar = "mar", + /** + * April + */ + Apr = "apr", + /** + * May + */ + May = "may", + /** + * June + */ + Jun = "jun", + /** + * July + */ + Jul = "jul", + /** + * August + */ + Aug = "aug", + /** + * September + */ + Sep = "sep", + /** + * October + */ + Oct = "oct", + /** + * November + */ + Nov = "nov", + /** + * December + */ + Dec = "dec" + } + /** + * Represents the current view of Outlook Web App. + */ + enum OWAView { + /** + * One column view. Displayed when the screen is narrow. Outlook Web App uses this single-column layout on the entire screen of a smartphone. + */ + OneColumn = "OneColumn", + /** + * Two column view. Displayed when the screen is wider. Outlook Web App uses this view on most tablets. + */ + TwoColumns = "TwoColumns", + /** + Three column view. Displayed when the screen is wide. For example, Outlook Web App uses this view in a full screen window on a desktop + computer. + */ + ThreeColumns = "ThreeColumns" + } + /** + * Specifies the type of recipient for an appointment. + * + * [Api set: Mailbox 1.1] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum RecipientType { + /** + * Specifies that the recipient is a distribution list containing a list of email addresses. + */ + DistributionList = "distributionList", + /** + * Specifies that the recipient is an SMTP email address that is on the Exchange server. + */ + User = "user", + /** + * Specifies that the recipient is an SMTP email address that is not on the Exchange server. + */ + ExternalUser = "externalUser", + /** + * Specifies that the recipient is not one of the other recipient types. + */ + Other = "other" + } + /** + * Specifies the time zone applied to the recurrence. + * + * [Api set: Mailbox 1.7] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum RecurrenceTimeZone { + /** + * Afghanistan Standard Time + */ + AfghanistanStandardTime = "Afghanistan Standard Time", + /** + * Alaskan Standard Time + */ + AlaskanStandardTime = "Alaskan Standard Time", + /** + * Aleutian Standard Time + */ + AleutianStandardTime = "Aleutian Standard Time", + /** + * Altai Standard Time + */ + AltaiStandardTime = "Altai Standard Time", + /** + * Arab Standard Time + */ + ArabStandardTime = "Arab Standard Time", + /** + * Arabian Standard Time + */ + ArabianStandardTime = "Arabian Standard Time", + /** + * Arabic Standard Time + */ + ArabicStandardTime = "Arabic Standard Time", + /** + * Argentina Standard Time + */ + ArgentinaStandardTime = "Argentina Standard Time", + /** + * Astrakhan Standard Time + */ + AstrakhanStandardTime = "Astrakhan Standard Time", + /** + * Atlantic Standard Time + */ + AtlanticStandardTime = "Atlantic Standard Time", + /** + * Australia Central Standard Time + */ + AUSCentralStandardTime = "AUS Central Standard Time", + /** + * Australia Central West Standard Time + */ + AusCentralW_StandardTime = "Aus Central W. Standard Time", + /** + * AUS Eastern Standard Time + */ + AUSEasternStandardTime = "AUS Eastern Standard Time", + /** + * Azerbaijan Standard Time + */ + AzerbaijanStandardTime = "Azerbaijan Standard Time", + /** + * Azores Standard Time + */ + AzoresStandardTime = "Azores Standard Time", + /** + * Bahia Standard Time + */ + BahiaStandardTime = "Bahia Standard Time", + /** + * Bangladesh Standard Time + */ + BangladeshStandardTime = "Bangladesh Standard Time", + /** + * Belarus Standard Time + */ + BelarusStandardTime = "Belarus Standard Time", + /** + * Bougainville Standard Time + */ + BougainvilleStandardTime = "Bougainville Standard Time", + /** + * Canada Central Standard Time + */ + CanadaCentralStandardTime = "Canada Central Standard Time", + /** + * Cape Verde Standard Time + */ + CapeVerdeStandardTime = "Cape Verde Standard Time", + /** + * Caucasus Standard Time + */ + CaucasusStandardTime = "Caucasus Standard Time", + /** + * Central Australia Standard Time + */ + CenAustraliaStandardTime = "Cen. Australia Standard Time", + /** + * Central America Standard Time + */ + CentralAmericaStandardTime = "Central America Standard Time", + /** + * Central Asia Standard Time + */ + CentralAsiaStandardTime = "Central Asia Standard Time", + /** + * Central Brazilian Standard Time + */ + CentralBrazilianStandardTime = "Central Brazilian Standard Time", + /** + * Central Europe Standard Time + */ + CentralEuropeStandardTime = "Central Europe Standard Time", + /** + * Central European Standard Time + */ + CentralEuropeanStandardTime = "Central European Standard Time", + /** + * Central Pacific Standard Time + */ + CentralPacificStandardTime = "Central Pacific Standard Time", + /** + * Central Standard Time + */ + CentralStandardTime = "Central Standard Time", + /** + * Central Standard Time (Mexico) + */ + CentralStandardTime_Mexico = "Central Standard Time (Mexico)", + /** + * Chatham Islands Standard Time + */ + ChathamIslandsStandardTime = "Chatham Islands Standard Time", + /** + * China Standard Time + */ + ChinaStandardTime = "China Standard Time", + /** + * Cuba Standard Time + */ + CubaStandardTime = "Cuba Standard Time", + /** + * Dateline Standard Time + */ + DatelineStandardTime = "Dateline Standard Time", + /** + * East Africa Standard Time + */ + E_AfricaStandardTime = "E. Africa Standard Time", + /** + * East Australia Standard Time + */ + E_AustraliaStandardTime = "E. Australia Standard Time", + /** + * East Europe Standard Time + */ + E_EuropeStandardTime = "E. Europe Standard Time", + /** + * East South America Standard Time + */ + E_SouthAmericaStandardTime = "E. South America Standard Time", + /** + * Easter Island Standard Time + */ + EasterIslandStandardTime = "Easter Island Standard Time", + /** + * Eastern Standard Time + */ + EasternStandardTime = "Eastern Standard Time", + /** + * Eastern Standard Time (Mexico) + */ + EasternStandardTime_Mexico = "Eastern Standard Time (Mexico)", + /** + * Egypt Standard Time + */ + EgyptStandardTime = "Egypt Standard Time", + /** + * Ekaterinburg Standard Time + */ + EkaterinburgStandardTime = "Ekaterinburg Standard Time", + /** + * Fiji Standard Time + */ + FijiStandardTime = "Fiji Standard Time", + /** + * FLE Standard Time + */ + FLEStandardTime = "FLE Standard Time", + /** + * Georgian Standard Time + */ + GeorgianStandardTime = "Georgian Standard Time", + /** + * GMT Standard Time + */ + GMTStandardTime = "GMT Standard Time", + /** + * Greenland Standard Time + */ + GreenlandStandardTime = "Greenland Standard Time", + /** + * Greenwich Standard Time + */ + GreenwichStandardTime = "Greenwich Standard Time", + /** + * GTB Standard Time + */ + GTBStandardTime = "GTB Standard Time", + /** + * Haiti Standard Time + */ + HaitiStandardTime = "Haiti Standard Time", + /** + * Hawaiian Standard Time + */ + HawaiianStandardTime = "Hawaiian Standard Time", + /** + * India Standard Time + */ + IndiaStandardTime = "India Standard Time", + /** + * Iran Standard Time + */ + IranStandardTime = "Iran Standard Time", + /** + * Israel Standard Time + */ + IsraelStandardTime = "Israel Standard Time", + /** + * Jordan Standard Time + */ + JordanStandardTime = "Jordan Standard Time", + /** + * Kaliningrad Standard Time + */ + KaliningradStandardTime = "Kaliningrad Standard Time", + /** + * Kamchatka Standard Time + */ + KamchatkaStandardTime = "Kamchatka Standard Time", + /** + * Korea Standard Time + */ + KoreaStandardTime = "Korea Standard Time", + /** + * Libya Standard Time + */ + LibyaStandardTime = "Libya Standard Time", + /** + * Line Islands Standard Time + */ + LineIslandsStandardTime = "Line Islands Standard Time", + /** + * Lord Howe Standard Time + */ + LordHoweStandardTime = "Lord Howe Standard Time", + /** + * Magadan Standard Time + */ + MagadanStandardTime = "Magadan Standard Time", + /** + * Magallanes Standard Time + */ + MagallanesStandardTime = "Magallanes Standard Time", + /** + * Marquesas Standard Time + */ + MarquesasStandardTime = "Marquesas Standard Time", + /** + * Mauritius Standard Time + */ + MauritiusStandardTime = "Mauritius Standard Time", + /** + * Mid-Atlantic Standard Time + */ + MidAtlanticStandardTime = "Mid-Atlantic Standard Time", + /** + * Middle East Standard Time + */ + MiddleEastStandardTime = "Middle East Standard Time", + /** + * Montevideo Standard Time + */ + MontevideoStandardTime = "Montevideo Standard Time", + /** + * Morocco Standard Time + */ + MoroccoStandardTime = "Morocco Standard Time", + /** + * Mountain Standard Time + */ + MountainStandardTime = "Mountain Standard Time", + /** + * Mountain Standard Time (Mexico) + */ + MountainStandardTime_Mexico = "Mountain Standard Time (Mexico)", + /** + * Myanmar Standard Time + */ + MyanmarStandardTime = "Myanmar Standard Time", + /** + * North Central Asia Standard Time + */ + N_CentralAsiaStandardTime = "N. Central Asia Standard Time", + /** + * Namibia Standard Time + */ + NamibiaStandardTime = "Namibia Standard Time", + /** + * Nepal Standard Time + */ + NepalStandardTime = "Nepal Standard Time", + /** + * New Zealand Standard Time + */ + NewZealandStandardTime = "New Zealand Standard Time", + /** + * Newfoundland Standard Time + */ + NewfoundlandStandardTime = "Newfoundland Standard Time", + /** + * Norfolk Standard Time + */ + NorfolkStandardTime = "Norfolk Standard Time", + /** + * North Asia East Standard Time + */ + NorthAsiaEastStandardTime = "North Asia East Standard Time", + /** + * North Asia Standard Time + */ + NorthAsiaStandardTime = "North Asia Standard Time", + /** + * North Korea Standard Time + */ + NorthKoreaStandardTime = "North Korea Standard Time", + /** + * Omsk Standard Time + */ + OmskStandardTime = "Omsk Standard Time", + /** + * Pacific SA Standard Time + */ + PacificSAStandardTime = "Pacific SA Standard Time", + /** + * Pacific Standard Time + */ + PacificStandardTime = "Pacific Standard Time", + /** + * Pacific Standard Time (Mexico) + */ + PacificStandardTimeMexico = "Pacific Standard Time (Mexico)", + /** + * Pakistan Standard Time + */ + PakistanStandardTime = "Pakistan Standard Time", + /** + * Paraguay Standard Time + */ + ParaguayStandardTime = "Paraguay Standard Time", + /** + * Romance Standard Time + */ + RomanceStandardTime = "Romance Standard Time", + /** + * Russia Time Zone 10 + */ + RussiaTimeZone10 = "Russia Time Zone 10", + /** + * Russia Time Zone 11 + */ + RussiaTimeZone11 = "Russia Time Zone 11", + /** + * Russia Time Zone 3 + */ + RussiaTimeZone3 = "Russia Time Zone 3", + /** + * Russian Standard Time + */ + RussianStandardTime = "Russian Standard Time", + /** + * SA Eastern Standard Time + */ + SAEasternStandardTime = "SA Eastern Standard Time", + /** + * SA Pacific Standard Time + */ + SAPacificStandardTime = "SA Pacific Standard Time", + /** + * SA Western Standard Time + */ + SAWesternStandardTime = "SA Western Standard Time", + /** + * Saint Pierre Standard Time + */ + SaintPierreStandardTime = "Saint Pierre Standard Time", + /** + * Sakhalin Standard Time + */ + SakhalinStandardTime = "Sakhalin Standard Time", + /** + * Samoa Standard Time + */ + SamoaStandardTime = "Samoa Standard Time", + /** + * Saratov Standard Time + */ + SaratovStandardTime = "Saratov Standard Time", + /** + * Southeast Asia Standard Time + */ + SEAsiaStandardTime = "SE Asia Standard Time", + /** + * Singapore Standard Time + */ + SingaporeStandardTime = "Singapore Standard Time", + /** + * South Africa Standard Time + */ + SouthAfricaStandardTime = "South Africa Standard Time", + /** + * Sri Lanka Standard Time + */ + SriLankaStandardTime = "Sri Lanka Standard Time", + /** + * Sudan Standard Time + */ + SudanStandardTime = "Sudan Standard Time", + /** + * Syria Standard Time + */ + SyriaStandardTime = "Syria Standard Time", + /** + * Taipei Standard Time + */ + TaipeiStandardTime = "Taipei Standard Time", + /** + * Tasmania Standard Time + */ + TasmaniaStandardTime = "Tasmania Standard Time", + /** + * Tocantins Standard Time + */ + TocantinsStandardTime = "Tocantins Standard Time", + /** + * Tokyo Standard Time + */ + TokyoStandardTime = "Tokyo Standard Time", + /** + * Tomsk Standard Time + */ + TomskStandardTime = "Tomsk Standard Time", + /** + * Tonga Standard Time + */ + TongaStandardTime = "Tonga Standard Time", + /** + * Transbaikal Standard Time + */ + TransbaikalStandardTime = "Transbaikal Standard Time", + /** + * Turkey Standard Time + */ + TurkeyStandardTime = "Turkey Standard Time", + /** + * Turks And Caicos Standard Time + */ + TurksAndCaicosStandardTime = "Turks And Caicos Standard Time", + /** + * Ulaanbaatar Standard Time + */ + UlaanbaatarStandardTime = "Ulaanbaatar Standard Time", + /** + * United States Eastern Standard Time + */ + USEasternStandardTime = "US Eastern Standard Time", + /** + * United States Mountain Standard Time + */ + USMountainStandardTime = "US Mountain Standard Time", + /** + * Coordinated Universal Time (UTC) + */ + UTC = "UTC", + /** + * Coordinated Universal Time (UTC) + 12 hours + */ + UTCPLUS12 = "UTC+12", + /** + * Coordinated Universal Time (UTC) + 13 hours + */ + UTCPLUS13 = "UTC+13", + /** + * Coordinated Universal Time (UTC) - 2 hours + */ + UTCMINUS02 = "UTC-02", + /** + * Coordinated Universal Time (UTC) - 8 hours + */ + UTCMINUS08 = "UTC-08", + /** + * Coordinated Universal Time (UTC) - 9 hours + */ + UTCMINUS09 = "UTC-09", + /** + * Coordinated Universal Time (UTC) - 11 hours + */ + UTCMINUS11 = "UTC-11", + /** + * Venezuela Standard Time + */ + VenezuelaStandardTime = "Venezuela Standard Time", + /** + * Vladivostok Standard Time + */ + VladivostokStandardTime = "Vladivostok Standard Time", + /** + * West Australia Standard Time + */ + W_AustraliaStandardTime = "W. Australia Standard Time", + /** + * West Central Africa Standard Time + */ + W_CentralAfricaStandardTime = "W. Central Africa Standard Time", + /** + * West Europe Standard Time + */ + W_EuropeStandardTime = "W. Europe Standard Time", + /** + * West Mongolia Standard Time + */ + W_MongoliaStandardTime = "W. Mongolia Standard Time", + /** + * West Asia Standard Time + */ + WestAsiaStandardTime = "West Asia Standard Time", + /** + * West Bank Standard Time + */ + WestBankStandardTime = "West Bank Standard Time", + /** + * West Pacific Standard Time + */ + WestPacificStandardTime = "West Pacific Standard Time", + /** + * Yakutsk Standard Time + */ + YakutskStandardTime = "Yakutsk Standard Time" + + } + + /** + * Specifies the type of recurrence. + * + * [Api set: Mailbox 1.7] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum RecurrenceType { + /** + * Daily. + */ + Daily = "daily", + /** + * Weekday. + */ + Weekday = "weekday", + /** + * Weekly. + */ + Weekly = "weekly", + /** + * Monthly. + */ + Monthly = "monthly", + /** + * Yearly. + */ + Yearly = "yearly" + } + /** + * Specifies the type of response to a meeting invitation. + * + * [Api set: Mailbox 1.0] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum ResponseType { + /** + * There has been no response from the attendee. + */ + None = "none", + /** + * The attendee is the meeting organizer. + */ + Organizer = "organizer", + /** + * The meeting request was tentatively accepted by the attendee. + */ + Tentative = "tentative", + /** + * The meeting request was accepted by the attendee. + */ + Accepted = "accepted", + /** + * The meeting request was declined by the attendee. + */ + Declined = "declined" + } + /** + * Specifies the version of the REST API that corresponds to a REST-formatted item ID. + * + * [Api set: Mailbox 1.3] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum RestVersion { + /** + * Version 1.0. + */ + v1_0 = "v1.0", + /** + * Version 2.0. + */ + v2_0 = "v2.0", + /** + * Beta. + */ + Beta = "beta" + } + /** + * Specifies the week of the month. + * + * [Api set: Mailbox 1.7] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ */ + enum WeekNumber { + /** + * First week of the month. + */ + First = "first", + /** + * Second week of the month. + */ + Second = "second", + /** + * Third week of the month. + */ + Third = "third", + /** + * Fourth week of the month. + */ + Fourth = "fourth", + /** + * Last week of the month. + */ + Last = "last" + } + } + interface CoercionTypeOptions { + coercionType?: CoercionType; + } + enum SourceProperty { + /** + * The source of the data is from the body of the message. + */ + Body, + /** + * The source of the data is from the subject of the message. + */ + Subject + } + /** + * The AppointmentForm namespace is used to access the currently selected appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface AppointmentForm { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + body: string; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The end property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method to + * convert the end property value to the client's local date and time. + * + * *Read mode* + * + * The end property returns a Date object. + * + * *Compose mode* + * + * The end property returns a Time object. + * + * When you use the Time.setAsync method to set the end time, you should use the convertToUtcClientTime method to convert the local time on + * the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + end: Date; + /** + * Gets or sets the location of an appointment. + * + * *Read mode* + * + * The location property returns a string that contains the location of the appointment. + * + * *Compose mode* + * + * The location property returns a Location object that provides methods that are used to get and set the location of the appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + location: string; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depends on the mode of the current item. + * + * *Read mode* + * + * The optionalAttendees property returns an array that contains an EmailAddressDetails object for each optional attendee to the meeting. + * + * *Compose mode* + * + * The optionalAttendees property returns a Recipients object that provides methods to get or update the optional attendees for a meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + optionalAttendees: string[] | EmailAddressDetails[]; + resources: string[]; + /** + * Provides access to the required attendees of an event. The type of object and level of access depends on the mode of the current item. + * + * *Read mode* + * + * The requiredAttendees property returns an array that contains an EmailAddressDetails object for each required attendee to the meeting. + * + * *Compose mode* + * + * The requiredAttendees property returns a Recipients object that provides methods to get or update the required attendees for a meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + requiredAttendees: string[] | EmailAddressDetails[]; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The start property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method + * to convert the value to the client's local date and time. + * + * *Read mode* + * + * The start property returns a Date object. + * + * *Compose mode* + * + * The start property returns a Time object. + * + * When you use the Time.setAsync method to set the start time, you should use the convertToUtcClientTime method to convert the local time on + * the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + start: Date; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * *Read mode* + * + * The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:. + * + * *Compose mode* + * + * The subject property returns a Subject object that provides methods to get and set the subject. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + subject: string; + } + /** + * Represents an attachment on an item from the server. Read mode only. + * + * An array of AttachmentDetail objects is returned as the attachments property of an Appointment or Message object. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface AttachmentDetails { + /** + * Gets a value that indicates the type of an attachment. + */ + attachmentType: Office.MailboxEnums.AttachmentType; + /** + * Gets the MIME content type of the attachment. + */ + contentType: string; + /** + * Gets the Exchange attachment ID of the attachment. + */ + id: string; + /** + * Gets a value that indicates whether the attachment should be displayed in the body of the item. + */ + isInline: boolean; + /** + * Gets the name of the attachment. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + } + /** + * The body object provides methods for adding and updating the content of the message or appointment. + * It is returned in the body property of the selected item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface Body { + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by coercionType. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method previously. + * The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * + * @param coercionType The format for the returned body. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + * The body is provided in the requested format in the asyncResult.value property. + */ + getAsync(coerciontype: Office.CoercionType, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by coercionType. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method previously. + * The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param coercionType The format for the returned body. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * The body is provided in the requested format in the asyncResult.value property. + */ + getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; + + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * The content type is returned as one of the CoercionType values in the asyncResult.value property. + */ + getTypeAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * The prependAsync method inserts the specified string at the beginning of the item body. + * After insertion, the cursor is returned to its original place, relative to the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `prependAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `prependAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * `prependAsync(data: string): void;` + * + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + prependAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * The prependAsync method inserts the specified string at the beginning of the item body. + * After insertion, the cursor is returned to its original place, relative to the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
+ * + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + */ + prependAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Adds the specified content to the beginning of the item body. + * + * The prependAsync method inserts the specified string at the beginning of the item body. + * After insertion, the cursor is returned to its original place, relative to the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
+ * + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + prependAsync(data: string, callback: (result: AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * The prependAsync method inserts the specified string at the beginning of the item body. + * After insertion, the cursor is returned to its original place, relative to the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
+ * + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + */ + prependAsync(data: string): void; + /** + * Replaces the entire body with the specified text. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method + * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * `setAsync(data: string): void;` + * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + setAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method + * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + */ + setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Replaces the entire body with the specified text. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method + * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + setAsync(data: string, callback: (result: AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * When working with HTML-formatted bodies, it is important to note that the Body.getAsync and Body.setAsync methods are not idempotent. + * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method + * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + */ + setAsync(data: string): void; + + /** + * Replaces the selection in the body with the specified text. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * `setSelectedDataAsync(data: string): void;` + * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Replaces the selection in the body with the specified text. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: The desired format for the body. The string in the data parameter will be converted to this format. + */ + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Replaces the selection in the body with the specified text. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; + /** + * Replaces the selection in the body with the specified text. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (
) to "LPNoLP" + * (please see the Examples section for a sample). + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The data parameter is longer than 1,000,000 characters.
InvalidFormatError - The options.coercionType parameter is set to Office.CoercionType.Html and the message body is in plain text.
+ * + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters. + */ + setSelectedDataAsync(data: string): void; + } + /** + * Represents a contact stored on the server. Read mode only. + * + * The list of contacts associated with an email message or appointment is returned in the contacts property of the {@link Office.Entities} object + * that is returned by the getEntities or getEntitiesByType method of the active item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface Contact { + /** + * An array of strings containing the mailing and street addresses associated with the contact. Nullable. + */ + addresses: Array; + /** + * A string containing the name of the business associated with the contact. Nullable. + */ + businessName: string; + /** + * An array of strings containing the SMTP email addresses associated with the contact. Nullable, + */ + emailAddresses: Array; + /** + * A string containing the name of the person associated with the contact. Nullable. + */ + personName: string; + /** + * An array containing a PhoneNumber object for each phone number associated with the contact. Nullable. + */ + phoneNumbers: Array; + /** + * An array of strings containing the Internet URLs associated with the contact. Nullable. + */ + urls: Array; + } + /** + * The CustomProperties object represents custom properties that are specific to a particular item and specific to a mail add-in for Outlook. + * For example, there might be a need for a mail add-in to save some data that is specific to the current email message that activated the add-in. + * If the user revisits the same message in the future and activates the mail add-in again, the add-in will be able to retrieve the data that had + * been saved as custom properties. + * + * Because Outlook for Mac doesn't cache custom properties, if the user's network goes down, mail add-ins cannot access their custom properties. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface CustomProperties { + /** + * Returns the value of the specified custom property. + * @param name The name of the custom property to be returned. + * @returns The value of the specified custom property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + get(name: string): any; + /** + * Sets the specified property to the specified value. + * + * The set method sets the specified property to the specified value. You must use the saveAsync method to save the property to the server. + * + * The set method creates a new property if the specified property does not already exist; + * otherwise, the existing value is replaced with the new value. + * The value parameter can be of any type; however, it is always passed to the server as a string. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param name The name of the property to be set. + * @param value The value of the property to be set. + */ + set(name: string, value: string): void; + /** + * Removes the specified property from the custom property collection. + * + * To make the removal of the property permanent, you must call the saveAsync method of the CustomProperties object. + * @param name The name of the property to be removed. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + remove(name: string): void; + /** + * Saves item-specific custom properties to the server. + * + * You must call the saveAsync method to persist any changes made with the set method or the remove method of the CustomProperties object. + * The saving action is asynchronous. + * + * It's a good practice to have your callback function check for and handle errors from saveAsync. + * In particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently the user becomes + * disconnected. + * If the add-in calls saveAsync while in the disconnected state, saveAsync would return an error. + * Your callback method should handle this error accordingly. + * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param asyncContext Optional. Any state data that is passed to the callback method. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + saveAsync(callback?: (result: AsyncResult) => void, asyncContext?: any): void; + } + /** + * Provides diagnostic information to an Outlook add-in. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface Diagnostics { + /** + * Gets a string that represents the name of the host application. + * + * A string that can be one of the following values: Outlook, Mac Outlook, OutlookIOS, or OutlookWebApp. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + hostName: string; + /** + * Gets a string that represents the version of either the host application or the Exchange Server. + * + * If the mail add-in is running on the Outlook desktop client or Outlook for iOS, the hostVersion property returns the version of the host + * application, Outlook. In Outlook Web App, the property returns the version of the Exchange Server. An example is the string 15.0.468.0. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + hostVersion: string; + /** + * Gets a string that represents the current view of Outlook Web App. + * + * The returned string can be one of the following values: OneColumn, TwoColumns, or ThreeColumns. + * + * If the host application is not Outlook Web App, then accessing this property results in undefined. + * + * Outlook Web App has three views that correspond to the width of the screen and the window, and the number of columns that can be displayed: + * + * - OneColumn, which is displayed when the screen is narrow. Outlook Web App uses this single-column layout on the entire screen of a + * smartphone. + * + * - TwoColumns, which is displayed when the screen is wider. Outlook Web App uses this view on most tablets. + * + * - ThreeColumns, which is displayed when the screen is wide. For example, Outlook Web App uses this view in a full screen window on a + * desktop computer. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns"; + } + /** + * Provides the email properties of the sender or specified recipients of an email message or appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface EmailAddressDetails { + /** + * Gets the SMTP email address. + */ + emailAddress: string; + /** + * Gets the display name associated with an email address. + */ + displayName: string; + /** + * Gets the response that an attendee returned for an appointment. + * This property applies to only an attendee of an appointment, as represented by the optionalAttendees or requiredAttendees property. + * This property returns undefined in other scenarios. + */ + appointmentResponse: Office.MailboxEnums.ResponseType; + /** + * Gets the email address type of a recipient. + */ + recipientType: Office.MailboxEnums.RecipientType; + } + /** + * Represents an email account on an Exchange Server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface EmailUser { + /** + * Gets the display name associated with an email address. + */ + displayName: string; + /** + * Gets the SMTP email address. + */ + emailAddress: string; + } + /** + * Represents a collection of entities found in an email message or appointment. Read mode only. + * + * The Entities object is a container for the entity arrays returned by the getEntities and getEntitiesByType methods when the item + * (either an email message or an appointment) contains one or more entities that have been found by the server. + * You can use these entities in your code to provide additional context information to the viewer, such as a map to an address found in the item, + * or to open a dialer for a phone number found in the item. + * + * If no entities of the type specified in the property are present in the item, the property associated with that entity is null. + * For example, if a message contains a street address and a phone number, the addresses property and phoneNumbers property would contain + * information, and the other properties would be null. + * + * To be recognized as an address, the string must contain a United States postal address that has at least a subset of the elements of a street + * number, street name, city, state, and zip code. + * + * To be recognized as a phone number, the string must contain a North American phone number format. + * + * Entity recognition relies on natural language recognition that is based on machine learning of large amounts of data. + * The recognition of an entity is non-deterministic and success sometimes relies on the particular context in the item. + * + * When the property arrays are returned by the getEntitiesByType method, only the property for the specified entity contains data; + * all other properties are null. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface Entities { + /** + * Gets the physical addresses (street or mailing addresses) found in an email message or appointment. + */ + addresses: string[]; + /** + * Gets the contacts found in an email address or appointment. + */ + contacts: Contact[]; + /** + * Gets the email addresses found in an email message or appointment. + */ + emailAddresses: string[]; + /** + * Gets the meeting suggestions found in an email message. + */ + meetingSuggestions: MeetingSuggestion[]; + /** + * Gets the phone numbers found in an email message or appointment. + */ + phoneNumbers: PhoneNumber[]; + /** + * Gets the task suggestions found in an email message or appointment. + */ + taskSuggestions: string[]; + /** + * Gets the Internet URLs present in an email message or appointment. + */ + urls: string[]; + } + + /** + * Provides a method to get the from value of a message in an Outlook add-in. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + export interface From { + /** + * Gets the from value of a message. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the from value of a message. + * + * The from value of the item is provided as an {@link Office.EmailAddressDetails} in the asyncResult.value property. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, the method also has the following signature: + * + * `getAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. + * The `value` property of the result is message's from value, as an EmailAddressDetails object. + */ + getAsync(options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Gets the from value of a message. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the from value of a message. + * + * The from value of the item is provided as an {@link Office.EmailAddressDetails} in the asyncResult.value property. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. + * The `value` property of the result is message's from value, as an EmailAddressDetails object. + */ + getAsync(callback?: (result: AsyncResult) => void): void; + } + + /** + * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. + * This object provides a method to get the organizer value of an appointment in an Outlook add-in. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + export interface Organizer { + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails} in the asyncResult.value property. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object. + * The `value` property of the result is message's organizer value, as an EmailAddressDetails object. + */ + getAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + } + + /** + * The subclass of {@link Office.Item} dealing with appointments. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. + */ + interface Appointment extends Item { + } + /** + * The appointment organizer mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. Refer to the Object Model pages for more information. + */ + interface AppointmentCompose extends Appointment, ItemCompose { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + body: Office.Body; + /** + * Gets the date and time that an item was created. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + dateTimeModifed: Date; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The end property is an {@link Office.Time} object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the convertToLocalClientTime method to convert the end property value to the client's local date and time. + * + * When you use the Time.setAsync method to set the end time, you should use the convertToUtcClientTime method to convert the local time on + * the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + end: Time; + /** + * Gets the type of item that an instance represents. + * + * The itemType property returns one of the ItemType enumeration values, indicating whether the item object instance is a message or an appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + itemType: Office.MailboxEnums.ItemType; + /** + * Gets or sets the {@link Office.Location} of an appointment. The location property returns a Location object that provides methods that are + * used to get and set the location of the appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + location: Location; + /** + * Gets the notification messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + notificationMessages: Office.NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depends on the mode of the current item. + * The optionalAttendees property returns an {@link Office.Recipients} object that provides methods to get or update the optional attendees + * for a meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + optionalAttendees: Recipients; + /** + * Gets the organizer for the specified meeting. + * + * The organizer property returns an {@link Office.Organizer | Organizer} object that provides a method to get the organizer value. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + organizer: Office.Organizer; + /** + * Gets or sets the recurrence pattern of an appointment. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single + * appointment and NOT a part of a series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + recurrence: Recurrence; + /** + * Provides access to the required attendees of an event. The type of object and level of access depends on the mode of the current item. + * The requiredAttendees property returns an {@link Office.Recipients} object that provides methods to get or update the required attendees + * for a meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + requiredAttendees: Recipients; + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. + * The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + seriesId: string; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The start property is an {@link Office.Time} object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the convertToLocalClientTime method to convert the value to the client's local date and time. + * + * When you use the Time.setAsync method to set the start time, you should use the convertToUtcClientTime method to convert the local time on + * the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + start: Time; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a Subject object that provides methods to get and set the subject. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + subject: Subject; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `addFileAttachmentAsync(uri: string, attachmentName: string): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type asyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addFileAttachmentAsync(uri: string, attachmentName: string): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type asyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentFromBase64Async method uploads the file from the base64 encoding and attaches it to the item in the compose form. This method returns the attachment identifier in the AsyncResult.value object. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param base64File The base64 encoded content of an image or file to be added to an email or event. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type asyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + * + * @beta + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * In addition to this signature, the method also has the following signature: + * + * `addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void; + /** + * Closes the current item that is being composed + * + * The behaviors of the close method depends on the current state of the item being composed. + * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. + * + * In the Outlook desktop client, if the message is an inline reply, the close method has no effect. + * + * Note: In Outlook on the web, if the item is an appointment and it has previously been saved using saveAsync, the user is prompted to save, + * discard, or cancel even if no changes have occurred since the item was last saved. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ */ + close(): void; + /** + * Gets initialization data passed when the add-in is activated by an actionable message. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * More information on {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | actionable messages}. + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. + * To access the source property that the selection comes from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string , removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. + * To access the source property that the selection comes from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string , removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key/value pairs on a per-app, per-item basis. + * This method returns a CustomProperties object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties are not encrypted on the item, so this should not be used as secure storage. + * + * The custom properties are provided as a CustomProperties object in the asyncResult.value property. + * This object can be used to get, set, and remove custom properties from the item and save changes to the custom property set back to + * the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param userContext Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the asyncResult.asyncContext property in the callback function. + */ + loadCustomPropertiesAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `removeAttachmentAsync(attachmentIndex: string): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void;` + * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + */ + removeAttachmentAsync(attachmentIndex: string): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. + * In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * In addition to this signature, the method also has the following signature: + * + * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `saveAsync(): void;` + * + * `saveAsync(options: Office.AsyncContextOptions): void;` + * + * `saveAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + */ + saveAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + */ + saveAsync(): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + saveAsync(options: Office.AsyncContextOptions): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + */ + saveAsync(callback: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `setSelectedDataAsync(data: string): void;` + * + * `setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the + * default style is applied in Outlook. + * If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + */ + setSelectedDataAsync(data: string): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the + * default style is applied in Outlook. If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + */ + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; + } + + /** + * The appointment attendee mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of 'Office.context.mailbox.item'. Refer to the Object Model pages for more information. + */ + interface AppointmentRead extends Appointment, ItemRead { + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * Note: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. For more information, see + * {@link https://support.office.com/article/Blocked-attachments-in-Outlook-434752E1-02D3-4E90-9124-8B81E49A8519 | Blocked attachments in Outlook}. + * + */ + attachments: Office.AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + body: Office.Body; + /** + * Gets the date and time that an item was created. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + dateTimeModifed: Date; + /** + * Gets the date and time that the appointment is to end. + * + * The end property is a Date object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the convertToLocalClientTime method to convert the end property value to the client's local date and time. + * + * When you use the Time.setAsync method to set the end time, you should use the convertToUtcClientTime method to convert the local time on + * the client to UTC for the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + end: Date; + /** + * Gets the Exchange Web Services item class of the selected item. + * + * + * You can create custom message classes that extends a default message class, for example, a custom appointment message class IPM.Appointment.Contoso. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * The itemClass property specifies the message class of the selected item. The following are the default message classes for the message or appointment item. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
TypeDescriptionItem Class
Appointment itemsThese are calendar items of the item class IPM.Appointment or IPM.Appointment.Occurence.IPM.Appointment,IPM.Appointment.Occurence
Message itemsThese include email messages that have the default message class IPM.Note, and meeting requests, responses, and cancellations, that use IPM.Schedule.Meeting as the base message class.IPM.Note,IPM.Schedule.Meeting.Request,IPM.Schedule.Meeting.Neg,IPM.Schedule.Meeting.Pos,IPM.Schedule.Meeting.Tent,IPM.Schedule.Meeting.Canceled
+ * + */ + itemClass: string; + /** + * Gets the Exchange Web Services item identifier for the current item. + * + * The itemId property is not available in compose mode. + * If an item identifier is required, the saveAsync method can be used to save the item to the store, which will return the item identifier + * in the AsyncResult.value parameter in the callback function. + * + * Note: The identifier returned by the itemId property is the same as the Exchange Web Services item identifier. + * The itemId property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The itemType property returns one of the ItemType enumeration values, indicating whether the item object instance is a message or an appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + itemType: Office.MailboxEnums.ItemType; + /** + * Gets the location of an appointment. + * + * The location property returns a string that contains the location of the appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + location: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The normalizedSubject property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by email programs. + * To get the subject of the item with the prefixes intact, use the subject property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + notificationMessages: Office.NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depends on the mode of the current item. + * + * The optionalAttendees property returns an array that contains an {@link Office.EmailAddressDetails} object for each optional attendee to + * the meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + optionalAttendees: EmailAddressDetails[]; + /** + * Gets the email address of the meeting organizer for a specified meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + organizer: EmailAddressDetails; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single + * appointment and NOT a part of a series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + recurrence: Recurrence; + /** + * Provides access to the required attendees of an event. The type of object and level of access depends on the mode of the current item. + * + * The requiredAttendees property returns an array that contains an {@link Office.EmailAddressDetails} object for each required attendee to + * the meeting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + requiredAttendees: EmailAddressDetails[]; + /** + * Gets the date and time that the appointment is to begin. + * + * The start property is a Date object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the convertToLocalClientTime method to convert the value to the client's local date and time. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + start: Date; + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. + * The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it + * should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + seriesId: string; + /** + * Gets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + subject: string; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * In addition to this signature, the method also has the following signature: + * + * `addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Displays a reply form that includes the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyAllForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(formData: string | ReplyFormData): void; + /** + * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * In addition to this signature, the method also has the following signature: + * + * `getInitializationContextAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(callback?: (result: AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @param entityType One of the EntityType enumeration values. + * + * @returns + * If the value passed in entityType is not a valid member of the EntityType enumeration, the method returns null. + * If no entities of the specified type are present in the item's body, the method returns an empty array. + * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the entityType parameter. + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * While the minimum permission level to use this method is Restricted, some entity types require ReadItem to access, as specified in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Leve
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: Office.MailboxEnums.EntityType): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in the manifest XML file. + * + * The getFilteredEntitiesByName method returns the entities that match the regular expression defined in the ItemHasKnownEntity rule element + * in the manifest XML file with the specified FilterName element value. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param name The name of the ItemHasKnownEntity rule element that defines the filter to match. + * @returns If there is no ItemHasKnownEntity element in the manifest with a FilterName element value that matches the name parameter, + * the method returns null. + * If the name parameter does match an ItemHasKnownEntity element in the manifest, but there are no entities in the current item that match, + * the method return an empty array. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns string values in the selected item that match the regular expressions defined in the manifest XML file. + * + * The getRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. + * For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. + * The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule + * or the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in the manifest XML file. + * + * The getRegExMatchesByName method returns the strings that match the regular expression defined in the ItemHasRegularExpressionMatch rule + * element in the manifest XML file with the specified RegExName element value. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An array that contains the strings that match the regular expression defined in the manifest XML file. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getSelectedEntities(): Entities; + /** + * Returns string values in a highlighted match that match the regular expressions defined in the manifest XML file. + * Highlighted matches apply to contextual add-ins. + * + * The getSelectedRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. + * For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. + * The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule + * or the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ */ + getSelectedRegExMatches(): any; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key/value pairs on a per-app, per-item basis. + * This method returns a CustomProperties object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties are not encrypted on the item, so this should not be used as secure storage. + * + * The custom properties are provided as a CustomProperties object in the asyncResult.value property. + * This object can be used to get, set, and remove custom properties from the item and save changes to the custom property set back to + * the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param userContext Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the asyncResult.asyncContext property in the callback function. + */ + loadCustomPropertiesAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * In addition to this signature, the method also has the following signature: + * + * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + } + + /** + * The item namespace is used to access the currently selected message, meeting request, or appointment. + * You can determine the type of the item by using the `itemType` property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface Item { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + body: Office.Body; + /** + * Gets the date and time that an item was created. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + dateTimeModifed: Date; + /** + * Gets the type of item that an instance represents. + * + * The itemType property returns one of the ItemType enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + itemType: Office.MailboxEnums.ItemType; + /** + * Gets the notification messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + notificationMessages: Office.NotificationMessages; + + /** + * Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that are not meeting requests. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and NOT a part of a series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + recurrence: Office.Recurrence; + + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. + * The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + seriesId: string; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, the method also has the following signature: + * + * `addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType: Office.EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + + /** + * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee
+ * + * In addition to this signature, the method also has the following signature: + * + * `getInitializationContextAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + + /** + * Gets the properties of an appointment or message in a shared folder, calendar, or mailbox. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The `value` property of the result is the properties of the shared item. + * + * @beta + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Gets the properties of an appointment or message in a shared folder, calendar, or mailbox. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The `value` property of the result is the properties of the shared item. + * + * @beta + */ + getSharedPropertiesAsync(callback: (result: AsyncResult) => void): void; + + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key/value pairs on a per-app, per-item basis. + * This method returns a CustomProperties object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties are not encrypted on the item, so this should not be used as secure storage. + * + * The custom properties are provided as a CustomProperties object in the asyncResult.value property. + * This object can be used to get, set, and remove custom properties from the item and save changes to the custom property set back to + * the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param userContext Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the asyncResult.asyncContext property in the callback function. + */ + loadCustomPropertiesAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, the method also has the following signature: + * + * `removeHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType: Office.EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + } + /** + * The compose mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. Refer to the Object Model pages for more information. + */ + interface ItemCompose extends Item { + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a Subject object that provides methods to get and set the subject. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + subject: Subject; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `addFileAttachmentAsync(uri: string, attachmentName: string): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the + * attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type asyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addFileAttachmentAsync(uri: string, attachmentName: string): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the + * attachment list. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void; + + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentFromBase64Async method uploads the file from the base64 encoding and attaches it to the item in the compose form. This method returns the attachment identifier in the AsyncResult.value object. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param base64File The base64 encoded content of an image or file to be added to an email or event. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type asyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + * + * @beta + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void; + + /** + * Closes the current item that is being composed + * + * The behaviors of the close method depends on the current state of the item being composed. + * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. + * + * In the Outlook desktop client, if the message is an inline reply, the close method has no effect. + * + * Note: In Outlook on the web, if the item is an appointment and it has previously been saved using saveAsync, the user is prompted to save, + * discard, or cancel even if no changes have occurred since the item was last saved. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + close(): void; + /** + * Gets initialization data passed when the add-in is activated by an actionable message. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * More information on {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | actionable messages}. + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. To access the source property that the selection comes + * from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string , removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. + * To access the source property that the selection comes from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string, removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `removeAttachmentAsync(attachmentIndex: string): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void;` + * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + */ + removeAttachmentAsync(attachmentIndex: string): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type {@link Offfice.AsyncResult}. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void; + + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `saveAsync(): void;` + * + * `saveAsync(options: Office.AsyncContextOptions): void;` + * + * `saveAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + saveAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + */ + saveAsync(): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + saveAsync(options: Office.AsyncContextOptions): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + saveAsync(callback: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `setSelectedDataAsync(data: string): void;` + * + * `setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the default style is + * applied in Outlook. + * If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + */ + setSelectedDataAsync(data: string): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the default style is + * applied in Outlook. + * If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + */ + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; + } + /** + * The read mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. Refer to the Object Model pages for more information. + */ + interface ItemRead extends Item { + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * Note: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. + * For more information, see + * {@link https://support.office.com/article/Blocked-attachments-in-Outlook-434752E1-02D3-4E90-9124-8B81E49A8519 | Blocked attachments in Outlook}. + * + */ + attachments: Office.AttachmentDetails[]; + /** + * Gets the Exchange Web Services item class of the selected item. + * + * + * You can create custom message classes that extends a default message class, for example, a custom appointment message class + * IPM.Appointment.Contoso. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * The itemClass property specifies the message class of the selected item. The following are the default message classes for the message or + * appointment item. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
TypeDescriptionItem Class
Appointment itemsThese are calendar items of the item class IPM.Appointment or IPM.Appointment.Occurence.IPM.Appointment,IPM.Appointment.Occurence
Message itemsThese include email messages that have the default message class IPM.Note, and meeting requests, responses, and cancellations, that use IPM.Schedule.Meeting as the base message class.IPM.Note,IPM.Schedule.Meeting.Request,IPM.Schedule.Meeting.Neg,IPM.Schedule.Meeting.Pos,IPM.Schedule.Meeting.Tent,IPM.Schedule.Meeting.Canceled
+ */ + itemClass: string; + /** + * Gets the Exchange Web Services item identifier for the current item. + * + * The itemId property is not available in compose mode. + * If an item identifier is required, the saveAsync method can be used to save the item to the store, which will return the item identifier + * in the AsyncResult.value parameter in the callback function. + * + * Note: The identifier returned by the itemId property is the same as the Exchange Web Services item identifier. + * The itemId property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + itemId: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The normalizedSubject property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by + * email programs. To get the subject of the item with the prefixes intact, use the subject property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + normalizedSubject: string; + /** + * Gets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + subject: string; + /** + * Displays a reply form that includes the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyAllForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(formData: string | ReplyFormData): void; + /** + * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * In addition to this signature, the method also has the following signature: + * + * `getInitializationContextAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(callback?: (result: AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @param entityType One of the EntityType enumeration values. + * + * @returns + * If the value passed in entityType is not a valid member of the EntityType enumeration, the method returns null. + * If no entities of the specified type are present in the item's body, the method returns an empty array. + * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the entityType parameter. + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * While the minimum permission level to use this method is Restricted, some entity types require ReadItem to access, as specified in the + * following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Leve
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: Office.MailboxEnums.EntityType): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in the manifest XML file. + * + * The getFilteredEntitiesByName method returns the entities that match the regular expression defined in the ItemHasKnownEntity rule element + * in the manifest XML file with the specified FilterName element value. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param name The name of the ItemHasKnownEntity rule element that defines the filter to match. + * @returns If there is no ItemHasKnownEntity element in the manifest with a FilterName element value that matches the name parameter, + * the method returns null. + * If the name parameter does match an ItemHasKnownEntity element in the manifest, but there are no entities in the current item that match, + * the method return an empty array. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns string values in the selected item that match the regular expressions defined in the manifest XML file. + * + * The getRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. + * For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. + * The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule + * or the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in the manifest XML file. + * + * The getRegExMatchesByName method returns the strings that match the regular expression defined in the ItemHasRegularExpressionMatch rule + * element in the manifest XML file with the specified RegExName element value. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An array that contains the strings that match the regular expression defined in the manifest XML file. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getSelectedEntities(): Entities; + /** + * Returns string values in a highlighted match that match the regular expressions defined in the manifest XML file. + * Highlighted matches apply to contextual add-ins. + * + * The getSelectedRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule + * or the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + getSelectedRegExMatches(): any; + } + /** + * A subclass of {@link Office.Item} for messages. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. Refer to the Object Model pages for more information. + */ + interface Message extends Item { + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will + * change and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * If the user sets a subject and saves the item, the conversationId property will return a value. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + conversationId: string; + } + + /** + * The message compose mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. Refer to the Object Model pages for more information. + */ + interface MessageCompose extends Message, ItemCompose { + /** + * Gets an object that provides methods to get or update the recipients on the Bcc (blind carbon copy) line of a message. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + bcc: Recipients; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + body: Office.Body; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the + * current item. + * + * The cc property returns a {@link Office.Recipients} object that provides methods to get or update the recipients on the Cc line of + * the message. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + cc: Recipients; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * If the user sets a subject and saves the item, the conversationId property will return a value. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + conversationId: string; + /** + * Gets the date and time that an item was created. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + dateTimeModifed: Date; + /** + * Gets the email address of the sender of a message. + * + * The from and sender properties represent the same person unless the message is sent by a delegate. + * In that case, the from property represents the owner, and the sender property represents the delegate. + * + * The from property returns a From object that provides a method to get the from value. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + from: Office.From; + /** + * Gets the type of item that an instance represents. + * + * The itemType property returns one of the ItemType enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + itemType: Office.MailboxEnums.ItemType; + /** + * Gets the notification messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + notificationMessages: Office.NotificationMessages; + /** + * Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that are not meeting requests. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and NOT a part of a series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + recurrence: Recurrence; + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. + * The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + seriesId: string; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a Subject object that provides methods to get and set the subject. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + subject: Subject; + /** + * Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the + * current item. + * + * The to property returns a Recipients object that provides methods to get or update the recipients on the To line of the message. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + to: Recipients; + + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `addFileAttachmentAsync(uri: string, attachmentName: string): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, options: AsyncContextOptions): void;` + * + * `addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the + * attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addFileAttachmentAsync(uri: string, attachmentName: string): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: AsyncContextOptions): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentAsync method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param uri The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The addFileAttachmentFromBase64Async method uploads the file from the base64 encoding and attaches it to the item in the compose form. This method returns the attachment identifier in the AsyncResult.value object. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
ErrorsAttachmentSizeExceeded - The attachment is larger than allowed.
FileTypeNotSupported - The attachment has an extension that is not allowed.
NumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param base64File The base64 encoded content of an image or file to be added to an email or event. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * isInline: If true, indicates that the attachment will be shown inline in the message body and should not be displayed in the attachment list. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type asyncResult. + * On success, the attachment identifier will be provided in the asyncResult.value property. + * If uploading the attachment fails, the asyncResult object will contain an Error object that provides a description of the error. + * + * @beta + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * In addition to this signature, the method also has the following signature: + * + * `addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void;` + * + * `addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void;` + * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The addItemAttachmentAsync method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback method, the method is called with one parameter, asyncResult, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the options parameter to pass state information to the callback method, if needed. + * + * You can subsequently use the identifier with the removeAttachmentAsync method to remove the attachment in the same session. + * + * If your Office add-in is running in Outlook Web App, the addItemAttachmentAsync method can attach items to items other than the item that + * you are editing; however, this is not supported and is not recommended. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsNumberOfAttachmentsExceeded - The message or appointment has too many attachments.
+ * + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the asyncResult.value property. + * If adding the attachment fails, the asyncResult object will contain an Error object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void; + /** + * Closes the current item that is being composed + * + * The behaviors of the close method depends on the current state of the item being composed. + * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. + * + * In the Outlook desktop client, if the message is an inline reply, the close method has no effect. + * + * Note: In Outlook on the web, if the item is an appointment and it has previously been saved using saveAsync, the user is prompted to save, + * discard, or cancel even if no changes have occurred since the item was last saved. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ */ + close(): void; + /** + * Gets initialization data passed when the add-in is activated by an actionable message. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * More information on {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | actionable messages}. + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. + * To access the source property that the selection comes from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string, removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns null for the selected data. + * If a field other than the body or subject is selected, the method returns the InvalidSelection error. + * + * To access the selected data from the callback method, call asyncResult.value.data. + * To access the source property that the selection comes from, call asyncResult.value.sourceProperty, which will be either body or subject. + * + * [Api set: Mailbox 1.2] + * + * @returns + * The selected data as a string with format determined by coercionType. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @param coercionType Requests a format for the data. If Text, the method returns the plain text as a string, removing any HTML tags present. + * If HTML, the method returns the selected text, whether it is plaintext or HTML. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + getSelectedDataAsync(coerciontype: Office.CoercionType, options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key/value pairs on a per-app, per-item basis. + * This method returns a CustomProperties object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties are not encrypted on the item, so this should not be used as secure storage. + * + * The custom properties are provided as a CustomProperties object in the asyncResult.value property. + * This object can be used to get, set, and remove custom properties from the item and save changes to the custom property set back to + * the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param userContext Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the asyncResult.asyncContext property in the callback function. + */ + loadCustomPropertiesAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `removeAttachmentAsync(attachmentIndex: string): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void;` + * + * `removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void;` + * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + */ + removeAttachmentAsync(attachmentIndex: string): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + removeAttachmentAsync(attachmentIndex: string, options: Office.AsyncContextOptions): void; + /** + * Removes an attachment from a message or appointment. + * + * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form + * to continue in a separate window. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentIndex The identifier of the attachment to remove. The maximum length of the string is 100 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If removing the attachment fails, the asyncResult.error property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * In addition to this signature, the method also has the following signature: + * + * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `saveAsync(): void;` + * + * `saveAsync(options: Office.AsyncContextOptions): void;` + * + * `saveAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + saveAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + */ + saveAsync(): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + saveAsync(options: Office.AsyncContextOptions): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. + * In Outlook Web App or Outlook in online mode, the item is saved to the server. + * In Outlook in cached mode, the item is saved to the local cache. + * + * Since appointments have no draft state, if saveAsync is called on an appointment in compose mode, the item will be saved as a normal + * appointment on the user's calendar. For new appointments that have not been saved before, no invitation will be sent. + * Saving an existing appointment will send an update to added or removed attendees. + * + * Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the itemId will return an error. + * + * Note: The following clients have different behavior for saveAsync on appointments in compose mode: + * + * - Mac Outlook does not support saveAsync on a meeting in compose mode. Calling saveAsync on a meeting in Mac Outlook will return an error. + * + * - Outlook on the web always sends an invitation or update when saveAsync is called on an appointment in compose mode. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + saveAsync(callback: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `setSelectedDataAsync(data: string): void;` + * + * `setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void;` + * + * `setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void;` + * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the default style is + * applied in Outlook. If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + setSelectedDataAsync(data: string, options?: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + */ + setSelectedDataAsync(data: string): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * coercionType: If text, the current style is applied in Outlook Web App and Outlook. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If html and the field supports HTML (the subject doesn't), the current style is applied in Outlook Web App and the default style is + * applied in Outlook. If the field is a text field, an InvalidDataFormat error is returned. + * If coercionType is not set, the result depends on the field: if the field is HTML then HTML is used; + * if the field is text, then plain text is used. + */ + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The setSelectedDataAsync method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * [Api set: Mailbox 1.2] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param data The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an ArgumentOutOfRange exception is thrown. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * typeOffice.AsyncResult. + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; + } + /** + * The message read mode of {@link Office.Item | Office.context.mailbox.item}. + * + * Important: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information. + */ + interface MessageRead extends Message, ItemRead { + /** + * Gets an array of attachments for the item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * Note: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. + * For more information, see + * {@link https://support.office.com/article/Blocked-attachments-in-Outlook-434752E1-02D3-4E90-9124-8B81E49A8519 | Blocked attachments in Outlook}. + * + */ + attachments: Office.AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + body: Office.Body; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the + * current item. + * + * The cc property returns an array that contains an EmailAddressDetails object for each recipient listed on the Cc line of the message. + * The collection is limited to a maximum of 100 members. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + cc: EmailAddressDetails[]; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * If the user sets a subject and saves the item, the conversationId property will return a value. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + conversationId: string; + /** + * Gets the date and time that an item was created. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + dateTimeModifed: Date; + /** + * Gets the email address of the sender of a message. + * + * The from and sender properties represent the same person unless the message is sent by a delegate. + * In that case, the from property represents the delegator, and the sender property represents the delegate. + * + * Note: The recipientType property of the EmailAddressDetails object in the from property is undefined. + * + * The from property returns an EmailAddressDetails object. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + from: EmailAddressDetails; + /** + * Gets the Internet message identifier for an email message. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + internetMessageId: string; + /** + * Gets the Exchange Web Services item class of the selected item. + * + * You can create custom message classes that extends a default message class, for example, a custom appointment message class + * IPM.Appointment.Contoso. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ + * The itemClass property specifies the message class of the selected item. + * The following are the default message classes for the message or appointment item. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
TypeDescriptionItem Class
Appointment itemsThese are calendar items of the item class IPM.Appointment or IPM.Appointment.Occurence.IPM.Appointment,IPM.Appointment.Occurence
Message itemsThese include email messages that have the default message class IPM.Note, and meeting requests, responses, and cancellations, that use IPM.Schedule.Meeting as the base message class.IPM.Note,IPM.Schedule.Meeting.Request,IPM.Schedule.Meeting.Neg,IPM.Schedule.Meeting.Pos,IPM.Schedule.Meeting.Tent,IPM.Schedule.Meeting.Canceled
+ * + */ + itemClass: string; + /** + * Gets the Exchange Web Services item identifier for the current item. + * + * The itemId property is not available in compose mode. + * If an item identifier is required, the saveAsync method can be used to save the item to the store, which will return the item identifier + * in the AsyncResult.value parameter in the callback function. + * + * Note: The identifier returned by the itemId property is the same as the Exchange Web Services item identifier. + * The itemId property is not identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api#get-the-item-id | Use the Outlook REST APIs from an Outlook add-in}. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The itemType property returns one of the ItemType enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + itemType: Office.MailboxEnums.ItemType; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The normalizedSubject property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by + * email programs. + * To get the subject of the item with the prefixes intact, use the subject property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + notificationMessages: Office.NotificationMessages; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that are not meeting requests. + * + * Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request. + * + * Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and NOT a part of a series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + recurrence: Recurrence; + /** + * Gets the id of the series that an instance belongs to. + * + * In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in iOS and Android, the seriesId returns the REST ID of the parent item. + * + * Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. + * The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. + * For more details, see {@link https://docs.microsoft.com/outlook/add-ins/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns undefined for any other items that are not meeting requests. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + seriesId: string; + /** + * Gets the email address of the sender of an email message. + * + * The from and sender properties represent the same person unless the message is sent by a delegate. + * In that case, the from property represents the delegator, and the sender property represents the delegate. + * + * Note: The recipientType property of the EmailAddressDetails object in the sender property is undefined. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + sender: EmailAddressDetails; + /** + * Gets the description that appears in the subject field of an item. + * + * The subject property gets or sets the entire subject of the item, as sent by the email server. + * + * The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + subject: string; + /** + * Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the + * current item. + * + * The to property returns an array that contains an EmailAddressDetails object for each recipient listed on the To line of the message. + * The collection is limited to a maximum of 100 members. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + to: EmailAddressDetails[]; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * In addition to this signature, the method also has the following signature: + * + * `addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + + /** + * Adds an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + addHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + /** + * Displays a reply form that includes the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyAllForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view. + * + * If any of the string parameters exceed their limits, displayReplyForm throws an exception. + * + * When attachments are specified in the formData.attachments parameter, Outlook and Outlook Web App attempt to download all attachments and + * attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. + * If this isn't possible, then no error message is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + * OR + * An {@link Office.ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(formData: string | ReplyFormData): void; + /** + * Gets initialization data passed when the add-in is + * {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the web + * for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * In addition to this signature, the method also has the following signature: + * + * `getInitializationContextAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is + * {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. + * + * Note: This method is only supported by Outlook 2016 for Windows (Click-to-Run versions greater than 16.0.8413.1000) and Outlook on the + * web for Office 365. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * On success, the initialization data is provided in the asyncResult.value property as a string. + * If there is no initialization context, the asyncResult object will contain an Error object with its code property + * set to 9020 and its name property set to GenericResponseError. + * + * @beta + */ + getInitializationContextAsync(callback?: (result: AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @param entityType One of the EntityType enumeration values. + * + * @returns + * If the value passed in entityType is not a valid member of the EntityType enumeration, the method returns null. + * If no entities of the specified type are present in the item's body, the method returns an empty array. + * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the entityType parameter. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * While the minimum permission level to use this method is Restricted, some entity types require ReadItem to access, as specified in the + * following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Value of entityTypeType of objects in returned arrayRequired Permission Leve
AddressStringRestricted
ContactContactReadItem
EmailAddressStringReadItem
MeetingSuggestionMeetingSuggestionReadItem
PhoneNumberPhoneNumberRestricted
TaskSuggestionTaskSuggestionReadItem
URLStringRestricted
+ */ + getEntitiesByType(entityType: Office.MailboxEnums.EntityType): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns well-known entities in the selected item that pass the named filter defined in the manifest XML file. + * + * The getFilteredEntitiesByName method returns the entities that match the regular expression defined in the ItemHasKnownEntity rule element + * in the manifest XML file with the specified FilterName element value. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param name The name of the ItemHasKnownEntity rule element that defines the filter to match. + * @returns If there is no ItemHasKnownEntity element in the manifest with a FilterName element value that matches the name parameter, + * the method returns null. + * If the name parameter does match an ItemHasKnownEntity element in the manifest, but there are no entities in the current item that match, + * the method return an empty array. + */ + getFilteredEntitiesByName(name: string): (string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion)[]; + /** + * Returns string values in the selected item that match the regular expressions defined in the manifest XML file. + * + * The getRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. + * For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. + * The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule + * or the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in the manifest XML file. + * + * The getRegExMatchesByName method returns the strings that match the regular expression defined in the ItemHasRegularExpressionMatch rule + * element in the manifest XML file with the specified RegExName element value. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @returns + * An array that contains the strings that match the regular expression defined in the manifest XML file. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param name The name of the ItemHasRegularExpressionMatch rule element that defines the filter to match. + */ + getSelectedEntities(): Entities; + /** + * Returns string values in a highlighted match that match the regular expressions defined in the manifest XML file. + * Highlighted matches apply to contextual add-ins. + * + * The getSelectedRegExMatches method returns the strings that match the regular expression defined in each ItemHasRegularExpressionMatch or + * ItemHasKnownEntity rule element in the manifest XML file. + * For an ItemHasRegularExpressionMatch rule, a matching string has to occur in the property of the item that is specified by that rule. + * The PropertyName simple type defines the supported properties. + * + * If you specify an ItemHasRegularExpressionMatch rule on the body property of an item, the regular expression should further filter the body + * and should not attempt to return the entire body of the item. + * Using a regular expression such as .* to obtain the entire body of an item does not always return the expected results. + * Instead, use the Body.getAsync method to retrieve the entire body. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.6] + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching ItemHasRegularExpressionMatch rule or + * the FilterName attribute of the matching ItemHasKnownEntity rule. + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ */ + getSelectedRegExMatches(): any; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key/value pairs on a per-app, per-item basis. + * This method returns a CustomProperties object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties are not encrypted on the item, so this should not be used as secure storage. + * + * The custom properties are provided as a CustomProperties object in the asyncResult.value property. + * This object can be used to get, set, and remove custom properties from the item and save changes to the custom property set back to + * the server. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * @param userContext Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the asyncResult.asyncContext property in the callback function. + */ + loadCustomPropertiesAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * In addition to this signature, the method also has the following signature: + * + * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` + * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + /** + * Removes an event handler for a supported event. + * + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void; + } + + /** + * Represents a date and time in the local client's time zone. Read mode only. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface LocalClientTime { + /** + * Integer value representing the month, beginning with 0 for January to 11 for December. + */ + month: number; + /** + * Integer value representing the day of the month. + */ + date: number; + /** + * Integer value repesenting the year. + */ + year: number; + /** + * Integer value representing the hour on a 24-hour clock. + */ + hours: number; + /** + * Integer value representing the minutes. + */ + minutes: number; + /** + * Integer value representing the seconds. + */ + seconds: number; + /** + * Integer value representing the milliseconds. + */ + milliseconds: number; + /** + * Integer value representing the number of minutes difference between the local time zone and UTC. + */ + timezoneOffset: number; + } + /** + * Provides methods to get and set the location of a meeting in an Outlook add-in. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + interface Location { + /** + * Gets the location of an appointment. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the location of an appointment. + * The location of the appointment is provided as a string in the asyncResult.value property. + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, the method also has the following signature: + * + * `getAsync(callback: (result: AsyncResult) => void): void;` + * + */ + getAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Gets the location of an appointment. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the location of an appointment. + * The location of the appointment is provided as a string in the asyncResult.value property. + * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Sets the location of an appointment. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @param location The location of the appointment. The string is limited to 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If setting the location fails, the asyncResult.error property will contain an error code. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The location parameter is longer than 255 characters.
+ * + * In addition to this signature, the method also has the following signatures: + * + * `setAsync(location: string): void;` + * + * `setAsync(location: string, options: Office.AsyncContextOptions): void;` + * + * `setAsync(location: string, callback: (result: AsyncResult) => void): void;` + */ + setAsync(location: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the location of an appointment. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @param location The location of the appointment. The string is limited to 255 characters. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The location parameter is longer than 255 characters.
+ */ + setAsync(location: string): void; + /** + * Sets the location of an appointment. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @param location The location of the appointment. The string is limited to 255 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The location parameter is longer than 255 characters.
+ */ + setAsync(location: string, options: Office.AsyncContextOptions): void; + /** + * Sets the location of an appointment. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @param location The location of the appointment. The string is limited to 255 characters. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If setting the location fails, the asyncResult.error property will contain an error code. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The location parameter is longer than 255 characters.
+ */ + setAsync(location: string, callback: (result: AsyncResult) => void): void; + } + /** + * Provides access to the Outlook Add-in object model for Microsoft Outlook and Microsoft Outlook on the web. + * + * Namespaces: + * + * - diagnostics: Provides diagnostic information to an Outlook add-in. + * + * - item: Provides methods and properties for accessing a message or appointment in an Outlook add-in. + * + * - userProfile: Provides information about the user in an Outlook add-in. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface Mailbox { + /** + * Provides diagnostic information to an Outlook add-in. + * + * Contains the following members: + * + * - hostName (string): A string that represents the name of the host application. + * It be one of the following values: Outlook, Mac Outlook, OutlookIOS, or OutlookWebApp. + * + * - hostVersion (string): A string that represents the version of either the host application or the Exchange Server. + * If the mail add-in is running on the Outlook desktop client or Outlook for iOS, the hostVersion property returns the version of the + * host application, Outlook. In Outlook Web App, the property returns the version of the Exchange Server. An example is the string 15.0.468.0. + * + * - OWAView (MailboxEnums.OWAView or string): An enum (or string literal) that represents the current view of Outlook Web App. + * If the host application is not Outlook Web App, then accessing this property results in undefined. + * Outlook Web App has three views (OneColumn - displayed when the screen is narrow, TwoColumns - displayed when the screen is wider, + * and ThreeColumns - displayed when the screen is wide) that correspond to the width of the screen and the window, and the number of columns + * that can be displayed. + * + * More information is under {@link Office.Diagnostics}. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + diagnostics: Office.Diagnostics; + /** + * Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. Read mode only. + * + * Your app must have the ReadItem permission specified in its manifest to call the ewsUrl member in read mode. + * + * In compose mode you must call the saveAsync method before you can use the ewsUrl member. + * Your app must have ReadWriteItem permissions to call the saveAsync method. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * The ewsUrl value can be used by a remote service to make EWS calls to the user's mailbox. For example, you can create a remote service to {@link https://docs.microsoft.com/outlook/add-ins/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * Note: This member is not supported in Outlook for iOS or Outlook for Android. + */ + ewsUrl: string; + /** + * The mailbox item. Depending on the context in which the add-in opened, the item may be of any number of types. + * If you want to see IntelliSense for only a specific type, you should cast this item to one of the following: + * `ItemCompose`, `ItemRead`, `MessageCompose`, `MessageRead`, `AppointmentCompose`, `AppointmentRead` + */ + item: Item & ItemCompose & ItemRead & MessageRead & MessageCompose & AppointmentRead & AppointmentCompose; + /** + * Gets the URL of the REST endpoint for this email account. + * + * Your app must have the ReadItem permission specified in its manifest to call the restUrl member in read mode. + * + * In compose mode you must call the saveAsync method before you can use the restUrl member. + * Your app must have ReadWriteItem permissions to call the saveAsync method. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * The restUrl value can be used to make {@link https://docs.microsoft.com/outlook/rest/ | REST API} calls to the user's mailbox. + */ + restUrl: string; + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email adddress, and time zone. + * + * More information is under {@link Office.UserProfile} + */ + userProfile: Office.UserProfile; + /** + * Adds an event handler for a supported event. + * + * Currently, the supported event types are `Office.EventType.ItemChanged` and `Office.EventType.OfficeThemeChanged`. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param eventType The event that should invoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + addHandlerAsync(eventType: Office.EventType, handler: (type: EventType) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Converts an item ID formatted for REST into EWS format. + * + * Item IDs retrieved via a REST API (such as the Outlook Mail API or the Microsoft Graph) use a different format than the format used by + * Exchange Web Services (EWS). The convertToEwsId method converts a REST-formatted ID into the proper format for EWS. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param itemId An item ID formatted for the Outlook REST APIs. + * @param restVersion A value indicating the version of the Outlook REST API used to retrieve the item ID. + */ + convertToEwsId(itemId: string, restVersion: Office.MailboxEnums.RestVersion): string; + /** + * Gets a dictionary containing time information in local client time. + * + * The dates and times used by a mail app for Outlook or Outlook Web App can use different time zones. + * Outlook uses the client computer time zone; Outlook Web App uses the time zone set on the Exchange Admin Center (EAC). + * You should handle date and time values so that the values you display on the user interface are always consistent with the time zone that + * the user expects. + * + * If the mail app is running in Outlook, the convertToLocalClientTime method will return a dictionary object with the values set to the + * client computer time zone. + * If the mail app is running in Outlook Web App, the convertToLocalClientTime method will return a dictionary object with the values set to + * the time zone specified in the EAC. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param timeValue A Date object. + */ + convertToLocalClientTime(timeValue: Date): LocalClientTime; + /** + * Converts an item ID formatted for EWS into REST format. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * Item IDs retrieved via EWS or via the itemId property use a different format than the format used by REST APIs (such as the + * {@link https://docs.microsoft.com/previous-versions/office/office-365-api/api/version-2.0/mail-rest-operations | Outlook Mail API} or the {@link http://graph.microsoft.io/ | Microsoft Graph}. + * The convertToRestId method converts an EWS-formatted ID into the proper format for REST. + * + * @param itemId An item ID formatted for Exchange Web Services (EWS) + * @param restVersion A value indicating the version of the Outlook REST API that the converted ID will be used with. + */ + convertToRestId(itemId: string, restVersion: Office.MailboxEnums.RestVersion): string; + /** + * Gets a Date object from a dictionary containing time information. + * + * The convertToUtcClientTime method converts a dictionary containing a local date and time to a Date object with the correct values for the + * local date and time. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param input The local time value to convert. + * @returns A Date object with the time expressed in UTC. + */ + convertToUtcClientTime(input: LocalClientTime): Date; + /** + * Displays an existing calendar appointment. + * + * The displayAppointmentForm method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook for Mac, you can use this method to display a single appointment that is not part of a recurring series, or the + * master appointment of a recurring series, but you cannot display an instance of the series. + * This is because in Outlook for Mac, you cannot access the properties (including the item ID) of instances of a recurring series. + * + * In Outlook Web App, this method opens the specified form only if the body of the form is less than or equal to 32KB number of characters. + * + * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and + * no error message will be returned. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param itemId The Exchange Web Services (EWS) identifier for an existing calendar appointment. + */ + displayAppointmentForm(itemId: string): void; + /** + * Displays an existing message. + * + * The displayMessageForm method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook Web App, this method opens the specified form only if the body of the form is less than or equal to 32 KB number of characters. + * + * If the specified item identifier does not identify an existing message, no message will be displayed on the client computer, and + * no error message will be returned. + * + * Do not use the displayMessageForm with an itemId that represents an appointment. Use the displayAppointmentForm method to display + * an existing appointment, and displayNewAppointmentForm to display a form to create a new appointment. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param itemId The Exchange Web Services (EWS) identifier for an existing message. + */ + displayMessageForm(itemId: string): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The displayNewAppointmentForm method opens a form that enables the user to create a new appointment or meeting. + * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. + * + * In Outlook Web App and OWA for Devices, this method always displays a form with an attendees field. + * If you do not specify any attendees as input arguments, the method displays a form with a Save button. + * If you have specified attendees, the form would include the attendees and a Send button. + * + * In the Outlook rich client and Outlook RT, if you specify any attendees or resources in the requiredAttendees, optionalAttendees, or + * resources parameter, this method displays a meeting form with a Send button. + * If you don't specify any recipients, this method displays an appointment form with a Save & Close button. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * Note: This method is not supported in Outlook for iOS or Outlook for Android. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param parameters An AppointmentForm describing the new appointment. All properties are optional. + */ + displayNewAppointmentForm(parameters: AppointmentForm): void; + /** + * Displays a form for creating a new message. + * + * The displayNewMessageForm method opens a form that enables the user to create a new message. If parameters are specified, the message form + * fields are automatically populated with the contents of the parameters. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * [Api set: Mailbox 1.6] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ * + * @param parameters A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. + * + * toRecipients: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails} object + * for each of the recipients on the To line. The array is limited to a maximum of 100 entries. + * + * ccRecipients: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails} object + * for each of the recipients on the Cc line. The array is limited to a maximum of 100 entries. + * + * bccRecipients: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails} object + * for each of the recipients on the Bcc line. The array is limited to a maximum of 100 entries. + * + * subject: A string containing the subject of the message. The string is limited to a maximum of 255 characters. + * + * htmlBody: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + * + * attachments: An array of JSON objects that are either file or item attachments. + * + * attachments.type: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. + * + * attachments.name: A string that contains the name of the attachment, up to 255 characters in length. + * + * attachments.url: Only used if type is set to file. The URI of the location for the file. + * + * attachments.isInline: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the + * message body, and should not be displayed in the attachment list. + * + * attachments.itemId: Only used if type is set to item. The EWS item id of the existing e-mail you want to attach to the new message. + * This is a string up to 100 characters. + */ + displayNewMessageForm(parameters: any): void; + /** + * Gets a string that contains a token used to call REST APIs or Exchange Web Services. + * + * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. + * The lifetime of the callback token is 5 minutes. + * + * *REST Tokens* + * + * When a REST token is requested (options.isRest = true), the resulting token will not work to authenticate Exchange Web Services calls. + * The token will be limited in scope to read-only access to the current item and its attachments, unless the add-in has specified the + * ReadWriteMailbox permission in its manifest. + * If the ReadWriteMailbox permission is specified, the resulting token will grant read/write access to mail, calendar, and contacts, + * including the ability to send mail. + * + * The add-in should use the restUrl property to determine the correct URL to use when making REST API calls. + * + * *EWS Tokens* + * + * When an EWS token is requested (options.isRest = false), the resulting token will not work to authenticate REST API calls. + * The token will be limited in scope to accessing the current item. + * + * The add-in should use the ewsUrl property to determine the correct URL to use when making EWS calls. + * + * Note: It is recommended that add-ins use the REST APIs instead of Exchange Web Services whenever possible. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read
+ * + * In addition to this signature, the method has the following signatures: + * + * `getCallbackTokenAsync(callback: (result: AsyncResult) => void): void;` + * + * `getCallbackTokenAsync(callback: (result: AsyncResult) => void, userContext?: any): void;` + * + * @param options An object literal that contains one or more of the following properties. + * isRest: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is false. + * asyncContext: Any state data that is passed to the asynchronous method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. The token is provided as a string in the asyncResult.value property. + */ + getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (result: AsyncResult) => void): void; + /** + * Gets a string that contains a token used to get an attachment or item from an Exchange Server. + * + * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. + * The lifetime of the callback token is 5 minutes. + * + * You can pass the token and an attachment identifier or item identifier to a third-party system. + * The third-party system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) GetAttachment or + * GetItem operation to return an attachment or item. For example, you can create a remote service to get attachments from the selected item. + * + * Your app must have the ReadItem permission specified in its manifest to call the getCallbackTokenAsync method in read mode. + * + * In compose mode you must call the saveAsync method to get an item identifier to pass to the getCallbackTokenAsync method. + * Your app must have ReadWriteItem permissions to call the saveAsync method. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + * The token is provided as a string in the asyncResult.value property. + */ + getCallbackTokenAsync(callback: (result: AsyncResult) => void): void; + /** + * Gets a string that contains a token used to get an attachment or item from an Exchange Server. + * + * The getCallbackTokenAsync method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. + * The lifetime of the callback token is 5 minutes. + * + * You can pass the token and an attachment identifier or item identifier to a third-party system. + * The third-party system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) GetAttachment or + * GetItem operation to return an attachment or item. For example, you can create a remote service to get attachments from the selected item. + * + * Your app must have the ReadItem permission specified in its manifest to call the getCallbackTokenAsync method in read mode. + * + * In compose mode you must call the saveAsync method to get an item identifier to pass to the getCallbackTokenAsync method. + * Your app must have ReadWriteItem permissions to call the saveAsync method. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. The token is provided as a string in the asyncResult.value property. + * @param userContext Optional. Any state data that is passed to the asynchronous method. + */ + getCallbackTokenAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Gets a token identifying the user and the Office Add-in. + * + * The token is provided as a string in the asyncResult.value property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read
+ * + * The getUserIdentityTokenAsync method returns a token that you can use to identify and + * {@link https://docs.microsoft.com/outlook/add-ins/authentication | authenticate the add-in and user with a third-party system}. + * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The token is provided as a string in the asyncResult.value property. + * @param userContext Optional. Any state data that is passed to the asynchronous method.| + */ + getUserIdentityTokenAsync(callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. + * + * In these cases, add-ins should use REST APIs to access the user's mailbox instead. + * + * The makeEwsRequestAsync method sends an EWS request on behalf of the add-in to Exchange. + * + * You cannot request Folder Associated Items with the makeEwsRequestAsync method. + * + * The XML request must specify UTF-8 encoding. \ + * + * Your add-in must have the ReadWriteMailbox permission to use the makeEwsRequestAsync method. + * For information about using the ReadWriteMailbox permission and the EWS operations that you can call with the makeEwsRequestAsync method, + * see {@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Specify permissions for mail add-in access to the user's mailbox}. + * + * The XML result of the EWS call is provided as a string in the asyncResult.value property. + * If the result exceeds 1 MB in size, an error message is returned instead. + * + * Note: This method is not supported in the following scenarios: + * + * - In Outlook for iOS or Outlook for Android. + * + * - When the add-in is loaded in a Gmail mailbox. + * + * Note: The server administrator must set OAuthAuthentication to true on the Client Access Server EWS directory to enable the + * makeEwsRequestAsync method to make EWS requests. + * + * *Version differences* + * + * When you use the makeEwsRequestAsync method in mail apps running in Outlook versions earlier than version 15.0.4535.1004, you should set + * the encoding value to ISO-8859-1. + * + * `` + * + * You do not need to set the encoding value when your mail app is running in Outlook on the web. + * You can determine whether your mail app is running in Outlook or Outlook on the web by using the mailbox.diagnostics.hostName property. + * You can determine what version of Outlook is running by using the mailbox.diagnostics.hostVersion property. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteMailbox
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read
+ * + * @param data The EWS request. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * The `value` property of the result is the XML of the EWS request provided as a string. + * If the result exceeds 1 MB in size, an error message is returned instead. + * @param userContext Optional. Any state data that is passed to the asynchronous method. + */ + makeEwsRequestAsync(data: any, callback: (result: AsyncResult) => void, userContext?: any): void; + } + + /** + * Represents a suggested meeting found in an item. Read mode only. + * + * The list of meetings suggested in an email message is returned in the meetingSuggestions property of the Entities object that is returned when + * the getEntities or getEntitiesByType method is called on the active item. + * + * The start and end values are string representations of a Date object that contains the date and time at which the suggested meeting is to + * begin and end. + * The values are in the default time zone specified for the current user. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface MeetingSuggestion { + /** + * Gets the attendees for a suggested meeting. + */ + attendees: EmailUser[]; + /** + * Gets the date and time that a suggested meeting is to end. + */ + end: string; + /** + * Gets the location of a suggested meeting. + */ + location: string; + /** + * Gets a string that was identified as a meeting suggestion. + */ + meetingstring: string; + /** + * Gets the date and time that a suggested meeting is to begin. + */ + start: string; + /** + * Gets the subject of a suggested meeting. + */ + subject: string; + } + /** + * An array of NotificationMessageDetails objects are returned by the NotificationMessages.getAllAsync method. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface NotificationMessageDetails { + /** + * The identifier for the notification message. + */ + key?: string; + /** + * Specifies the ItemNotificationMessageType of message. If type is ProgressIndicator or ErrorMessage, an icon is automatically supplied and + * the message is not persistent. Therefore the icon and persistent properties are not valid for these types of messages. + * Including them will result in an ArgumentException. + * If type is ProgressIndicator, the developer should remove or replace the progress indicator when the action is complete. + */ + type: Office.MailboxEnums.ItemNotificationMessageType; + /** + * A reference to an icon that is defined in the manifest in the Resources section. It appears in the infobar area. + * It is only applicable if the type is InformationalMessage. Specifying this parameter for an unsupported type results in an exception. + */ + icon?: string; + /** + * The text of the notification message. Maximum length is 150 characters. + * If the developer passes in a longer string, an ArgumentOutOfRange exception is thrown. + */ + message: string; + /** + * Only applicable when type is InformationalMessage. If true, the message remains until removed by this add-in or dismissed by the user. + * If false, it is removed when the user navigates to a different item. + * For error notifications, the message persists until the user sees it once. + * Specifying this parameter for an unsupported type throws an exception. + */ + persistent?: Boolean; + } + /** + * The NotificationMessages object is returned as the notificationMessages property of an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface NotificationMessages { + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a NumberOfNotificationMessagesExceeded error. + * + * @param key A developer-specified key used to reference this notification message. + * Developers can use it to modify this message later. It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the notification message to be added to the item. + * It contains a NotificationMessageDetails object. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, the method also has the following signatures: + * + * `addAsync(key: string, JSONmessage: NotificationMessageDetails): void;` + * + * `addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions): void;` + * + * `addAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void;` + * + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a NumberOfNotificationMessagesExceeded error. + * + * @param key A developer-specified key used to reference this notification message. Developers can use it to modify this message later. + * It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the notification message to be added to the item. + * It contains a NotificationMessageDetails object. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + addAsync(key: string, JSONmessage: NotificationMessageDetails): void; + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a NumberOfNotificationMessagesExceeded error. + * + * @param key A developer-specified key used to reference this notification message. Developers can use it to modify this message later. + * It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the notification message to be added to the item. + * It contains a NotificationMessageDetails object. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions): void; + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a NumberOfNotificationMessagesExceeded error. + * + * @param key A developer-specified key used to reference this notification message. Developers can use it to modify this message later. + * It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the notification message to be added to the item. + * It contains a NotificationMessageDetails object. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAllAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * The `value` property of the result is an array of NotificationMessageDetails objects. + */ + getAllAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * The `value` property of the result is an array of NotificationMessageDetails objects. + */ + getAllAsync(callback: (result: AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signatures: + * + * `removeAsync(key: string): void;` + * + * `removeAsync(key: string, options: Office.AsyncContextOptions): void;` + * + * `removeAsync(key: string, callback: (result: AsyncResult) => void): void;` + * + * @param key The key for the notification message to remove. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + removeAsync(key: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to remove. + */ + removeAsync(key: string): void; + /** + * Removes a notification message for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to remove. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + removeAsync(key: string, options: Office.AsyncContextOptions): void; + /** + * Removes a notification message for an item. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to remove. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + removeAsync(key: string, callback: (result: AsyncResult) => void): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, replaceAsync will add the notification. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signatures: + * + * `replaceAsync(key: string, JSONmessage: NotificationMessageDetails): void;` + * + * `replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions): void;` + * + * `replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void;` + * + * @param key The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message. + * It contains a NotificationMessageDetails object. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, replaceAsync will add the notification. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message. + * It contains a NotificationMessageDetails object. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, replaceAsync will add the notification. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message. + * It contains a NotificationMessageDetails object. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, replaceAsync will add the notification. + * + * [Api set: Mailbox 1.3] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param key The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message. + * It contains a NotificationMessageDetails object. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void; + } + /** + * Represents a phone number identified in an item. Read mode only. + * + * An array of PhoneNumber objects containing the phone numbers found in an email message is returned in the phoneNumbers property of the + * Entities object that is returned when you call the getEntities method on the selected item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface PhoneNumber { + /** + * Gets a string containing a phone number. This string contains only the digits of the telephone number and excludes characters like parentheses and hyphens, if they exist in the original item. + */ + phoneString: string; + /** + * Gets the text that was identified in an item as a phone number. + */ + originalPhoneString: string; + /** + * Gets a string that identifies the type of phone number: Home, Work, Mobile, Unspecified. + */ + type: string; + } + /** + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + interface Recipients { + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - EmailUser objects + * + * - EmailAddressDetails objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `addAsync(recipients: (string | EmailUser | EmailAddressDetails)[]): void;` + * + * `addAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options: Office.AsyncContextOptions): void;` + * + * `addAsync(recipients: (string | EmailUser | EmailAddressDetails)[], callback: (result: AsyncResult) => void): void;` + * + * @param recipients The recipients to add to the recipients list. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If adding the recipients fails, the asyncResult.error property will contain an error code. + */ + addAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - EmailUser objects + * + * - EmailAddressDetails objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + */ + addAsync(recipients: (string | EmailUser | EmailAddressDetails)[]): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + addAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options: Office.AsyncContextOptions): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If adding the recipients fails, the asyncResult.error property will contain an error code. + */ + addAsync(recipients: (string | EmailUser | EmailAddressDetails)[], callback: (result: AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * When the call completes, the asyncResult.value property will contain an array of {@link Office.EmailAddressDetails} objects. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The `value` property of the result is an array of EmailAddressDetails objects. + */ + getAsync(options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * When the call completes, the asyncResult.value property will contain an array of {@link Office.EmailAddressDetails} objects. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The `value` property of the result is an array of EmailAddressDetails objects. + */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The setAsync method overwrites the current recipient list. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(recipients: (string | EmailUser | EmailAddressDetails)[]): void;` + * + * `setAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options: Office.AsyncContextOptions): void;` + * + * `setAsync(recipients: (string | EmailUser | EmailAddressDetails)[], callback: (result: AsyncResult) => void): void;` + * + * @param recipients The recipients to add to the recipients list. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If setting the recipients fails the asyncResult.error property will contain a code that indicates any error that occurred + * while adding the data. + */ + setAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The setAsync method overwrites the current recipient list. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + */ + setAsync(recipients: (string | EmailUser | EmailAddressDetails)[]): void; + /** + * Sets a recipient list for an appointment or message. + * + * The setAsync method overwrites the current recipient list. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + setAsync(recipients: (string | EmailUser | EmailAddressDetails)[], options: Office.AsyncContextOptions): void; + /** + * Sets a recipient list for an appointment or message. + * + * The setAsync method overwrites the current recipient list. + * + * The recipients parameter can be an array of one of the following: + * + * - Strings containing SMTP email addresses + * + * - {@link Office.EmailUser} objects + * + * - {@link Office.EmailAddressDetails} objects + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsNumberOfRecipientsExceeded - The number of recipients exceeded 100 entries.
+ * + * @param recipients The recipients to add to the recipients list. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If setting the recipients fails the asyncResult.error property will contain a code that indicates any error that occurred + * while adding the data. + */ + setAsync(recipients: (string | EmailUser | EmailAddressDetails)[], callback: (result: AsyncResult) => void): void; + + } + + /** + * The recurrence object provides methods to get and set the recurrence pattern of appointments but only get the recurrence pattern of + * meeting requests. + * It will have a dictionary with the following keys: seriesTime, recurrenceType, recurrenceProperties, and recurrenceTimeZone (optional). + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * **States** + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
StateEditable?Viewable?
Appointment Organizer - Compose SeriesYes (setAsync)Yes (getAsync)
Appointment Organizer - Compose InstanceNo (setAsync returns error)Yes (getAsync)
Appointment Attendee - Read SeriesNo (setAsync not available)Yes (item.recurrence)
Appointment Attendee - Read InstanceNo (setAsync not available)Yes (item.recurrence)
Meeting Request - Read SeriesNo (setAsync not available)Yes (item.recurrence)
Meeting Request - Read InstanceNo (setAsync not available)Yes (item.recurrence)
+ */ + export interface Recurrence { + /** + * Gets or sets the properties of the recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + recurrenceProperties: Office.RecurrenceProperties; + /** + * Gets or sets the properties of the recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + recurrenceTimeZone: Office.RecurrenceTimeZone; + + /** + * Gets or sets the type of the recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + recurrenceType: Office.MailboxEnums.RecurrenceType; + + /** + * The {@link Office.SeriesTime} object enables you to manage the start and end dates of the recurring appointment series and the usual start + * and end times of instances. **This object is not in UTC time.** + * Instead, it is set in the time zone specified by the recurrenceTimeZone value or defaulted to the item's time zone. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + seriesTime: Office.SeriesTime; + + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire recurrence object for the appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(callback?: (result: AsyncResult) => void): void;` + * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * The `value` property of the result is a Recurrence object. + */ + getAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire recurrence object for the appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * The `value` property of the result is a Recurrence object. + */ + getAsync(callback?: (result: AsyncResult) => void): void; + + /** + * Sets the recurrence pattern of an appointment series. + * + * Note: setAsync should only be available for series items and not instance items. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before its start time.
+ * + * In addition to this signature, this method also has the following signature: + * + * `setAsync(recurrencePattern: Recurrence, callback?: (result: AsyncResult) => void): void;` + * + * @param recurrencePattern A recurrence object. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + setAsync(recurrencePattern: Recurrence, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + + /** + * Sets the recurrence pattern of an appointment series. + * + * Note: setAsync should only be available for series items and not instance items. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before its start time.
+ * + * @param recurrencePattern A recurrence object. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + setAsync(recurrencePattern: Recurrence, callback?: (result: AsyncResult) => void): void; + } + + /** + * Represents the properties of the recurrence. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + export interface RecurrenceProperties { + /** + * Represents the period between instances of the same recurring series. + */ + interval: number; + /** + * Represents the day of the month. + */ + dayOfMonth: number; + /** + * Represents the day of the week or type of day, for example, weekend day vs weekday. + */ + dayOfWeek: Office.MailboxEnums.Days; + /** + * Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + days: Office.MailboxEnums.Days[]; + /** + * Represents the number of the week in the selected month e.g. 'first' for first week of the month. + */ + weekNumber: Office.MailboxEnums.WeekNumber; + /** + * Represents the month. + */ + month: Office.MailboxEnums.Month; + /** + * Represents your chosen first day of the week otherwise the default is the value in the current user's settings. + * Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + firstDayOfWeek: Office.MailboxEnums.Days; + } + + /** + * Represents the time zone of the recurrence. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + export interface RecurrenceTimeZone { + /** + * Represents the name of the recurrence time zone. + */ + name: Office.MailboxEnums.RecurrenceTimeZone; + + /** + * Integer value representing the difference in minutes between the local time zone and UTC at the date that the meeting series began. + */ + offset: number; + } + + /** + * A file or item attachment. Used when displaying a reply form. + */ + export interface ReplyFormAttachment { + /** + * Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. + */ + type: string; + /** + * A string that contains the name of the attachment, up to 255 characters in length. + */ + name: string; + /** + * Only used if type is set to file. The URI of the location for the file. + */ + url?: string; + /** + * Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be + * displayed in the attachment list. + */ + inLine?: boolean; + /** + * Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters. + */ + itemId?: string; + } + + /** + * A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form. + */ + interface ReplyFormData { + /** + * A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + */ + htmlBody?: string; + /** + * An array of {@link Office.ReplyFormAttachment} that are either file or item attachments. + */ + attachments?: ReplyFormAttachment[]; + /** + * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + */ + callback?: (result: AsyncResult) => void; + } + /** + * The settings created by using the methods of the RoamingSettings object are saved per add-in and per user. + * That is, they are available only to the add-in that created them, and only from the user's mail box in which they are saved. + * + * While the Outlook Add-in API limits access to these settings to only the add-in that created them, these settings should not be considered + * secure storage. They can be accessed by Exchange Web Services or Extended MAPI. + * They should not be used to store sensitive information such as user credentials or security tokens. + * + * The name of a setting is a String, while the value can be a String, Number, Boolean, null, Object, or Array. + * + * The RoamingSettings object is accessible via the roamingSettings property in the Office.context namespace. + * + * Important: The RoamingSettings object is initialized from the persisted storage only when the add-in is first loaded. + * For task panes, this means that it is only initialized when the task pane first opens. + * If the task pane navigates to another page or reloads the current page, the in-memory object is reset to its initial values, even if + * your add-in has persisted changes. The persisted changes will not be available until the task pane is closed and reopened. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface RoamingSettings { + /** + * Retrieves the specified setting. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param name The case-sensitive name of the setting to retrieve. + * @returns Type: String | Number | Boolean | Object | Array + */ + get(name: string): any; + /** + * Removes the specified setting + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param name The case-sensitive name of the setting to remove. + */ + remove(name: string): void; + /** + * Saves the settings. + * + * Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use + * the set and get methods to work with the in-memory copy of the settings property bag. + * When you want to persist the settings so that they are available the next time the add-in is used, use the saveAsync method. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + saveAsync(callback?: (result: AsyncResult) => void): void; + /** + * Sets or creates the specified setting. + * + * The set method creates a new setting of the specified name if it does not already exist, or sets an existing setting of the specified name. + * The value is stored in the document as the serialized JSON representation of its data type. + * + * A maximum of 32KB is available for the settings of each add-in. + * + * Any changes made to settings using the set function will not be saved to the server until the saveAsync function is called. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param name The case-sensitive name of the setting to set or create. + * @param value Specifies the value to be stored. + */ + set(name: string, value: any): void; + } + + /** + * The SeriesTime object provides methods to get and set the dates and times of appointments in a recurring series and get the dates and times of + * meeting requests in a recurring series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface SeriesTime { + /** + * Gets the duration in minutes of a usual instance in a recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + getDuration(): number; + + /** + * Gets the end date of a recurrence pattern in the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD" + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + getEndDate(): string; + + /** + * Gets the end time of a usual appointment or meeting request instance of a recurrence pattern in whichever time zone that the user or + * add-in set the recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: + * "THH:mm:ss:mmm" + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + getEndTime(): string; + + /** + * Gets the start date of a recurrence pattern in the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD" + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + getStartDate(): string; + + /** + * Gets the start time of a usual appointment instance of a recurrence pattern in whichever time zone that the user/add-in set the + * recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: "THH:mm:ss:mmm" + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + getStartTime(): string; + + /** + * Sets the duration of all appointments in a recurrence pattern. This will also change the end time of the recurrence pattern. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param minutes The length of the appointment in minutes. + */ + setDuration(minutes: number): void; + + /** + * Sets the end date of a recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid date format - The date is not in an acceptable format.
+ * + * In addition to this signature, this method also has the following signature: + * + * `setEndDate(date: string): void;` (Where date is the end date of the recurring appointment series represented in the + * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD"). + * + * @param year The year value of the end date. + * @param month The month value of the end date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. + * @param day The day value of the end date. + */ + setEndDate(year: number, month: number, day: number): void; + /** + * Sets the end date of a recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid date format - The date is not in an acceptable format.
+ * + * @param date End date of the recurring appointment series represented in the {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + */ + setEndDate(date: string): void; + /** + * Sets the start date of a recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid date format - The date is not in an acceptable format.
+ * + * In addition to this signature, this method also has the following signature: + * + * `setStartDate(date: string): void;` (Where date is the start date of the recurring appointment series represented in the {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD"). + * + * @param year The year value of the start date. + * @param month The month value of the start date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. + * @param day The day value of the start date. + */ + setStartDate(year:number, month:number, day:number): void; + + /** + * Sets the start date of a recurring appointment series. + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid date format - The date is not in an acceptable format.
+ * + * @param date Start date of the recurring appointment series represented in the {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + */ + setStartDate(date:string): void; + + /** + * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set + * (the item's time zone is used by default). + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid time format - The time is not in an acceptable format.
+ * + * In addition to this signature, this method also has the following signature: + * + * `setStartTime(time: string): void;` (Where time is the start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm"). + * + * @param hours The hour value of the start time. Valid range: 0-24. + * @param minutes The minute value of the start time. Valid range: 0-59. + */ + setStartTime(hours: number, minutes: number): void; + + /** + * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set + * (the item's time zone is used by default). + * + * [Api set: Mailbox 1.7] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalid time format - The time is not in an acceptable format.
+ * + * @param time Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm". + */ + setStartTime(time: string): void; + } + + /** + * Represents the properties of an appointment or message in a shared folder, mailbox, or calendar. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + interface SharedProperties { + /** + * The email address of the owner of a shared item. + */ + owner: String; + /** + * The remote REST url related to the owner’s mailbox. + */ + restUrl: String; + /** + * The permissions that the delegate has on a shared folder. + */ + delegatePermissions: Office.MailboxEnums.DelegatePermissions; + } + + /** + * Provides methods to get and set the subject of an appointment or message in an Outlook add-in. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + interface Subject { + /** + * Gets the subject of an appointment or message. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * The `value` property of the result is the subject of the item. + */ + getAsync(options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Gets the subject of an appointment or message. + * + * The getAsync method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + * The `value` property of the result is the subject of the item. + */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Sets the subject of an appointment or message. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The subject parameter is longer than 255 characters.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(subject: string): void;` + * + * `setAsync(subject: string, options: Office.AsyncContextOptions): void;` + * + * `setAsync(subject: string, callback: (result: AsyncResult) => void): void;` + * + * @param subject The subject of the appointment or message. The string is limited to 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If setting the subject fails, the asyncResult.error property will contain an error code. + */ + setAsync(subject: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the subject of an appointment or message. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The subject parameter is longer than 255 characters.
+ * + * @param subject The subject of the appointment or message. The string is limited to 255 characters. + */ + setAsync(data: string): void; + /** + * Sets the subject of an appointment or message. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The subject parameter is longer than 255 characters.
+ * + * @param subject The subject of the appointment or message. The string is limited to 255 characters. + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + setAsync(data: string, options: Office.AsyncContextOptions): void; + /** + * Sets the subject of an appointment or message. + * + * The setAsync method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsDataExceedsMaximumSize - The subject parameter is longer than 255 characters.
+ * + * @param subject The subject of the appointment or message. The string is limited to 255 characters. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If setting the subject fails, the asyncResult.error property will contain an error code. + */ + setAsync(data: string, callback: (result: AsyncResult) => void): void; + + } + /** + * Represents a suggested task identified in an item. Read mode only. + * + * The list of tasks suggested in an email message is returned in the taskSuggestions property of the {@link Office.Entities | Entities} object + * that is returned when the getEntities or getEntitiesByType method is called on the active item. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Read
+ */ + interface TaskSuggestion { + /** + * Gets the users that should be assigned a suggested task. + */ + assignees: EmailUser[]; + /** + * Gets the text of an item that was identified as a task suggestion. + */ + taskString: string; + } + /** + * The Time object is returned as the start or end property of an appointment in compose mode. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ */ + interface Time { + /** + * Gets the start or end time of an appointment. + * + * The date and time is provided as a Date object in the asyncResult.value property. The value is in Coordinated Universal Time (UTC). + * You can convert the UTC time to the local client time by using the convertToLocalClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(callback: (result: AsyncResult) => void): void;` + * + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + * The `value` property of the result is a Date object. + */ + getAsync(options: Office.AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Gets the start or end time of an appointment. + * + * The date and time is provided as a Date object in the asyncResult.value property. The value is in Coordinated Universal Time (UTC). + * You can convert the UTC time to the local client time by using the convertToLocalClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. + * The `value` property of the result is a Date object. + */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Sets the start or end time of an appointment. + * + * If the setAsync method is called on the start property, the end property will be adjusted to maintain the duration of the appointment as + * previously set. If the setAsync method is called on the end property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the convertToUtcClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before the appointment start time.
+ * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(dateTime: Date): void;` + * + * `setAsync(dateTime: Date, options: Office.AsyncContextOptions): void;` + * + * `setAsync(dateTime: Date, callback: (result: AsyncResult) => void): void;` + * + * @param dateTime A date-time object in Coordinated Universal Time (UTC). + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If setting the date and time fails, the asyncResult.error property will contain an error code. + */ + setAsync(dateTime: Date, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the start or end time of an appointment. + * + * If the setAsync method is called on the start property, the end property will be adjusted to maintain the duration of the appointment as + * previously set. If the setAsync method is called on the end property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the convertToUtcClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before the appointment start time.
+ * + * @param dateTime A date-time object in Coordinated Universal Time (UTC). + */ + setAsync(dateTime: Date): void; + /** + * Sets the start or end time of an appointment. + * + * If the setAsync method is called on the start property, the end property will be adjusted to maintain the duration of the appointment as + * previously set. If the setAsync method is called on the end property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the convertToUtcClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before the appointment start time.
+ * + * @param dateTime A date-time object in Coordinated Universal Time (UTC). + * @param options An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + */ + setAsync(dateTime: Date, options: Office.AsyncContextOptions): void; + /** + * Sets the start or end time of an appointment. + * + * If the setAsync method is called on the start property, the end property will be adjusted to maintain the duration of the appointment as + * previously set. If the setAsync method is called on the end property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the convertToUtcClientTime method. + * + * [Api set: Mailbox 1.1] + * + * @remarks + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
ErrorsInvalidEndTime - The appointment end time is before the appointment start time.
+ * + * @param dateTime A date-time object in Coordinated Universal Time (UTC). + * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + * If setting the date and time fails, the asyncResult.error property will contain an error code. + */ + setAsync(dateTime: Date, callback: (result: AsyncResult) => void): void; + + } + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email adddress, and time zone. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + interface UserProfile { + /** + * Gets the account type of the user associated with the mailbox. + * + * Note: This member is currently only supported in Outlook 2016 for Mac, build 16.9.1212 and greater. + * + * [Api set: Mailbox 1.6] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * The possible account types are listed in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ValueDescription?
enterpriseThe mailbox is on an on-premises Exchange server.
gmailThe mailbox is associated with a Gmail account.
office365The mailbox is associated with an Office 365 work or school account.
outlookComThe mailbox is associated with a personal Outlook.com account.
+ */ + accountType: string; + /** + * Gets the user's display name. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + displayName: string; + /** + * Gets the user's display name. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + emailAddress: string; + /** + * Gets the user's SMTP email address. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ */ + timeZone: string; + } +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End Exchange APIs ////////////////////// +//////////////////////////////////////////////////////////////// + + + +/////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +//////////////// Begin OfficeExtension runtime ///////////////// +//////////////////////////////////////////////////////////////// + +declare namespace OfficeExtension { + /** + * An abstract proxy object that represents an object in an Office document. + * You create proxy objects from the context (or from other proxy objects), add commands to a queue to act on the object, and then synchronize the + * proxy object state with the document by calling `context.sync()`. + */ + class ClientObject { + /** The request context associated with the object */ + context: ClientRequestContext; + /** + * Returns a boolean value for whether the corresponding object is a null object. You must call `context.sync()` before reading the + * isNullObject property. + */ + isNullObject: boolean; + } +} + +declare namespace OfficeExtension { + /** + * Specifies which properties of an object should be loaded. This load happens when the sync() method is executed. + * This synchronizes the states between Office objects and corresponding JavaScript proxy objects. + * + * @remarks + * + * For Word, the preferred method for specifying the properties and paging information is by using a string literal. + * The first two examples show the preferred way to request the text and font size properties for paragraphs in a paragraph collection: + * + * `context.load(paragraphs, 'text, font/size');` + * + * `paragraphs.load('text, font/size');` + * + * Here is a similar example using object notation (includes paging): + * + * `context.load(paragraphs, {select: 'text, font/size', expand: 'font', top: 50, skip: 0});` + * + * `paragraphs.load({select: 'text, font/size', expand: 'font', top: 50, skip: 0});` + * + * Note that if we don't specify the specific properties on the font object in the select statement, the expand statement by itself would + * indicate that all of the font properties are loaded. + */ + interface LoadOption { + /** + * A comma-delimited string, or array of strings, that specifies the properties to load. + */ + select?: string | string[]; + /** + * A comma-delimited string, or array of strings, that specifies the navigation properties to load. + */ + expand?: string | string[]; + /** + * Only usable on collection types. Specifies the maximum number of collection items that can be included in the result. + */ + top?: number; + /** + * Only usable on collection types. Specifies the number of items in the collection that are to be skipped and not included in the result. + * If top is specified, the result set will start after skipping the specified number of items. + */ + skip?: number; + } + /** + * Provides an option for suppressing an error when the object that is used to set multiple properties tries to set read-only properties. + */ + interface UpdateOptions { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean + } + + /** + * Additional options passed into `{Host}.run(...)`. + */ + export interface RunOptions { + /** + * The URL of the remote workbook and the request headers to be sent. + */ + session?: RequestUrlAndHeaderInfo | T; + + /** + * A previously-created context, or API object, or array of objects. + * The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up + * by `context.sync()`. + */ + previousObjects?: ClientObject | ClientObject[] | ClientRequestContext; + } + + /** Contains debug information about the request context. */ + interface RequestContextDebugInfo { + /** + * The statements to be executed in the host. + * + * These statements may not match the code exactly as written, but will be a close approximation. + */ + pendingStatements: string[]; + } + + /** + * An abstract RequestContext object that facilitates requests to the host Office application. + * The `Excel.run` and `Word.run` methods provide a request context. + */ + class ClientRequestContext { + constructor(url?: string); + + /** Collection of objects that are tracked for automatic adjustments based on surrounding changes in the document. */ + trackedObjects: TrackedObjects; + + /** Request headers */ + requestHeaders: { [name: string]: string }; + + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param object The object whose properties are loaded. + * @param option A comma-delimited string, or array of strings, that specifies the properties to load, or an + * {@link OfficeExtension.LoadOption} object. + */ + load(object: ClientObject, option?: string | string[] | LoadOption): void; + + /** + * Queues up a command to recursively load the specified properties of the object and its navigation properties. + * + * You must call `context.sync()` before reading the properties. + * + * @param object The object to be loaded. + * @param options The key-value pairing of load options for the types, such as + * `{ "Workbook": "worksheets,tables", "Worksheet": "tables", "Tables": "name" }` + * @param maxDepth The maximum recursive depth. + */ + loadRecursive(object: ClientObject, options: { [typeName: string]: string | string[] | LoadOption }, maxDepth?: number): void; + + /** + * Adds a trace message to the queue. If the promise returned by `context.sync()` is rejected due to an error, this adds a ".traceMessages" + * array to the OfficeExtension.Error object, containing all trace messages that were executed. + * These messages can help you monitor the program execution sequence and detect the cause of the error. + */ + trace(message: string): void; + + /** + * Synchronizes the state between JavaScript proxy objects and the Office document, by executing instructions queued on the request context + * and retrieving properties of loaded Office objects for use in your code. + * This method returns a promise, which is resolved when the synchronization is complete. + */ + sync(passThroughValue?: T): Promise; + + /** Debug information */ + readonly debugInfo: RequestContextDebugInfo; + } + + interface EmbeddedOptions { + sessionKey?: string, + container?: HTMLElement, + id?: string; + timeoutInMilliseconds?: number; + height?: string; + width?: string; + } + + class EmbeddedSession { + constructor(url: string, options?: EmbeddedOptions); + public init(): Promise; + } +} + +declare namespace OfficeExtension { + /** Contains the result for methods that return primitive types. The object's value property is retrieved from the document after `context.sync()` is invoked. */ + class ClientResult { + /** The value of the result that is retrieved from the document after `context.sync()` is invoked. */ + value: T; + } +} + +declare namespace OfficeExtension { + /** Configuration */ + var config: { + /** + * Determines whether to log additional error information upon failure. + * + * When this property is set to true, the error object will include a "debugInfo.fullStatements" property that lists all statements in the + * batch request, including all statements that precede and follow the point of failure. + * + * Setting this property to true will negatively impact performance and will log all statements in the batch request, including any statements + * that may contain potentially-sensitive data. + * It is recommended that you only set this property to true during debugging and that you never log the value of + * error.debugInfo.fullStatements to an external database or analytics service. + */ + extendedErrorLogging: boolean; + }; + /** + * Provides information about an error. + */ + interface DebugInfo { + /** Error code string, such as "InvalidArgument". */ + code: string; + /** The error message passed through from the host Office application. */ + message: string; + /** Inner error, if applicable. */ + innerError?: DebugInfo | string; + /** The object type and property or method name (or similar information), if available. */ + errorLocation?: string; + /** + * The statement that caused the error, if available. + * + * This statement will never contain any potentially-sensitive data and may not match the code exactly as written, + * but will be a close approximation. + */ + statements?: string; + /** + * The statements that closely precede and follow the statement that caused the error, if available. + * + * These statements will never contain any potentially-sensitive data and may not match the code exactly as written, + * but will be a close approximation. + */ + surroundingStatements?: string[]; + /** + * All statements in the batch request (including any potentially-sensitive information that was specified in the request), if available. + * + * These statements may not match the code exactly as written, but will be a close approximation. + */ + fullStatements?: string[]; + } + + /** The error object returned by `context.sync()`, if a promise is rejected due to an error while processing the request. */ + class Error { + /** Error name: "OfficeExtension.Error".*/ + name: string; + /** The error message passed through from the host Office application. */ + message: string; + /** Stack trace, if applicable. */ + stack: string; + /** Error code string, such as "InvalidArgument". */ + code: string; + /** + * Trace messages (if any) that were added via a `context.trace()` invocation before calling `context.sync()`. + * If there was an error, this contains all trace messages that were executed before the error occurred. + * These messages can help you monitor the program execution sequence and detect the case of the error. + */ + traceMessages: Array; + /** Debug info (useful for detailed logging of the error, i.e., via `JSON.stringify(...)`). */ + debugInfo: DebugInfo; + /** Inner error, if applicable. */ + innerError: Error; + } +} + +declare namespace OfficeExtension { + class ErrorCodes { + public static accessDenied: string; + public static generalException: string; + public static activityLimitReached: string; + public static invalidObjectPath: string; + public static propertyNotLoaded: string; + public static valueNotLoaded: string; + public static invalidRequestContext: string; + public static invalidArgument: string; + public static runMustReturnPromise: string; + public static cannotRegisterEvent: string; + public static apiNotFound: string; + public static connectionFailure: string; + } +} + +declare namespace OfficeExtension { + /** + * A Promise object that represents a deferred interaction with the host Office application. + * The publicly-consumable {@link Office.OfficeExtension.Promise} is available starting in ExcelApi 1.2 and WordApi 1.2. + * Promises can be chained via ".then", and errors can be caught via ".catch". + * Remember to always use a ".catch" on the outer promise, and to return intermediary promises so as not to break the promise chain. + * When a browser-provided native Promise implementation is available, OfficeExtension.Promise will switch to use the native Promise instead. + */ + const Promise: Office.IPromiseConstructor; + type IPromise = Promise; +} + +declare namespace OfficeExtension { + /** Collection of tracked objects, contained within a request context. See "context.trackedObjects" for more information. */ + class TrackedObjects { + /** + * Track a new object for automatic adjustment based on surrounding changes in the document. Only some object types require this. + * If you are using an object across ".sync" calls and outside the sequential execution of a ".run" batch, + * and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object + * to the tracked object collection when the object was first created. + * + * This method also has the following signature: + * + * `add(objects: ClientObject[]): void;` Where objects is an array of objects to be tracked. + */ + add(object: ClientObject): void; + /** + * Track a set of objects for automatic adjustment based on surrounding changes in the document. Only some object types require this. + * If you are using an object across ".sync" calls and outside the sequential execution of a ".run" batch, + * and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object + * to the tracked object collection when the object was first created. + */ + add(objects: ClientObject[]): void; + /** + * Release the memory associated with an object that was previously added to this collection. + * Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. + * You will need to call `context.sync()` before the memory release takes effect. + * + * This method also has the following signature: + * + * `remove(objects: ClientObject[]): void;` Where objects is an array of objects to be removed. + */ + remove(object: ClientObject): void; + /** + * Release the memory associated with an object that was previously added to this collection. + * Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. + * You will need to call `context.sync()` before the memory release takes effect. + */ + remove(objects: ClientObject[]): void; + } +} + +declare namespace OfficeExtension { + class EventHandlers { + constructor(context: ClientRequestContext, parentObject: ClientObject, name: string, eventInfo: EventInfo); + add(handler: (args: T) => Promise): EventHandlerResult; + remove(handler: (args: T) => Promise): void; + } + + class EventHandlerResult { + constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => Promise); + /** The request context associated with the object */ + context: ClientRequestContext; + remove(): void; + } + + interface EventInfo { + registerFunc: (callback: (args: any) => void) => Promise; + unregisterFunc: (callback: (args: any) => void) => Promise; + eventArgsTransformFunc: (args: any) => Promise; + } +} +declare namespace OfficeExtension { + /** + * Request URL and headers + */ + interface RequestUrlAndHeaderInfo { + /** Request URL */ + url: string; + /** Request headers */ + headers?: { + [name: string]: string; + }; + } +} + + +//////////////////////////////////////////////////////////////// +///////////////// End OfficeExtension runtime ////////////////// +//////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////// +////////////////////// Begin OfficeCore //////////////////////// +//////////////////////////////////////////////////////////////// + + +declare namespace OfficeCore { + class RequestContext extends OfficeExtension.ClientRequestContext { + constructor(url?: string | OfficeExtension.RequestUrlAndHeaderInfo | any); + } +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End OfficeCore ///////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Excel APIs /////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Excel { + /** + * + * Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a base64-encoded .xlsx file. + * + * [Api set: ExcelApi 1.8] + * + * @param base64File Optional. The base64 encoded .xlsx file. The default value is null. + */ + function createWorkbook(base64?: string): Promise; + interface ThreeArrowsSet { + [index: number]: Icon; + redDownArrow: Icon; + yellowSideArrow: Icon; + greenUpArrow: Icon; + } + interface ThreeArrowsGraySet { + [index: number]: Icon; + grayDownArrow: Icon; + graySideArrow: Icon; + grayUpArrow: Icon; + } + interface ThreeFlagsSet { + [index: number]: Icon; + redFlag: Icon; + yellowFlag: Icon; + greenFlag: Icon; + } + interface ThreeTrafficLights1Set { + [index: number]: Icon; + redCircleWithBorder: Icon; + yellowCircle: Icon; + greenCircle: Icon; + } + interface ThreeTrafficLights2Set { + [index: number]: Icon; + redTrafficLight: Icon; + yellowTrafficLight: Icon; + greenTrafficLight: Icon; + } + interface ThreeSignsSet { + [index: number]: Icon; + redDiamond: Icon; + yellowTriangle: Icon; + greenCircle: Icon; + } + interface ThreeSymbolsSet { + [index: number]: Icon; + redCrossSymbol: Icon; + yellowExclamationSymbol: Icon; + greenCheckSymbol: Icon; + } + interface ThreeSymbols2Set { + [index: number]: Icon; + redCross: Icon; + yellowExclamation: Icon; + greenCheck: Icon; + } + interface FourArrowsSet { + [index: number]: Icon; + redDownArrow: Icon; + yellowDownInclineArrow: Icon; + yellowUpInclineArrow: Icon; + greenUpArrow: Icon; + } + interface FourArrowsGraySet { + [index: number]: Icon; + grayDownArrow: Icon; + grayDownInclineArrow: Icon; + grayUpInclineArrow: Icon; + grayUpArrow: Icon; + } + interface FourRedToBlackSet { + [index: number]: Icon; + blackCircle: Icon; + grayCircle: Icon; + pinkCircle: Icon; + redCircle: Icon; + } + interface FourRatingSet { + [index: number]: Icon; + oneBar: Icon; + twoBars: Icon; + threeBars: Icon; + fourBars: Icon; + } + interface FourTrafficLightsSet { + [index: number]: Icon; + blackCircleWithBorder: Icon; + redCircleWithBorder: Icon; + yellowCircle: Icon; + greenCircle: Icon; + } + interface FiveArrowsSet { + [index: number]: Icon; + redDownArrow: Icon; + yellowDownInclineArrow: Icon; + yellowSideArrow: Icon; + yellowUpInclineArrow: Icon; + greenUpArrow: Icon; + } + interface FiveArrowsGraySet { + [index: number]: Icon; + grayDownArrow: Icon; + grayDownInclineArrow: Icon; + graySideArrow: Icon; + grayUpInclineArrow: Icon; + grayUpArrow: Icon; + } + interface FiveRatingSet { + [index: number]: Icon; + noBars: Icon; + oneBar: Icon; + twoBars: Icon; + threeBars: Icon; + fourBars: Icon; + } + interface FiveQuartersSet { + [index: number]: Icon; + whiteCircleAllWhiteQuarters: Icon; + circleWithThreeWhiteQuarters: Icon; + circleWithTwoWhiteQuarters: Icon; + circleWithOneWhiteQuarter: Icon; + blackCircle: Icon; + } + interface ThreeStarsSet { + [index: number]: Icon; + silverStar: Icon; + halfGoldStar: Icon; + goldStar: Icon; + } + interface ThreeTrianglesSet { + [index: number]: Icon; + redDownTriangle: Icon; + yellowDash: Icon; + greenUpTriangle: Icon; + } + interface FiveBoxesSet { + [index: number]: Icon; + noFilledBoxes: Icon; + oneFilledBox: Icon; + twoFilledBoxes: Icon; + threeFilledBoxes: Icon; + fourFilledBoxes: Icon; + } + interface IconCollections { + threeArrows: ThreeArrowsSet; + threeArrowsGray: ThreeArrowsGraySet; + threeFlags: ThreeFlagsSet; + threeTrafficLights1: ThreeTrafficLights1Set; + threeTrafficLights2: ThreeTrafficLights2Set; + threeSigns: ThreeSignsSet; + threeSymbols: ThreeSymbolsSet; + threeSymbols2: ThreeSymbols2Set; + fourArrows: FourArrowsSet; + fourArrowsGray: FourArrowsGraySet; + fourRedToBlack: FourRedToBlackSet; + fourRating: FourRatingSet; + fourTrafficLights: FourTrafficLightsSet; + fiveArrows: FiveArrowsSet; + fiveArrowsGray: FiveArrowsGraySet; + fiveRating: FiveRatingSet; + fiveQuarters: FiveQuartersSet; + threeStars: ThreeStarsSet; + threeTriangles: ThreeTrianglesSet; + fiveBoxes: FiveBoxesSet; + } + var icons: IconCollections; + /** + * Provides connection session for a remote workbook. + */ + class Session { + private static WorkbookSessionIdHeaderName; + private static WorkbookSessionIdHeaderNameLower; + constructor(workbookUrl?: string, requestHeaders?: { + [name: string]: string; + }, persisted?: boolean); + /** + * Close the session. + */ + close(): Promise; + } + /** + * The RequestContext object facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the request context is required to get access to the Excel object model from the add-in. + */ + class RequestContext extends OfficeCore.RequestContext { + constructor(url?: string | Session); + readonly workbook: Workbook; + readonly application: Application; + readonly runtime: Runtime; + } + interface RunOptions extends OfficeExtension.RunOptions { + /** + * Determines whether Excel will delay the batch request until the user exits cell edit mode. + * + * When false, if the user is in cell edit when the batch request is processed by the host, the batch will automatically fail. + * When true, the batch request will be executed immediately if the user is not in cell edit mode, but if the user is in cell edit mode the batch request will be delayed until the user exits cell edit mode. + */ + delayForCellEdit?: boolean; + } + /** + * Executes a batch script that performs actions on the Excel object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(batch: (context: Excel.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: Excel.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Excel object model, using the RequestContext of previously-created API objects. + * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: Excel.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param options - The additional options for this Excel.run which specify previous objects, whether to delay the request for cell edit, session info, etc. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(options: Excel.RunOptions, batch: (context: Excel.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * + * @remarks + * + * In addition to this signature, the method also has the following signatures: + * + * `run(object: OfficeExtension.ClientObject, batch: (context: Excel.RequestContext) => Promise): Promise;` + * + * `run(objects: OfficeExtension.ClientObject[], batch: (context: Excel.RequestContext) => Promise): Promise;` + * + * `run(options: Excel.RunOptions, batch: (context: Excel.RequestContext) => Promise): Promise;` + * + * `run(batch: (context: Excel.RequestContext) => Promise): Promise;` + * + * @param context - A previously-created object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(context: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => Promise): Promise; + /** + * + * Provides information about the binding that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.2] + */ + interface BindingSelectionChangedEventArgs { + /** + * + * Gets the Binding object that represents the binding that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + /** + * + * Gets the number of columns selected. + * + * [Api set: ExcelApi 1.2] + */ + columnCount: number; + /** + * + * Gets the number of rows selected. + * + * [Api set: ExcelApi 1.2] + */ + rowCount: number; + /** + * + * Gets the index of the first column of the selection (zero-based). + * + * [Api set: ExcelApi 1.2] + */ + startColumn: number; + /** + * + * Gets the index of the first row of the selection (zero-based). + * + * [Api set: ExcelApi 1.2] + */ + startRow: number; + } + /** + * + * Provides information about the binding that raised the DataChanged event. + * + * [Api set: ExcelApi 1.2] + */ + interface BindingDataChangedEventArgs { + /** + * + * Gets the Binding object that represents the binding that raised the DataChanged event. + * + * [Api set: ExcelApi 1.2] + */ + binding: Excel.Binding; + } + /** + * + * Provides information about the document that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.2] + */ + interface SelectionChangedEventArgs { + /** + * + * Gets the workbook object that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.2] + */ + workbook: Excel.Workbook; + } + /** + * + * Provides information about the setting that raised the SettingsChanged event + * + * [Api set: ExcelApi 1.4] + */ + interface SettingsChangedEventArgs { + /** + * + * Gets the Setting object that represents the binding that raised the SettingsChanged event + * + * [Api set: ExcelApi 1.4] + */ + settings: Excel.SettingCollection; + } + /** + * + * Provides information about the worksheet that raised the Changed event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetChangedEventArgs { + /** + * + * Gets the range address that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the change type that represents how the Changed event is triggered. See Excel.DataChangeType for details. + * + * [Api set: ExcelApi 1.7] + */ + changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetChanged"; + /** + * + * Gets the id of the worksheet in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi 1.8] + */ + getRange(ctx: Excel.RequestContext): Excel.Range; + /** + * + * Gets the range that represents the changed area of a specific worksheet. It might return null object. + * + * [Api set: ExcelApi 1.8] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * + * Provides information about the table that raised the Changed event. + * + * [Api set: ExcelApi 1.7] + */ + interface TableChangedEventArgs { + /** + * + * Gets the address that represents the changed area of a table on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the change type that represents how the Changed event is triggered. See Excel.DataChangeType for details. + * + * [Api set: ExcelApi 1.7] + */ + changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the id of the table in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "TableChanged"; + /** + * + * Gets the id of the worksheet in which the data changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a table on a specific worksheet. + * + * [Api set: ExcelApi 1.8] + */ + getRange(ctx: Excel.RequestContext): Excel.Range; + /** + * + * Gets the range that represents the changed area of a table on a specific worksheet. It might return null object. + * + * [Api set: ExcelApi 1.8] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } + /** + * + * Provides information about the worksheet that raised the Activated event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetActivatedEventArgs { + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetActivated"; + /** + * + * Gets the id of the worksheet that is activated. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Deactivated event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeactivatedEventArgs { + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeactivated"; + /** + * + * Gets the id of the worksheet that is deactivated. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetSelectionChangedEventArgs { + /** + * + * Gets the range address that represents the selected area of a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetSelectionChanged"; + /** + * + * Gets the id of the worksheet in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the table that raised the SelectionChanged event. + * + * [Api set: ExcelApi 1.7] + */ + interface TableSelectionChangedEventArgs { + /** + * + * Gets the range address that represents the selected area of the table on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + */ + address: string; + /** + * + * Indicates if the selection is inside a table, address will be useless if IsInsideTable is false. + * + * [Api set: ExcelApi 1.7] + */ + isInsideTable: boolean; + /** + * + * Gets the id of the table in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + tableId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + type: "TableSelectionChanged"; + /** + * + * Gets the id of the worksheet in which the selection changed. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Added event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetAddedEventArgs { + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetAdded"; + /** + * + * Gets the id of the worksheet that is added to the workbook. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Deleted event. + * + * [Api set: ExcelApi 1.7] + */ + interface WorksheetDeletedEventArgs { + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.7] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.7] + */ + type: "WorksheetDeleted"; + /** + * + * Gets the id of the worksheet that is deleted from the workbook. + * + * [Api set: ExcelApi 1.7] + */ + worksheetId: string; + } + /** + * + * Provides information about the chart that raised the Added event. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartAddedEventArgs { + /** + * + * Gets the id of the chart that is added to the worksheet. + * + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.8] + */ + type: "ChartAdded"; + /** + * + * Gets the id of the worksheet in which the chart is added. + * + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * + * Provides information about the chart that raised the Activated event. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartActivatedEventArgs { + /** + * + * Gets the id of the chart that is activated. + * + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.8] + */ + type: "ChartActivated"; + /** + * + * Gets the id of the worksheet in which the chart is activated. + * + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * + * Provides information about the chart that raised the Deactivated event. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartDeactivatedEventArgs { + /** + * + * Gets the id of the chart that is deactivated. + * + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeactivated"; + /** + * + * Gets the id of the worksheet in which the chart is deactivated. + * + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * + * Provides information about the chart that raised the Deleted event. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartDeletedEventArgs { + /** + * + * Gets the id of the chart that is deleted from the worksheet. + * + * [Api set: ExcelApi 1.8] + */ + chartId: string; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi 1.8] + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.8] + */ + type: "ChartDeleted"; + /** + * + * Gets the id of the worksheet in which the chart is deleted. + * + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the Calculated event. + * + * [Api set: ExcelApi 1.8] + */ + interface WorksheetCalculatedEventArgs { + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi 1.8] + */ + type: "WorksheetCalculated"; + /** + * + * Gets the id of the worksheet that is calculated. + * + * [Api set: ExcelApi 1.8] + */ + worksheetId: string; + } + /** + * + * Represents the Excel Runtime class. + * + * [Api set: ExcelApi 1.5] + */ + class Runtime extends OfficeExtension.ClientObject { + /** + * + * Turn on/off JavaScript events in current taskpane or content add-in. + * + * [Api set: ExcelApi 1.8] + */ + enableEvents: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Runtime): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RuntimeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Runtime): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Runtime` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Runtime` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Runtime` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RuntimeLoadOptions): Excel.Runtime; + load(option?: string | string[]): Excel.Runtime; + load(option?: { + select?: string; + expand?: string; + }): Excel.Runtime; + toJSON(): Excel.Interfaces.RuntimeData; + } + /** + * + * Represents the Excel application that manages the workbook. + * + * [Api set: ExcelApi 1.1] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Application): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Application): void; + /** + * + * Recalculate all currently opened workbooks in Excel. + * + * [Api set: ExcelApi 1.1] + * + * @param calculationType Specifies the calculation type to use. See Excel.CalculationType for details. + */ + calculate(calculationType: Excel.CalculationType): void; + /** + * + * Recalculate all currently opened workbooks in Excel. + * + * [Api set: ExcelApi 1.1] + * + * @param calculationType Specifies the calculation type to use. See Excel.CalculationType for details. + */ + calculate(calculationType: "Recalculate" | "Full" | "FullRebuild"): void; + /** + * + * Suspends calculation until the next "context.sync()" is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. + * + * [Api set: ExcelApi 1.6] + */ + suspendApiCalculationUntilNextSync(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Application` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Application` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Application` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; + load(option?: string | string[]): Excel.Application; + load(option?: { + select?: string; + expand?: string; + }): Excel.Application; + toJSON(): Excel.Interfaces.ApplicationData; + } + /** + * + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. + * + * [Api set: ExcelApi 1.1] + */ + class Workbook extends OfficeExtension.ClientObject { + /** + * + * Represents the Excel application instance that contains this workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly application: Excel.Application; + /** + * + * Represents a collection of bindings that are part of the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly bindings: Excel.BindingCollection; + /** + * + * Represents the collection of custom XML parts contained by this workbook. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + readonly customXmlParts: Excel.CustomXmlPartCollection; + /** + * + * Represents all data connections in the workbook. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly dataConnections: Excel.DataConnectionCollection; + /** + * + * Represents a collection of worksheet functions that can be used for computation. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly functions: Excel.Functions; + /** + * + * Represents a collection of workbook scoped named items (named ranges and constants). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly names: Excel.NamedItemCollection; + /** + * + * Represents a collection of PivotTables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * + * Gets the workbook properties. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly properties: Excel.DocumentProperties; + /** + * + * Returns workbook protection object for a workbook. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly protection: Excel.WorkbookProtection; + /** + * + * Represents a collection of Settings associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + readonly settings: Excel.SettingCollection; + /** + * + * Represents a collection of styles associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly styles: Excel.StyleCollection; + /** + * + * Represents a collection of tables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * + * Represents a collection of worksheets associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly worksheets: Excel.WorksheetCollection; + /** + * + * Gets the workbook name. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * + * True if the workbook is open in Read-only mode. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readonly readOnly: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Workbook): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.WorkbookUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Workbook): void; + /** + * + * Gets the currently active cell from the workbook. + * + * [Api set: ExcelApi 1.7] + */ + getActiveCell(): Excel.Range; + /** + * + * Gets the currently selected single range from the workbook. If there are multiple ranges selected, this method will throw an error. + * + * [Api set: ExcelApi 1.1] + */ + getSelectedRange(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Workbook` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Workbook` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Workbook` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; + load(option?: string | string[]): Excel.Workbook; + load(option?: { + select?: string; + expand?: string; + }): Excel.Workbook; + /** + * + * Occurs when the selection in the document is changed. + * + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.WorkbookData; + } + /** + * + * Represents the protection of a workbook object. + * + * [Api set: ExcelApi 1.7] + */ + class WorkbookProtection extends OfficeExtension.ClientObject { + /** + * + * Indicates if the workbook is protected. Read-Only. + * + * [Api set: ExcelApi 1.7] + */ + readonly protected: boolean; + /** + * + * Protects a workbook. Fails if the workbook has been protected. + * + * [Api set: ExcelApi 1.7] + * + * @param password workbook protection password. + */ + protect(password?: string): void; + /** + * + * Unprotects a workbook. + * + * [Api set: ExcelApi 1.7] + * + * @param password workbook protection password. + */ + unprotect(password?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.WorkbookProtection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.WorkbookProtection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.WorkbookProtection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.WorkbookProtectionLoadOptions): Excel.WorkbookProtection; + load(option?: string | string[]): Excel.WorkbookProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.WorkbookProtection; + toJSON(): Excel.Interfaces.WorkbookProtectionData; + } + /** + * + * The WorkbookCreated object is the top level object created by Application.CreateWorkbook. A WorkbookCreated object is a special Workbook object. + * + * [Api set: ExcelApi 1.8] + */ + class WorkbookCreated extends OfficeExtension.ClientObject { + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.WorkbookCreated` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.WorkbookCreated` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.WorkbookCreated` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: string | string[]): Excel.WorkbookCreated; + load(option?: { + select?: string; + expand?: string; + }): Excel.WorkbookCreated; + toJSON(): Excel.Interfaces.WorkbookCreatedData; + } + /** + * + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + * + * [Api set: ExcelApi 1.1] + * + * @remarks + * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | how-to guide on working with worksheets} has detailed walkthroughs and code samples. + */ + class Worksheet extends OfficeExtension.ClientObject { + /** + * + * Returns collection of charts that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly charts: Excel.ChartCollection; + /** + * + * Gets an object that can be used to manipulate frozen panes on the worksheet. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly freezePanes: Excel.WorksheetFreezePanes; + /** + * + * Collection of names scoped to the current worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + readonly names: Excel.NamedItemCollection; + /** + * + * Collection of PivotTables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly pivotTables: Excel.PivotTableCollection; + /** + * + * Returns sheet protection object for a worksheet. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.WorksheetProtection; + /** + * + * Collection of tables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly tables: Excel.TableCollection; + /** + * + * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position: number; + /** + * + * Gets or sets the worksheet's gridlines flag. + This flag determines whether gridlines are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showGridlines: boolean; + /** + * + * Gets or sets the worksheet's headings flag. + This flag determines whether headings are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showHeadings: boolean; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly standardHeight: number; + /** + * + * Returns or sets the standard (default) width of all the columns in the worksheet. + One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth: number; + /** + * + * Gets or sets the worksheet tab color. + When retrieving the tab color, if the worksheet is invisible, the value will be null. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor: string; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Worksheet): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.WorksheetUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Worksheet): void; + /** + * + * Activate the worksheet in the Excel UI. + * + * [Api set: ExcelApi 1.1] + */ + activate(): void; + /** + * + * Calculates all cells on a worksheet. + * + * [Api set: ExcelApi 1.6] + * + * @param markAllDirty True, to mark all as dirty. + */ + calculate(markAllDirty: boolean): void; + /** + * + * Copy a worksheet and place it at the specified position. Return the copied worksheet. + * + * [Api set: ExcelApi 1.7] + * + * @param positionType Optional. + * @param relativeTo Optional. + */ + copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * + * Copy a worksheet and place it at the specified position. Return the copied worksheet. + * + * [Api set: ExcelApi 1.7] + * + * @param positionType Optional. + * @param relativeTo Optional. + */ + copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; + /** + * + * Deletes the worksheet from the workbook. + * + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * + * Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it stays within the worksheet grid. + * + * [Api set: ExcelApi 1.1] + * + * @param row The row number of the cell to be retrieved. Zero-indexed. + * @param column the column number of the cell to be retrieved. Zero-indexed. + */ + getCell(row: number, column: number): Excel.Range; + /** + * + * Gets the worksheet that follows this one. If there are no worksheets following this one, this method will throw an error. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getNext(visibleOnly?: boolean): Excel.Worksheet; + /** + * + * Gets the worksheet that follows this one. If there are no worksheets following this one, this method will return a null object. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getNextOrNullObject(visibleOnly?: boolean): Excel.Worksheet; + /** + * + * Gets the worksheet that precedes this one. If there are no previous worksheets, this method will throw an error. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getPrevious(visibleOnly?: boolean): Excel.Worksheet; + /** + * + * Gets the worksheet that precedes this one. If there are no previous worksheets, this method will return a null objet. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getPreviousOrNullObject(visibleOnly?: boolean): Excel.Worksheet; + /** + * + * Gets the range object, representing a single rectangular block of cells, specified by the address or name. + * + * [Api set: ExcelApi 1.1] + * + * @param address Optional. The string representing the address or name of the range. For example, "A1:B2". If not specified, the entire worksheet range is returned. + */ + getRange(address?: string): Excel.Range; + /** + * + * Gets the range object beginning at a particular row index and column index, and spanning a certain number of rows and columns. + * + * [Api set: ExcelApi 1.7] + * + * @param startRow Start row (zero-indexed). + * @param startColumn Start column (zero-indexed). + * @param rowCount Number of rows to include in the range. + * @param columnCount Number of columns to include in the range. + */ + getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number): Excel.Range; + /** + * + * The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, this function will return the top left cell (i.e. it will *not* throw an error). + * + * [Api set: ExcelApi 1.1] + * + * @param valuesOnly Optional. If true, considers only cells with values as used cells (ignoring formatting). [Api set: ExcelApi 1.2] + */ + getUsedRange(valuesOnly?: boolean): Excel.Range; + /** + * + * The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, this function will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param valuesOnly Optional. Considers only cells with values as used cells. + */ + getUsedRangeOrNullObject(valuesOnly?: boolean): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Worksheet` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Worksheet` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Worksheet` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; + load(option?: string | string[]): Excel.Worksheet; + load(option?: { + select?: string; + expand?: string; + }): Excel.Worksheet; + /** + * + * Occurs when the worksheet is activated. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when the worksheet is calculated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * + * Occurs when data changed on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the worksheet is deactivated. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selection changes on a specific worksheet. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.WorksheetData; + } + /** + * + * Represents a collection of worksheet objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + class WorksheetCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Worksheet[]; + /** + * + * Adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets. If you wish to activate the newly added worksheet, call ".activate() on it. + * + * [Api set: ExcelApi 1.1] + * + * @param name Optional. The name of the worksheet to be added. If specified, name should be unqiue. If not specified, Excel determines the name of the new worksheet. + */ + add(name?: string): Excel.Worksheet; + /** + * + * Gets the currently active worksheet in the workbook. + * + * [Api set: ExcelApi 1.1] + */ + getActiveWorksheet(): Excel.Worksheet; + /** + * + * Gets the number of worksheets in the collection. + * + * [Api set: ExcelApi 1.4] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getCount(visibleOnly?: boolean): OfficeExtension.ClientResult; + /** + * + * Gets the first worksheet in the collection. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getFirst(visibleOnly?: boolean): Excel.Worksheet; + /** + * + * Gets a worksheet object using its Name or ID. + * + * [Api set: ExcelApi 1.1] + * + * @param key The Name or ID of the worksheet. + */ + getItem(key: string): Excel.Worksheet; + /** + * + * Gets a worksheet object using its Name or ID. If the worksheet does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param key The Name or ID of the worksheet. + */ + getItemOrNullObject(key: string): Excel.Worksheet; + /** + * + * Gets the last worksheet in the collection. + * + * [Api set: ExcelApi 1.5] + * + * @param visibleOnly Optional. If true, considers only visible worksheets, skipping over any hidden ones. + */ + getLast(visibleOnly?: boolean): Excel.Worksheet; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.WorksheetCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.WorksheetCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.WorksheetCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; + load(option?: string | string[]): Excel.WorksheetCollection; + load(option?: OfficeExtension.LoadOption): Excel.WorksheetCollection; + /** + * + * Occurs when any worksheet in the workbook is activated. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a new worksheet is added to the workbook. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet in the workbook is calculated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onCalculated: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet in the workbook is deactivated. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a worksheet is deleted from the workbook. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.WorksheetCollectionData; + } + /** + * + * Represents the protection of a sheet object. + * + * [Api set: ExcelApi 1.2] + */ + class WorksheetProtection extends OfficeExtension.ClientObject { + /** + * + * Sheet protection options. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly options: Excel.WorksheetProtectionOptions; + /** + * + * Indicates if the worksheet is protected. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly protected: boolean; + /** + * + * Protects a worksheet. Fails if the worksheet has already been protected. + * + * [Api set: ExcelApi 1.2 for options; 1.7 for password] + * + * @param options Optional. Sheet protection options. + * @param password Optional. Sheet protection password. + */ + protect(options?: Excel.WorksheetProtectionOptions, password?: string): void; + /** + * + * Unprotects a worksheet. + * + * [Api set: ExcelApi 1.7 for password] + * + * @param password sheet protection password. + */ + unprotect(password?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.WorksheetProtection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.WorksheetProtection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.WorksheetProtection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; + load(option?: string | string[]): Excel.WorksheetProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.WorksheetProtection; + toJSON(): Excel.Interfaces.WorksheetProtectionData; + } + /** + * + * Represents the options in sheet protection. + * + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionOptions { + /** + * + * Represents the worksheet protection option of allowing using auto filter feature. + * + * [Api set: ExcelApi 1.2] + */ + allowAutoFilter?: boolean; + /** + * + * Represents the worksheet protection option of allowing deleting columns. + * + * [Api set: ExcelApi 1.2] + */ + allowDeleteColumns?: boolean; + /** + * + * Represents the worksheet protection option of allowing deleting rows. + * + * [Api set: ExcelApi 1.2] + */ + allowDeleteRows?: boolean; + /** + * + * Represents the worksheet protection option of allowing editing objects. + * + * [Api set: ExcelApi 1.7] + */ + allowEditObjects?: boolean; + /** + * + * Represents the worksheet protection option of allowing editing scenarios. + * + * [Api set: ExcelApi 1.7] + */ + allowEditScenarios?: boolean; + /** + * + * Represents the worksheet protection option of allowing formatting cells. + * + * [Api set: ExcelApi 1.2] + */ + allowFormatCells?: boolean; + /** + * + * Represents the worksheet protection option of allowing formatting columns. + * + * [Api set: ExcelApi 1.2] + */ + allowFormatColumns?: boolean; + /** + * + * Represents the worksheet protection option of allowing formatting rows. + * + * [Api set: ExcelApi 1.2] + */ + allowFormatRows?: boolean; + /** + * + * Represents the worksheet protection option of allowing inserting columns. + * + * [Api set: ExcelApi 1.2] + */ + allowInsertColumns?: boolean; + /** + * + * Represents the worksheet protection option of allowing inserting hyperlinks. + * + * [Api set: ExcelApi 1.2] + */ + allowInsertHyperlinks?: boolean; + /** + * + * Represents the worksheet protection option of allowing inserting rows. + * + * [Api set: ExcelApi 1.2] + */ + allowInsertRows?: boolean; + /** + * + * Represents the worksheet protection option of allowing using PivotTable feature. + * + * [Api set: ExcelApi 1.2] + */ + allowPivotTables?: boolean; + /** + * + * Represents the worksheet protection option of allowing using sort feature. + * + * [Api set: ExcelApi 1.2] + */ + allowSort?: boolean; + /** + * + * Represents the worksheet protection option of selection mode. + * + * [Api set: ExcelApi 1.7] + */ + selectionMode?: Excel.ProtectionSelectionMode | "Normal" | "Unlocked" | "None"; + } + /** + * [Api set: ExcelApi 1.7] + */ + class WorksheetFreezePanes extends OfficeExtension.ClientObject { + /** + * + * Sets the frozen cells in the active worksheet view. + The range provided corresponds to cells that will be frozen in the top- and left-most pane. + * + * [Api set: ExcelApi 1.7] + * + * @param frozenRange A range that represents the cells to be frozen, or null to remove all frozen panes. + */ + freezeAt(frozenRange: Range | string): void; + /** + * + * Freeze the first column(s) of the worksheet in place. + * + * [Api set: ExcelApi 1.7] + * + * @param count Optional number of columns to freeze, or zero to unfreeze all columns + */ + freezeColumns(count?: number): void; + /** + * + * Freeze the top row(s) of the worksheet in place. + * + * [Api set: ExcelApi 1.7] + * + * @param count Optional number of rows to freeze, or zero to unfreeze all rows + */ + freezeRows(count?: number): void; + /** + * + * Gets a range that describes the frozen cells in the active worksheet view. + The frozen range is corresponds to cells that are frozen in the top- and left-most pane. + * + * [Api set: ExcelApi 1.7] + */ + getLocation(): Excel.Range; + /** + * + * Gets a range that describes the frozen cells in the active worksheet view. + The frozen range is corresponds to cells that are frozen in the top- and left-most pane. + If there is no frozen pane, returns a null object. + * + * [Api set: ExcelApi 1.7] + */ + getLocationOrNullObject(): Excel.Range; + /** + * + * Removes all frozen panes in the worksheet. + * + * [Api set: ExcelApi 1.7] + */ + unfreeze(): void; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc. + * + * [Api set: ExcelApi 1.1] + * + * @remarks + * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-ranges | how-to guide on working with ranges} has detailed walkthroughs, images, and code samples. + */ + class Range extends OfficeExtension.ClientObject { + /** + * + * Collection of ConditionalFormats that intersect the range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * + * Returns a data validation object. + * + * [Api set: ExcelApi 1.8] + */ + readonly dataValidation: Excel.DataValidation; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.RangeFormat; + /** + * + * Represents the range sort of the current range. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.RangeSort; + /** + * + * The worksheet containing the current range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. "Sheet1!A1:B4"). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly address: string; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly addressLocal: string; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly cellCount: number; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly columnCount: number; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly columnIndex: number; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulas: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1: any[][]; + /** + * + * Represents if all cells of the current range are hidden. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly hidden: boolean; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink: Excel.RangeHyperlink; + /** + * + * Represents if the current range is an entire column. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly isEntireColumn: boolean; + /** + * + * Represents if the current range is an entire row. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly isEntireRow: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: any[][]; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly rowCount: number; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly rowIndex: number; + /** + * + * Represents the style of the current range. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi 1.7] + */ + style: string; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly text: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly valueTypes: Excel.RangeValueType[][]; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Range): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Range): void; + /** + * + * Calculates a range of cells on a worksheet. + * + * [Api set: ExcelApi 1.6] + */ + calculate(): void; + /** + * + * Clear range values, format, fill, border, etc. + * + * [Api set: ExcelApi 1.1] + * + * @param applyTo Optional. Determines the type of clear action. See Excel.ClearApplyTo for details. + */ + clear(applyTo?: Excel.ClearApplyTo): void; + /** + * + * Clear range values, format, fill, border, etc. + * + * [Api set: ExcelApi 1.1] + * + * @param applyTo Optional. Determines the type of clear action. See Excel.ClearApplyTo for details. + */ + clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; + /** + * + * Deletes the cells associated with the range. + * + * [Api set: ExcelApi 1.1] + * + * @param shift Specifies which way to shift the cells. See Excel.DeleteShiftDirection for details. + */ + delete(shift: Excel.DeleteShiftDirection): void; + /** + * + * Deletes the cells associated with the range. + * + * [Api set: ExcelApi 1.1] + * + * @param shift Specifies which way to shift the cells. See Excel.DeleteShiftDirection for details. + */ + delete(shift: "Up" | "Left"): void; + /** + * + * Gets a Range object with the same top-left cell as the current Range object, but with the specified numbers of rows and columns. + * + * [Api set: ExcelApi 1.7] + * + * @param numRows The number of rows of the new range size. + * @param numColumns The number of columns of the new range size. + */ + getAbsoluteResizedRange(numRows: number, numColumns: number): Excel.Range; + /** + * + * Gets the smallest range object that encompasses the given ranges. For example, the GetBoundingRect of "B2:C5" and "D10:E15" is "B2:E15". + * + * [Api set: ExcelApi 1.1] + * + * @param anotherRange The range object or address or range name. + */ + getBoundingRect(anotherRange: Range | string): Excel.Range; + /** + * + * Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it stays within the worksheet grid. The returned cell is located relative to the top left cell of the range. + * + * [Api set: ExcelApi 1.1] + * + * @param row Row number of the cell to be retrieved. Zero-indexed. + * @param column Column number of the cell to be retrieved. Zero-indexed. + */ + getCell(row: number, column: number): Excel.Range; + /** + * + * Gets a column contained in the range. + * + * [Api set: ExcelApi 1.1] + * + * @param column Column number of the range to be retrieved. Zero-indexed. + */ + getColumn(column: number): Excel.Range; + /** + * + * Gets a certain number of columns to the right of the current Range object. + * + * [Api set: ExcelApi 1.2] + * + * @param count Optional. The number of columns to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. + */ + getColumnsAfter(count?: number): Excel.Range; + /** + * + * Gets a certain number of columns to the left of the current Range object. + * + * [Api set: ExcelApi 1.2] + * + * @param count Optional. The number of columns to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. + */ + getColumnsBefore(count?: number): Excel.Range; + /** + * + * Gets an object that represents the entire column of the range (for example, if the current range represents cells "B4:E11", its `getEntireColumn` is a range that represents columns "B:E"). + * + * [Api set: ExcelApi 1.1] + */ + getEntireColumn(): Excel.Range; + /** + * + * Gets an object that represents the entire row of the range (for example, if the current range represents cells "B4:E11", its `GetEntireRow` is a range that represents rows "4:11"). + * + * [Api set: ExcelApi 1.1] + */ + getEntireRow(): Excel.Range; + /** + * + * Renders the range as a base64-encoded png image. + * + * [Api set: ExcelApi 1.7] + */ + getImage(): OfficeExtension.ClientResult; + /** + * + * Gets the range object that represents the rectangular intersection of the given ranges. + * + * [Api set: ExcelApi 1.1] + * + * @param anotherRange The range object or range address that will be used to determine the intersection of ranges. + */ + getIntersection(anotherRange: Range | string): Excel.Range; + /** + * + * Gets the range object that represents the rectangular intersection of the given ranges. If no intersection is found, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param anotherRange The range object or range address that will be used to determine the intersection of ranges. + */ + getIntersectionOrNullObject(anotherRange: Range | string): Excel.Range; + /** + * + * Gets the last cell within the range. For example, the last cell of "B2:D5" is "D5". + * + * [Api set: ExcelApi 1.1] + */ + getLastCell(): Excel.Range; + /** + * + * Gets the last column within the range. For example, the last column of "B2:D5" is "D2:D5". + * + * [Api set: ExcelApi 1.1] + */ + getLastColumn(): Excel.Range; + /** + * + * Gets the last row within the range. For example, the last row of "B2:D5" is "B5:D5". + * + * [Api set: ExcelApi 1.1] + */ + getLastRow(): Excel.Range; + /** + * + * Gets an object which represents a range that's offset from the specified range. The dimension of the returned range will match this range. If the resulting range is forced outside the bounds of the worksheet grid, an error will be thrown. + * + * [Api set: ExcelApi 1.1] + * + * @param rowOffset The number of rows (positive, negative, or 0) by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. + * @param columnOffset The number of columns (positive, negative, or 0) by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. + */ + getOffsetRange(rowOffset: number, columnOffset: number): Excel.Range; + /** + * + * Gets a Range object similar to the current Range object, but with its bottom-right corner expanded (or contracted) by some number of rows and columns. + * + * [Api set: ExcelApi 1.2] + * + * @param deltaRows The number of rows by which to expand the bottom-right corner, relative to the current range. Use a positive number to expand the range, or a negative number to decrease it. + * @param deltaColumns The number of columns by which to expand the bottom-right corner, relative to the current range. Use a positive number to expand the range, or a negative number to decrease it. + */ + getResizedRange(deltaRows: number, deltaColumns: number): Excel.Range; + /** + * + * Gets a row contained in the range. + * + * [Api set: ExcelApi 1.1] + * + * @param row Row number of the range to be retrieved. Zero-indexed. + */ + getRow(row: number): Excel.Range; + /** + * + * Gets a certain number of rows above the current Range object. + * + * [Api set: ExcelApi 1.2] + * + * @param count Optional. The number of rows to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. + */ + getRowsAbove(count?: number): Excel.Range; + /** + * + * Gets a certain number of rows below the current Range object. + * + * [Api set: ExcelApi 1.2] + * + * @param count Optional. The number of rows to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. + */ + getRowsBelow(count?: number): Excel.Range; + /** + * + * Returns a Range object that represents the surrounding region for the top-left cell in this range. A surrounding region is a range bounded by any combination of blank rows and blank columns relative to this range. + * + * [Api set: ExcelApi 1.7] + */ + getSurroundingRegion(): Excel.Range; + /** + * + * Returns the used range of the given range object. If there are no used cells within the range, this function will throw an ItemNotFound error. + * + * [Api set: ExcelApi 1.1] + * + * @param valuesOnly Considers only cells with values as used cells. [Api set: ExcelApi 1.2] + */ + getUsedRange(valuesOnly?: boolean): Excel.Range; + /** + * + * Returns the used range of the given range object. If there are no used cells within the range, this function will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param valuesOnly Considers only cells with values as used cells. + */ + getUsedRangeOrNullObject(valuesOnly?: boolean): Excel.Range; + /** + * + * Represents the visible rows of the current range. + * + * [Api set: ExcelApi 1.3] + */ + getVisibleView(): Excel.RangeView; + /** + * + * Inserts a cell or a range of cells into the worksheet in place of this range, and shifts the other cells to make space. Returns a new Range object at the now blank space. + * + * [Api set: ExcelApi 1.1] + * + * @param shift Specifies which way to shift the cells. See Excel.InsertShiftDirection for details. + */ + insert(shift: Excel.InsertShiftDirection): Excel.Range; + /** + * + * Inserts a cell or a range of cells into the worksheet in place of this range, and shifts the other cells to make space. Returns a new Range object at the now blank space. + * + * [Api set: ExcelApi 1.1] + * + * @param shift Specifies which way to shift the cells. See Excel.InsertShiftDirection for details. + */ + insert(shift: "Down" | "Right"): Excel.Range; + /** + * + * Merge the range cells into one region in the worksheet. + * + * [Api set: ExcelApi 1.2] + * + * @param across Optional. Set true to merge cells in each row of the specified range as separate merged cells. The default value is false. + */ + merge(across?: boolean): void; + /** + * + * Selects the specified range in the Excel UI. + * + * [Api set: ExcelApi 1.1] + */ + select(): void; + /** + * + * Displays the card for an active cell if it has rich value content. + * + * [Api set: ExcelApi 1.7] + */ + showCard(): void; + /** + * + * Unmerge the range cells into separate cells. + * + * [Api set: ExcelApi 1.2] + */ + unmerge(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Range` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Range` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Range` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeLoadOptions): Excel.Range; + load(option?: string | string[]): Excel.Range; + load(option?: { + select?: string; + expand?: string; + }): Excel.Range; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Excel.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Excel.Range; + toJSON(): Excel.Interfaces.RangeData; + } + /** + * + * Represents a string reference of the form SheetName!A1:B5, or a global or local named range. + * + * [Api set: ExcelApi 1.2] + */ + interface RangeReference { + /** + * + * Gets or sets the address of the range; for example 'SheetName!A1:B5'. + * + * [Api set: ExcelApi 1.2] + */ + address: string; + } + /** + * + * Represents the necessary strings to get/set a hyperlink (XHL) object. + * + * [Api set: ExcelApi 1.7] + */ + interface RangeHyperlink { + /** + * + * Represents the url target for the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + address?: string; + /** + * + * Represents the document reference target for the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + documentReference?: string; + /** + * + * Represents the string displayed when hovering over the hyperlink. + * + * [Api set: ExcelApi 1.7] + */ + screenTip?: string; + /** + * + * Represents the string that is displayed in the top left most cell in the range. + * + * [Api set: ExcelApi 1.7] + */ + textToDisplay?: string; + } + /** + * + * RangeView represents a set of visible cells of the parent range. + * + * [Api set: ExcelApi 1.3] + */ + class RangeView extends OfficeExtension.ClientObject { + /** + * + * Represents a collection of range views associated with the range. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly rows: Excel.RangeViewCollection; + /** + * + * Represents the cell addresses of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly cellAddresses: any[][]; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly columnCount: number; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1: any[][]; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly index: number; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat: any[][]; + /** + * + * Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly rowCount: number; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly text: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + readonly valueTypes: Excel.RangeValueType[][]; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values: any[][]; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeView): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeViewUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeView): void; + /** + * + * Gets the parent range associated with the current RangeView. + * + * [Api set: ExcelApi 1.3] + */ + getRange(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; + load(option?: string | string[]): Excel.RangeView; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeView; + toJSON(): Excel.Interfaces.RangeViewData; + } + /** + * + * Represents a collection of RangeView objects. + * + * [Api set: ExcelApi 1.3] + */ + class RangeViewCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.RangeView[]; + /** + * + * Gets the number of RangeView objects in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a RangeView Row via its index. Zero-Indexed. + * + * [Api set: ExcelApi 1.3] + * + * @param index Index of the visible row. + */ + getItemAt(index: number): Excel.RangeView; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeViewCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeViewCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeViewCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; + load(option?: string | string[]): Excel.RangeViewCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeViewCollection; + toJSON(): Excel.Interfaces.RangeViewCollectionData; + } + /** + * + * Represents a collection of key-value pair setting objects that are part of the workbook. The scope is limited to per file and add-in (task-pane or content) combination. + * + * [Api set: ExcelApi 1.4] + */ + class SettingCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Setting[]; + /** + * + * Sets or adds the specified setting to the workbook. + * + * [Api set: ExcelApi 1.4] + * + * @param key The Key of the new setting. + * @param value The Value for the new setting. + */ + add(key: string, value: string | number | boolean | Date | Array | any): Excel.Setting; + /** + * + * Gets the number of Settings in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a Setting entry via the key. + * + * [Api set: ExcelApi 1.4] + * + * @param key Key of the setting. + */ + getItem(key: string): Excel.Setting; + /** + * + * Gets a Setting entry via the key. If the Setting does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param key The key of the setting. + */ + getItemOrNullObject(key: string): Excel.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.SettingCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.SettingCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.SettingCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; + load(option?: string | string[]): Excel.SettingCollection; + load(option?: OfficeExtension.LoadOption): Excel.SettingCollection; + /** + * + * Occurs when the Settings in the document are changed. + * + * [Api set: ExcelApi 1.4] + * + * @eventproperty + */ + readonly onSettingsChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.SettingCollectionData; + } + /** + * + * Setting represents a key-value pair of a setting persisted to the document (per file per add-in). These custom key-value pair can be used to store state or lifecycle information needed by the content or task-pane add-in. Note that settings are persisted in the document and hence it is not a place to store any sensitive or protected information such as user information and password. + * + * [Api set: ExcelApi 1.4] + */ + class Setting extends OfficeExtension.ClientObject { + private static DateJSONPrefix; + private static DateJSONSuffix; + private static replaceStringDateWithDate(value); + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + readonly key: string; + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Setting): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Setting): void; + /** + * + * Deletes the setting. + * + * [Api set: ExcelApi 1.4] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Setting` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Setting` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Setting` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; + load(option?: string | string[]): Excel.Setting; + load(option?: { + select?: string; + expand?: string; + }): Excel.Setting; + toJSON(): Excel.Interfaces.SettingData; + } + /** + * + * A collection of all the NamedItem objects that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + class NamedItemCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.NamedItem[]; + /** + * + * Adds a new name to the collection of the given scope. + * + * [Api set: ExcelApi 1.4] + * + * @param name The name of the named item. + * @param reference The formula or the range that the name will refer to. + * @param comment Optional. The comment associated with the named item. + * @returns + */ + add(name: string, reference: Range | string, comment?: string): Excel.NamedItem; + /** + * + * Adds a new name to the collection of the given scope using the user's locale for the formula. + * + * [Api set: ExcelApi 1.4] + * + * @param name The "name" of the named item. + * @param formula The formula in the user's locale that the name will refer to. + * @param comment Optional. The comment associated with the named item. + * @returns + */ + addFormulaLocal(name: string, formula: string, comment?: string): Excel.NamedItem; + /** + * + * Gets the number of named items in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a NamedItem object using its name. + * + * [Api set: ExcelApi 1.1] + * + * @param name Nameditem name. + */ + getItem(name: string): Excel.NamedItem; + /** + * + * Gets a NamedItem object using its name. If the nameditem object does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param name Nameditem name. + */ + getItemOrNullObject(name: string): Excel.NamedItem; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.NamedItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.NamedItemCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.NamedItemCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; + load(option?: string | string[]): Excel.NamedItemCollection; + load(option?: OfficeExtension.LoadOption): Excel.NamedItemCollection; + toJSON(): Excel.Interfaces.NamedItemCollectionData; + } + /** + * + * Represents a defined name for a range of cells or value. Names can be primitive named objects (as seen in the type below), range object, or a reference to a range. This object can be used to obtain range object associated with names. + * + * [Api set: ExcelApi 1.1] + */ + class NamedItem extends OfficeExtension.ClientObject { + /** + * + * Returns an object containing values and types of the named item. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly arrayValues: Excel.NamedItemArrayValues; + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + readonly worksheetOrNullObject: Excel.Worksheet; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula: any; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly name: string; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + readonly scope: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + readonly type: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"; + /** + * + * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly value: any; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.NamedItem): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.NamedItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.NamedItem): void; + /** + * + * Deletes the given name. + * + * [Api set: ExcelApi 1.4] + */ + delete(): void; + /** + * + * Returns the range object that is associated with the name. Throws an error if the named item's type is not a range. + * + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * + * Returns the range object that is associated with the name. Returns a null object if the named item's type is not a range. + * + * [Api set: ExcelApi 1.4] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.NamedItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.NamedItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.NamedItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; + load(option?: string | string[]): Excel.NamedItem; + load(option?: { + select?: string; + expand?: string; + }): Excel.NamedItem; + toJSON(): Excel.Interfaces.NamedItemData; + } + /** + * + * Represents an object containing values and types of a named item. + * + * [Api set: ExcelApi 1.7] + */ + class NamedItemArrayValues extends OfficeExtension.ClientObject { + /** + * + * Represents the types for each item in the named item array + * + * [Api set: ExcelApi 1.7] + */ + readonly types: Excel.RangeValueType[][]; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + readonly values: any[][]; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.NamedItemArrayValues` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.NamedItemArrayValues` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.NamedItemArrayValues` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.NamedItemArrayValuesLoadOptions): Excel.NamedItemArrayValues; + load(option?: string | string[]): Excel.NamedItemArrayValues; + load(option?: { + select?: string; + expand?: string; + }): Excel.NamedItemArrayValues; + toJSON(): Excel.Interfaces.NamedItemArrayValuesData; + } + /** + * + * Represents an Office.js binding that is defined in the workbook. + * + * [Api set: ExcelApi 1.1] + */ + class Binding extends OfficeExtension.ClientObject { + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly type: Excel.BindingType | "Range" | "Table" | "Text"; + /** + * + * Deletes the binding. + * + * [Api set: ExcelApi 1.3] + */ + delete(): void; + /** + * + * Returns the range represented by the binding. Will throw an error if binding is not of the correct type. + * + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * + * Returns the table represented by the binding. Will throw an error if binding is not of the correct type. + * + * [Api set: ExcelApi 1.1] + */ + getTable(): Excel.Table; + /** + * + * Returns the text represented by the binding. Will throw an error if binding is not of the correct type. + * + * [Api set: ExcelApi 1.1] + */ + getText(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Binding` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Binding` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Binding` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; + load(option?: string | string[]): Excel.Binding; + load(option?: { + select?: string; + expand?: string; + }): Excel.Binding; + /** + * + * Occurs when data or formatting within the binding is changed. + * + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selected content in the binding is changed. + * + * [Api set: ExcelApi 1.2] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.BindingData; + } + /** + * + * Represents the collection of all the binding objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + class BindingCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Binding[]; + /** + * + * Returns the number of bindings in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Add a new binding to a particular Range. + * + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be an Excel Range object, or a string. If string, must contain the full address, including the sheet name + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + add(range: Range | string, bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * + * Add a new binding to a particular Range. + * + * [Api set: ExcelApi 1.3] + * + * @param range Range to bind the binding to. May be an Excel Range object, or a string. If string, must contain the full address, including the sheet name + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + add(range: Range | string, bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; + /** + * + * Add a new binding based on a named item in the workbook. + If the named item references to multiple areas, the "InvalidReference" error will be returned. + * + * [Api set: ExcelApi 1.3] + * + * @param name Name from which to create binding. + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + addFromNamedItem(name: string, bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * + * Add a new binding based on a named item in the workbook. + If the named item references to multiple areas, the "InvalidReference" error will be returned. + * + * [Api set: ExcelApi 1.3] + * + * @param name Name from which to create binding. + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + addFromNamedItem(name: string, bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; + /** + * + * Add a new binding based on the current selection. + If the selection has multiple areas, the "InvalidReference" error will be returned. + * + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + addFromSelection(bindingType: Excel.BindingType, id: string): Excel.Binding; + /** + * + * Add a new binding based on the current selection. + If the selection has multiple areas, the "InvalidReference" error will be returned. + * + * [Api set: ExcelApi 1.3] + * + * @param bindingType Type of binding. See Excel.BindingType. + * @param id Name of binding. + */ + addFromSelection(bindingType: "Range" | "Table" | "Text", id: string): Excel.Binding; + /** + * + * Gets the number of bindings in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a binding object by ID. + * + * [Api set: ExcelApi 1.1] + * + * @param id Id of the binding object to be retrieved. + */ + getItem(id: string): Excel.Binding; + /** + * + * Gets a binding object based on its position in the items array. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Binding; + /** + * + * Gets a binding object by ID. If the binding object does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param id Id of the binding object to be retrieved. + */ + getItemOrNullObject(id: string): Excel.Binding; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.BindingCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.BindingCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.BindingCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; + load(option?: string | string[]): Excel.BindingCollection; + load(option?: OfficeExtension.LoadOption): Excel.BindingCollection; + toJSON(): Excel.Interfaces.BindingCollectionData; + } + /** + * + * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + class TableCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Table[]; + /** + * + * Returns the number of tables in the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Create a new table. The range object or source address determines the worksheet under which the table will be added. If the table cannot be added (e.g., because the address is invalid, or the table would overlap with another table), an error will be thrown. + * + * [Api set: ExcelApi 1.1] + * + * @param address A Range object, or a string address or name of the range representing the data source. If the address does not contain a sheet name, the currently-active sheet is used. [Api set: ExcelApi 1.1 / 1.3. Prior to ExcelApi 1.3, this parameter must be a string. Starting with Excel Api 1.3, this parameter may be a Range object or a string.] + * @param hasHeaders Boolean value that indicates whether the data being imported has column labels. If the source does not contain headers (i.e,. when this property set to false), Excel will automatically generate header shifting the data down by one row. + */ + add(address: Range | string, hasHeaders: boolean): Excel.Table; + /** + * + * Gets the number of tables in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a table by Name or ID. + * + * [Api set: ExcelApi 1.1] + * + * @param key Name or ID of the table to be retrieved. + */ + getItem(key: string): Excel.Table; + /** + * + * Gets a table based on its position in the collection. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Table; + /** + * + * Gets a table by Name or ID. If the table does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param key Name or ID of the table to be retrieved. + */ + getItemOrNullObject(key: string): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; + load(option?: string | string[]): Excel.TableCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableCollection; + /** + * + * Occurs when data changes on any table in a workbook, or a worksheet. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.TableCollectionData; + } + /** + * + * Represents an Excel table. + * + * [Api set: ExcelApi 1.1] + * + * @remarks + * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | how-to guide on working with tables} has detailed walkthroughs, images, and code samples. + */ + class Table extends OfficeExtension.ClientObject { + /** + * + * Represents a collection of all the columns in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly columns: Excel.TableColumnCollection; + /** + * + * Represents a collection of all the rows in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly rows: Excel.TableRowCollection; + /** + * + * Represents the sorting for the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly sort: Excel.TableSort; + /** + * + * The worksheet containing the current table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn: boolean; + /** + * + * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly id: string; + /** + * + * Returns a numeric id. + * + * [Api set: ExcelApi 1.8] + */ + readonly legacyId: string; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Table): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Table): void; + /** + * + * Clears all the filters currently applied on the table. + * + * [Api set: ExcelApi 1.2] + */ + clearFilters(): void; + /** + * + * Converts the table into a normal range of cells. All data is preserved. + * + * [Api set: ExcelApi 1.2] + */ + convertToRange(): Excel.Range; + /** + * + * Deletes the table. + * + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * + * Gets the range object associated with the data body of the table. + * + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * + * Gets the range object associated with header row of the table. + * + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * + * Gets the range object associated with the entire table. + * + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * + * Gets the range object associated with totals row of the table. + * + * [Api set: ExcelApi 1.1] + */ + getTotalRowRange(): Excel.Range; + /** + * + * Reapplies all the filters currently on the table. + * + * [Api set: ExcelApi 1.2] + */ + reapplyFilters(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Table` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Table` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Table` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableLoadOptions): Excel.Table; + load(option?: string | string[]): Excel.Table; + load(option?: { + select?: string; + expand?: string; + }): Excel.Table; + /** + * + * Occurs when data in cells changes on a specific table. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selection changes on a specific table. + * + * [Api set: ExcelApi 1.7] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.TableData; + } + /** + * + * Represents a collection of all the columns that are part of the table. + * + * [Api set: ExcelApi 1.1] + */ + class TableColumnCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.TableColumn[]; + /** + * + * Returns the number of columns in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Adds a new column to the table. + * + * [Api set: ExcelApi 1.1 requires an index smaller than the total column count; 1.4 allows index to be optional (null or -1) and will append a column at the end; 1.4 allows name parameter at creation time.] + * + * @param index Optional. Specifies the relative position of the new column. If null or -1, the addition happens at the end. Columns with a higher index will be shifted to the side. Zero-indexed. + * @param values Optional. A 2-dimensional array of unformatted values of the table column. + * @param name Optional. Specifies the name of the new column. If null, the default name will be used. + */ + add(index?: number, values?: Array> | boolean | string | number, name?: string): Excel.TableColumn; + /** + * + * Gets the number of columns in the table. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a column object by Name or ID. + * + * [Api set: ExcelApi 1.1] + * + * @param key Column Name or ID. + */ + getItem(key: number | string): Excel.TableColumn; + /** + * + * Gets a column based on its position in the collection. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.TableColumn; + /** + * + * Gets a column object by Name or ID. If the column does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param key Column Name or ID. + */ + getItemOrNullObject(key: number | string): Excel.TableColumn; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableColumnCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableColumnCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableColumnCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; + load(option?: string | string[]): Excel.TableColumnCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableColumnCollection; + toJSON(): Excel.Interfaces.TableColumnCollectionData; + } + /** + * + * Represents a column in a table. + * + * [Api set: ExcelApi 1.1] + */ + class TableColumn extends OfficeExtension.ClientObject { + /** + * + * Retrieve the filter applied to the column. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly filter: Excel.Filter; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly id: number; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name: string; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TableColumn): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableColumnUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TableColumn): void; + /** + * + * Deletes the column from the table. + * + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * + * Gets the range object associated with the data body of the column. + * + * [Api set: ExcelApi 1.1] + */ + getDataBodyRange(): Excel.Range; + /** + * + * Gets the range object associated with the header row of the column. + * + * [Api set: ExcelApi 1.1] + */ + getHeaderRowRange(): Excel.Range; + /** + * + * Gets the range object associated with the entire column. + * + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * + * Gets the range object associated with the totals row of the column. + * + * [Api set: ExcelApi 1.1] + */ + getTotalRowRange(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableColumn` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableColumn` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableColumn` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; + load(option?: string | string[]): Excel.TableColumn; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableColumn; + toJSON(): Excel.Interfaces.TableColumnData; + } + /** + * + * Represents a collection of all the rows that are part of the table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + class TableRowCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.TableRow[]; + /** + * + * Returns the number of rows in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Adds one or more rows to the table. The return object will be the top of the newly added row(s). + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1 for adding a single row; 1.4 allows adding of multiple rows.] + * + * @param index Optional. Specifies the relative position of the new row. If null or -1, the addition happens at the end. Any rows below the inserted row are shifted downwards. Zero-indexed. + * @param values Optional. A 2-dimensional array of unformatted values of the table row. + */ + add(index?: number, values?: Array> | boolean | string | number): Excel.TableRow; + /** + * + * Gets the number of rows in the table. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a row based on its position in the collection. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableRowCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableRowCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableRowCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; + load(option?: string | string[]): Excel.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableRowCollection; + toJSON(): Excel.Interfaces.TableRowCollectionData; + } + /** + * + * Represents a row in a table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + class TableRow extends OfficeExtension.ClientObject { + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly index: number; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values: any[][]; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TableRow): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TableRow): void; + /** + * + * Deletes the row from the table. + * + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * + * Returns the range object associated with the entire row. + * + * [Api set: ExcelApi 1.1] + */ + getRange(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableRow` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableRow` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableRow` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; + load(option?: string | string[]): Excel.TableRow; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableRow; + toJSON(): Excel.Interfaces.TableRowData; + } + /** + * + * Represents the data validation applied to the current range. + * + * [Api set: ExcelApi 1.8] + */ + class DataValidation extends OfficeExtension.ClientObject { + /** + * + * Error alert when user enters invalid data. + * + * [Api set: ExcelApi 1.8] + */ + errorAlert: Excel.DataValidationErrorAlert; + /** + * + * Ignore blanks: no data validation will be performed on blank cells, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks: boolean; + /** + * + * Prompt when users select a cell. + * + * [Api set: ExcelApi 1.8] + */ + prompt: Excel.DataValidationPrompt; + /** + * + * Data Validation rule that contains different type of data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + rule: Excel.DataValidationRule; + /** + * + * Type of the data validation, see Excel.DataValidationType for details. + * + * [Api set: ExcelApi 1.8] + */ + readonly type: Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"; + /** + * + * Represents if all cell values are valid according to the data validation rules. + Returns true if all cell values are valid, or false if all cell values are invalid. + Returns null if there are both valid and invalid cell values within the range. + * + * [Api set: ExcelApi 1.8] + */ + readonly valid: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.DataValidation): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DataValidationUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.DataValidation): void; + /** + * + * Clears the data validation from the current range. + * + * [Api set: ExcelApi 1.8] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.DataValidation` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.DataValidation` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.DataValidation` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.DataValidationLoadOptions): Excel.DataValidation; + load(option?: string | string[]): Excel.DataValidation; + load(option?: { + select?: string; + expand?: string; + }): Excel.DataValidation; + toJSON(): Excel.Interfaces.DataValidationData; + } + /** + * + * Data validation rule contains different types of data validation. You can only use one of them at a time according the Excel.DataValidationType. + * + * [Api set: ExcelApi 1.8] + */ + interface DataValidationRule { + /** + * + * Custom data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + custom?: Excel.CustomDataValidation; + /** + * + * Date data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + date?: Excel.DateTimeDataValidation; + /** + * + * Decimal data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + decimal?: Excel.BasicDataValidation; + /** + * + * List data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + list?: Excel.ListDataValidation; + /** + * + * TextLength data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + textLength?: Excel.BasicDataValidation; + /** + * + * Time data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + time?: Excel.DateTimeDataValidation; + /** + * + * WholeNumber data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + wholeNumber?: Excel.BasicDataValidation; + } + /** + * + * Represents the Basic Type data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + interface BasicDataValidation { + /** + * + * Gets or sets the Formula1, i.e. minimum value or value depending of the operator. + When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). + When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. + * + * [Api set: ExcelApi 1.8] + */ + formula1: string | number | Range; + /** + * + * Gets or sets the Formula2, i.e. maximum value or value depending of the operator. + When setting the value, it can be passed in as a number, a range object, or a string formula (where the string is either a stringified number, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). + When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. + * + * [Api set: ExcelApi 1.8] + */ + formula2?: string | number | Range; + /** + * + * The operator to use for validating the data. + * + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * + * Represents the Date data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + interface DateTimeDataValidation { + /** + * + * Gets or sets the Formula1, i.e. minimum value or value depending of the operator. + When setting the value, it can be passed in as a Date, a Range object, or a string formula (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). + When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. + * + * [Api set: ExcelApi 1.8] + */ + formula1: string | Date | Range; + /** + * + * Gets or sets the Formula2, i.e. maximum value or value depending of the operator. + When setting the value, it can be passed in as a Date, a Range object, or a string (where the string is either a stringified date/time in ISO8601 format, a cell reference like "=A1", or a formula like "=MIN(A1, B1)"). + When retrieving the value, it will always be returned as a string formula, for example: "=10", "=A1", "=SUM(A1:B5)", etc. + * + * [Api set: ExcelApi 1.8] + */ + formula2?: string | Date | Range; + /** + * + * The operator to use for validating the data. + * + * [Api set: ExcelApi 1.8] + */ + operator: Excel.DataValidationOperator | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqualTo" | "LessThanOrEqualTo"; + } + /** + * + * Represents the List data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + interface ListDataValidation { + /** + * + * Displays the list in cell drop down or not, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + inCellDropDown: boolean; + /** + * + * Source of the list for data validation + When setting the value, it can be passed in as a Excel Range object, or a string that contains comma separated number, boolean or date. + * + * [Api set: ExcelApi 1.8] + */ + source: string | Range; + } + /** + * + * Represents the Custom data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + interface CustomDataValidation { + /** + * + * Custom data validation formula, it is to create special rules, such as preventing duplicates, or limiting the total in a range of cells. + * + * [Api set: ExcelApi 1.8] + */ + formula: string; + } + /** + * + * Represents the error alert properties for the data validation. + * + * [Api set: ExcelApi 1.8] + */ + interface DataValidationErrorAlert { + /** + * + * Represents error alert message. + * + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * + * It determines show error alert dialog or not when users enter invalid data, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + showAlert: boolean; + /** + * + * Represents Data validation alert type, please see Excel.DataValidationAlertStyle for details. + * + * [Api set: ExcelApi 1.8] + */ + style: Excel.DataValidationAlertStyle | "Stop" | "Warning" | "Information"; + /** + * + * Represents error alert dialog title. + * + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * + * Represents the user prompt properties for the data validation. + * + * [Api set: ExcelApi 1.8] + */ + interface DataValidationPrompt { + /** + * + * Represents the message of the prompt. + * + * [Api set: ExcelApi 1.8] + */ + message: string; + /** + * + * It determines showing the prompt or not when user selects a cell with the data validation. + * + * [Api set: ExcelApi 1.8] + */ + showPrompt: boolean; + /** + * + * Represents the title for the prompt. + * + * [Api set: ExcelApi 1.8] + */ + title: string; + } + /** + * + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + class RangeFormat extends OfficeExtension.ClientObject { + /** + * + * Collection of border objects that apply to the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * + * Returns the fill object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.RangeFill; + /** + * + * Returns the font object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.RangeFont; + /** + * + * Returns the format protection object for a range. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly protection: Excel.FormatProtection; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth: number; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight: number; + /** + * + * Gets or sets the text orientation of all the cells within the range. + The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. + If the orientation within a range are not uniform, then null will be returned. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation: number; + /** + * + * Determines if the row height of the Range object equals the standard height of the sheet. + Returns True if the row height of the Range object equals the standard height of the sheet. + Returns Null if the range contains more than one row and the rows aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight: boolean; + /** + * + * Indicates whether the column width of the Range object equals the standard width of the sheet. + Returns True if the column width of the Range object equals the standard width of the sheet. + Returns Null if the range contains more than one column and the columns aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeFormat): void; + /** + * + * Changes the width of the columns of the current range to achieve the best fit, based on the current data in the columns. + * + * [Api set: ExcelApi 1.2] + */ + autofitColumns(): void; + /** + * + * Changes the height of the rows of the current range to achieve the best fit, based on the current data in the columns. + * + * [Api set: ExcelApi 1.2] + */ + autofitRows(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; + load(option?: string | string[]): Excel.RangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFormat; + toJSON(): Excel.Interfaces.RangeFormatData; + } + /** + * + * Represents the format protection of a range object. + * + * [Api set: ExcelApi 1.2] + */ + class FormatProtection extends OfficeExtension.ClientObject { + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.FormatProtection): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FormatProtectionUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.FormatProtection): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.FormatProtection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.FormatProtection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.FormatProtection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; + load(option?: string | string[]): Excel.FormatProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.FormatProtection; + toJSON(): Excel.Interfaces.FormatProtectionData; + } + /** + * + * Represents the background of a range object. + * + * [Api set: ExcelApi 1.1] + */ + class RangeFill extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeFill): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeFill): void; + /** + * + * Resets the range background. + * + * [Api set: ExcelApi 1.1] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeFill` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeFill` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeFill` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; + load(option?: string | string[]): Excel.RangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFill; + toJSON(): Excel.Interfaces.RangeFillData; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.1] + */ + class RangeBorder extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly sideIndex: Excel.BorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeBorder): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeBorder` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeBorder` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeBorder` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; + load(option?: string | string[]): Excel.RangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeBorder; + toJSON(): Excel.Interfaces.RangeBorderData; + } + /** + * + * Represents the border objects that make up the range border. + * + * [Api set: ExcelApi 1.1] + */ + class RangeBorderCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.RangeBorder[]; + /** + * + * Number of border objects in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Gets a border object using its name. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the border object to be retrieved. See Excel.BorderIndex for details. + */ + getItem(index: Excel.BorderIndex): Excel.RangeBorder; + /** + * + * Gets a border object using its name. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the border object to be retrieved. See Excel.BorderIndex for details. + */ + getItem(index: "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"): Excel.RangeBorder; + /** + * + * Gets a border object using its index. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.RangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeBorderCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeBorderCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeBorderCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; + load(option?: string | string[]): Excel.RangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeBorderCollection; + toJSON(): Excel.Interfaces.RangeBorderCollectionData; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + class RangeFont extends OfficeExtension.ClientObject { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeFont): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeFont): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeFont` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeFont` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeFont` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; + load(option?: string | string[]): Excel.RangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFont; + toJSON(): Excel.Interfaces.RangeFontData; + } + /** + * + * A collection of all the chart objects on a worksheet. + * + * [Api set: ExcelApi 1.1] + */ + class ChartCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Chart[]; + /** + * + * Returns the number of charts in the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Creates a new chart. + * + * [Api set: ExcelApi 1.1] + * + * @param type Represents the type of a chart. See Excel.ChartType for details. + * @param sourceData The Range object corresponding to the source data. + * @param seriesBy Optional. Specifies the way columns or rows are used as data series on the chart. See Excel.ChartSeriesBy for details. + */ + add(type: Excel.ChartType, sourceData: Range, seriesBy?: Excel.ChartSeriesBy): Excel.Chart; + /** + * + * Creates a new chart. + * + * [Api set: ExcelApi 1.1] + * + * @param type Represents the type of a chart. See Excel.ChartType for details. + * @param sourceData The Range object corresponding to the source data. + * @param seriesBy Optional. Specifies the way columns or rows are used as data series on the chart. See Excel.ChartSeriesBy for details. + */ + add(type: "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel", sourceData: Range, seriesBy?: "Auto" | "Columns" | "Rows"): Excel.Chart; + /** + * + * Returns the number of charts in the worksheet. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. + * + * [Api set: ExcelApi 1.1] + * + * @param name Name of the chart to be retrieved. + */ + getItem(name: string): Excel.Chart; + /** + * + * Gets a chart based on its position in the collection. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Chart; + /** + * + * Gets a chart using its name. If there are multiple charts with the same name, the first one will be returned. + If the chart does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param name Name of the chart to be retrieved. + */ + getItemOrNullObject(name: string): Excel.Chart; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; + load(option?: string | string[]): Excel.ChartCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartCollection; + /** + * + * Occurs when a chart is activated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a new chart is added to the worksheet. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onAdded: OfficeExtension.EventHandlers; + /** + * + * Occurs when a chart is deactivated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when a chart is deleted. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.ChartCollectionData; + } + /** + * + * Represents a chart object in a workbook. + * + * [Api set: ExcelApi 1.1] + * + * @remarks + * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | how-to guide on working with charts} has detailed walkthroughs, images, and code samples. + */ + class Chart extends OfficeExtension.ClientObject { + /** + * + * Represents chart axes. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly axes: Excel.ChartAxes; + /** + * + * Represents the datalabels on the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * + * Encapsulates the format properties for the chart area. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAreaFormat; + /** + * + * Represents the legend for the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly legend: Excel.ChartLegend; + /** + * + * Represents the plotArea for the chart. + * + * [Api set: ExcelApi 1.8] + */ + readonly plotArea: Excel.ChartPlotArea; + /** + * + * Represents either a single series or collection of series in the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly series: Excel.ChartSeriesCollection; + /** + * + * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartTitle; + /** + * + * The worksheet containing the current chart. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to the level of where the category labels are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel: number; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Returns or sets the way that blank cells are plotted on a chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height: number; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly id: string; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left: number; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * Returns or sets the way columns or rows are used as data series on the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotBy: Excel.ChartPlotBy | "Rows" | "Columns"; + /** + * + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly: boolean; + /** + * + * Returns or sets a ChartSeriesNameLevel enumeration constant referring to the level of where the series names are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel: number; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons: boolean; + /** + * + * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum: boolean; + /** + * + * Returns or sets the chart style for the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + style: number; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top: number; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Chart): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Chart): void; + /** + * + * Deletes the chart object. + * + * [Api set: ExcelApi 1.1] + */ + delete(): void; + /** + * + * Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions. + The aspect ratio is preserved as part of the resizing. + * + * [Api set: ExcelApi 1.2] + * + * @param height (Optional) The desired height of the resulting image. + * @param width (Optional) The desired width of the resulting image. + * @param fittingMode (Optional) The method used to scale the chart to the specified to the specified dimensions (if both height and width are set). + */ + getImage(width?: number, height?: number, fittingMode?: Excel.ImageFittingMode): OfficeExtension.ClientResult; + /** + * + * Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions. + The aspect ratio is preserved as part of the resizing. + * + * [Api set: ExcelApi 1.2] + * + * @param height (Optional) The desired height of the resulting image. + * @param width (Optional) The desired width of the resulting image. + * @param fittingMode (Optional) The method used to scale the chart to the specified to the specified dimensions (if both height and width are set). + */ + getImage(width?: number, height?: number, fittingMode?: "Fit" | "FitAndCenter" | "Fill"): OfficeExtension.ClientResult; + /** + * + * Resets the source data for the chart. + * + * [Api set: ExcelApi 1.1] + * + * @param sourceData The range object corresponding to the source data. + * @param seriesBy Specifies the way columns or rows are used as data series on the chart. Can be one of the following: Auto (default), Rows, and Columns. See Excel.ChartSeriesBy for details. + */ + setData(sourceData: Range, seriesBy?: Excel.ChartSeriesBy): void; + /** + * + * Resets the source data for the chart. + * + * [Api set: ExcelApi 1.1] + * + * @param sourceData The range object corresponding to the source data. + * @param seriesBy Specifies the way columns or rows are used as data series on the chart. Can be one of the following: Auto (default), Rows, and Columns. See Excel.ChartSeriesBy for details. + */ + setData(sourceData: Range, seriesBy?: "Auto" | "Columns" | "Rows"): void; + /** + * + * Positions the chart relative to cells on the worksheet. + * + * [Api set: ExcelApi 1.1] + * + * @param startCell The start cell. This is where the chart will be moved to. The start cell is the top-left or top-right cell, depending on the user's right-to-left display settings. + * @param endCell (Optional) The end cell. If specified, the chart's width and height will be set to fully cover up this cell/range. + */ + setPosition(startCell: Range | string, endCell?: Range | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Chart` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Chart` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Chart` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; + load(option?: string | string[]): Excel.Chart; + load(option?: { + select?: string; + expand?: string; + }): Excel.Chart; + /** + * + * Occurs when the chart is activated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when the chart is deactivated. + * + * [Api set: ExcelApi 1.8] + * + * @eventproperty + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + toJSON(): Excel.Interfaces.ChartData; + } + /** + * + * Encapsulates the format properties for the overall chart area. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAreaFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format of chart area, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formatting information. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAreaFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAreaFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAreaFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAreaFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAreaFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAreaFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; + load(option?: string | string[]): Excel.ChartAreaFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAreaFormat; + toJSON(): Excel.Interfaces.ChartAreaFormatData; + } + /** + * + * Represents a collection of chart series. + * + * [Api set: ExcelApi 1.1] + */ + class ChartSeriesCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartSeries[]; + /** + * + * Returns the number of series in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Add a new series to the collection. The new added series is not visible until set values/x axis values/bubble sizes for it (depending on chart type). + * + * [Api set: ExcelApi 1.7] + * + * @param name Optional. Name of the series. + * @param index Optional. Index value of the series to be added. Zero-indexed. + */ + add(name?: string, index?: number): Excel.ChartSeries; + /** + * + * Returns the number of series in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Retrieves a series based on its position in the collection. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.ChartSeries; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartSeriesCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartSeriesCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartSeriesCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; + load(option?: string | string[]): Excel.ChartSeriesCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartSeriesCollection; + toJSON(): Excel.Interfaces.ChartSeriesCollectionData; + } + /** + * + * Represents a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartSeries extends OfficeExtension.ClientObject { + /** + * + * Represents a collection of all dataLabels in the series. + * + * [Api set: ExcelApi 1.8] + */ + readonly dataLabels: Excel.ChartDataLabels; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartSeriesFormat; + /** + * + * Represents a collection of all points in the series. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly points: Excel.ChartPointsCollection; + /** + * + * Represents a collection of trendlines in the series. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly trendlines: Excel.ChartTrendlineCollection; + /** + * + * Returns or sets the group for the specified series. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize: number; + /** + * + * Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + explosion: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered: boolean; + /** + * + * Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + firstSliceAngle: number; + /** + * + * Represents the gap width of a chart series. Only valid on bar and column charts, as well as + specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels: boolean; + /** + * + * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + invertIfNegative: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + overlap: number; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder: number; + /** + * + * Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + secondPlotSize: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable to line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth: boolean; + /** + * + * Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + splitType: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + varyByCategories: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartSeries): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartSeriesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartSeries): void; + /** + * + * Deletes the chart series. + * + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * + * Set bubble sizes for a chart series. Only works for bubble charts. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setBubbleSizes(sourceData: Range): void; + /** + * + * Set values for a chart series. For scatter chart, it means Y axis values. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setValues(sourceData: Range): void; + /** + * + * Set values of X axis for a chart series. Only works for scatter charts. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setXAxisValues(sourceData: Range): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartSeries` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartSeries` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartSeries` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; + load(option?: string | string[]): Excel.ChartSeries; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeries; + toJSON(): Excel.Interfaces.ChartSeriesData; + } + /** + * + * Encapsulates the format properties for the chart series + * + * [Api set: ExcelApi 1.1] + */ + class ChartSeriesFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the fill format of a chart series, which includes background formating information. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartSeriesFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartSeriesFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartSeriesFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartSeriesFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartSeriesFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartSeriesFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; + load(option?: string | string[]): Excel.ChartSeriesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeriesFormat; + toJSON(): Excel.Interfaces.ChartSeriesFormatData; + } + /** + * + * A collection of all the chart points within a series inside a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartPointsCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartPoint[]; + /** + * + * Returns the number of chart points in the series. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly count: number; + /** + * + * Returns the number of chart points in the series. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Retrieve a point based on its position within the series. + * + * [Api set: ExcelApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.ChartPoint; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPointsCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPointsCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPointsCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; + load(option?: string | string[]): Excel.ChartPointsCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartPointsCollection; + toJSON(): Excel.Interfaces.ChartPointsCollectionData; + } + /** + * + * Represents a point of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartPoint extends OfficeExtension.ClientObject { + /** + * + * Returns the data label of a chart point. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly dataLabel: Excel.ChartDataLabel; + /** + * + * Encapsulates the format properties chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartPointFormat; + /** + * + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly value: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartPoint): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartPointUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartPoint): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPoint` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPoint` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPoint` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; + load(option?: string | string[]): Excel.ChartPoint; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPoint; + toJSON(): Excel.Interfaces.ChartPointData; + } + /** + * + * Represents formatting object for chart points. + * + * [Api set: ExcelApi 1.1] + */ + class ChartPointFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format of a chart data point, which includes color, style, and weight information. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of a chart, which includes background formating information. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartPointFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartPointFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartPointFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPointFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPointFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPointFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPointFormatLoadOptions): Excel.ChartPointFormat; + load(option?: string | string[]): Excel.ChartPointFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPointFormat; + toJSON(): Excel.Interfaces.ChartPointFormatData; + } + /** + * + * Represents the chart axes. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAxes extends OfficeExtension.ClientObject { + /** + * + * Represents the category axis in a chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly categoryAxis: Excel.ChartAxis; + /** + * + * Represents the series axis of a 3-dimensional chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly seriesAxis: Excel.ChartAxis; + /** + * + * Represents the value axis in an axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly valueAxis: Excel.ChartAxis; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAxes): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAxesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAxes): void; + /** + * + * Returns the specific axis identified by type and group. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the axis type. See Excel.ChartAxisType for details. + * @param group Optional. Specifies the axis group. See Excel.ChartAxisGroup for details. + */ + getItem(type: Excel.ChartAxisType, group?: Excel.ChartAxisGroup): Excel.ChartAxis; + /** + * + * Returns the specific axis identified by type and group. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the axis type. See Excel.ChartAxisType for details. + * @param group Optional. Specifies the axis group. See Excel.ChartAxisGroup for details. + */ + getItem(type: "Invalid" | "Category" | "Value" | "Series", group?: "Primary" | "Secondary"): Excel.ChartAxis; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAxes` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAxes` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAxes` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; + load(option?: string | string[]): Excel.ChartAxes; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxes; + toJSON(): Excel.Interfaces.ChartAxesData; + } + /** + * + * Represents a single axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAxis extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisFormat; + /** + * + * Returns a Gridlines object that represents the major gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly majorGridlines: Excel.ChartGridlines; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly minorGridlines: Excel.ChartGridlines; + /** + * + * Represents the axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly title: Excel.ChartAxisTitle; + /** + * + * Represents the alignment for the specified axis tick label. See Excel.ChartTextHorizontalAlignment for detail. + * + * [Api set: ExcelApi 1.8] + */ + alignment: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * + * Represents the custom axis display unit value. Read-only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + readonly customDisplayUnit: number; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * + * Represents whether value axis crosses the category axis between categories. + * + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories: boolean; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly left: number; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + majorTimeUnitScale: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit: any; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum: any; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + minorTimeUnitScale: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit: any; + /** + * + * Represents whether an axis is multilevel or not. + * + * [Api set: ExcelApi 1.8] + */ + multiLevel: boolean; + /** + * + * Represents the format code for the axis tick label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * + * Represents the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. + * + * [Api set: ExcelApi 1.8] + */ + offset: number; + /** + * + * Represents the specified axis position where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * + * Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. + * + * [Api set: ExcelApi 1.8] + */ + readonly positionAt: number; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel: boolean; + /** + * + * Represents the text orientation of the axis tick label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation: any; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing: number; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly top: number; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAxis): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAxisUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAxis): void; + /** + * + * Sets all the category names for the specified axis. + * + * [Api set: ExcelApi 1.7] + * + * @param sourceData The Range object corresponding to the source data. + */ + setCategoryNames(sourceData: Range): void; + /** + * + * Sets the axis display unit to a custom value. + * + * [Api set: ExcelApi 1.7] + * + * @param value Custom value of the display unit. + */ + setCustomDisplayUnit(value: number): void; + /** + * + * Set the specified axis position where the other axis crosses at. + * + * [Api set: ExcelApi 1.8] + * + * @param value Custom value of the crosses at + */ + setPositionAt(value: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAxis` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAxis` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAxis` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; + load(option?: string | string[]): Excel.ChartAxis; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxis; + toJSON(): Excel.Interfaces.ChartAxisData; + } + /** + * + * Encapsulates the format properties for the chart axis. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAxisFormat extends OfficeExtension.ClientObject { + /** + * + * Represents chart fill formatting. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAxisFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAxisFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAxisFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAxisFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAxisFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAxisFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; + load(option?: string | string[]): Excel.ChartAxisFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisFormat; + toJSON(): Excel.Interfaces.ChartAxisFormatData; + } + /** + * + * Represents the title of a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAxisTitle extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of chart axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartAxisTitleFormat; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAxisTitle): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAxisTitleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAxisTitle): void; + /** + * + * A string value that represents the formula of chart axis title using A1-style notation. + * + * [Api set: ExcelApi 1.8] + * + * @param formula a string that present the formula to set + */ + setFormula(formula: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAxisTitle` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAxisTitle` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAxisTitle` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; + load(option?: string | string[]): Excel.ChartAxisTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitle; + toJSON(): Excel.Interfaces.ChartAxisTitleData; + } + /** + * + * Represents the chart axis title formatting. + * + * [Api set: ExcelApi 1.1] + */ + class ChartAxisTitleFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents chart fill formatting. + * + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartAxisTitleFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartAxisTitleFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartAxisTitleFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartAxisTitleFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartAxisTitleFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartAxisTitleFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; + load(option?: string | string[]): Excel.ChartAxisTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitleFormat; + toJSON(): Excel.Interfaces.ChartAxisTitleFormatData; + } + /** + * + * Represents a collection of all the data labels on a chart point. + * + * [Api set: ExcelApi 1.1] + */ + class ChartDataLabels extends OfficeExtension.ClientObject { + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * + * Represents whether data labels automatically generate appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the format code for data labels. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue: boolean; + /** + * + * Represents the text orientation of data labels. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of data label is -90, 90, or 180. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartDataLabels): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartDataLabelsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataLabels): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartDataLabels` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartDataLabels` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartDataLabels` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; + load(option?: string | string[]): Excel.ChartDataLabels; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabels; + toJSON(): Excel.Interfaces.ChartDataLabelsData; + } + /** + * + * Represents the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + class ChartDataLabel extends OfficeExtension.ClientObject { + /** + * + * Represents the format of chart data label. + * + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartDataLabelFormat; + /** + * + * Boolean value representing if data label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * + * String value that represents the formula of chart data label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * + * Returns the height, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * + * String value that represents the format code for data label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data label on a chart. + * + * [Api set: ExcelApi 1.7] + */ + separator: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue: boolean; + /** + * + * String representing the text of the data label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * + * Represents the text orientation of chart data label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * + * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * Returns the width, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartDataLabel): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartDataLabelUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataLabel): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartDataLabel` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartDataLabel` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartDataLabel` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel; + load(option?: string | string[]): Excel.ChartDataLabel; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabel; + toJSON(): Excel.Interfaces.ChartDataLabelData; + } + /** + * + * Encapsulates the format properties for the chart data labels. + * + * [Api set: ExcelApi 1.1] + */ + class ChartDataLabelFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of the current chart data label. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartDataLabelFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartDataLabelFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartDataLabelFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartDataLabelFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartDataLabelFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartDataLabelFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; + load(option?: string | string[]): Excel.ChartDataLabelFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabelFormat; + toJSON(): Excel.Interfaces.ChartDataLabelFormatData; + } + /** + * + * Represents major or minor gridlines on a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + class ChartGridlines extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of chart gridlines. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartGridlinesFormat; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartGridlines): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartGridlinesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartGridlines): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartGridlines` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartGridlines` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartGridlines` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; + load(option?: string | string[]): Excel.ChartGridlines; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlines; + toJSON(): Excel.Interfaces.ChartGridlinesData; + } + /** + * + * Encapsulates the format properties for chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + class ChartGridlinesFormat extends OfficeExtension.ClientObject { + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartGridlinesFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartGridlinesFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartGridlinesFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartGridlinesFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartGridlinesFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartGridlinesFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; + load(option?: string | string[]): Excel.ChartGridlinesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlinesFormat; + toJSON(): Excel.Interfaces.ChartGridlinesFormatData; + } + /** + * + * Represents the legend in a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartLegend extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartLegendFormat; + /** + * + * Represents a collection of legendEntries in the legend. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly legendEntries: Excel.ChartLegendEntryCollection; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartLegend): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartLegendUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartLegend): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartLegend` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartLegend` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartLegend` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; + load(option?: string | string[]): Excel.ChartLegend; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegend; + toJSON(): Excel.Interfaces.ChartLegendData; + } + /** + * + * Represents the legendEntry in legendEntryCollection. + * + * [Api set: ExcelApi 1.7] + */ + class ChartLegendEntry extends OfficeExtension.ClientObject { + /** + * + * Represents the height of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * + * Represents the index of the LegendEntry in the Chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + readonly index: number; + /** + * + * Represents the left of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + readonly left: number; + /** + * + * Represents the top of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + readonly top: number; + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible: boolean; + /** + * + * Represents the width of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartLegendEntry): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartLegendEntryUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartLegendEntry): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartLegendEntry` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartLegendEntry` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartLegendEntry` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLegendEntryLoadOptions): Excel.ChartLegendEntry; + load(option?: string | string[]): Excel.ChartLegendEntry; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegendEntry; + toJSON(): Excel.Interfaces.ChartLegendEntryData; + } + /** + * + * Represents a collection of legendEntries. + * + * [Api set: ExcelApi 1.7] + */ + class ChartLegendEntryCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartLegendEntry[]; + /** + * + * Returns the number of legendEntry in the collection. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a legendEntry at the given index. + * + * [Api set: ExcelApi 1.7] + * + * @param index Index of the legendEntry to be retrieved. + */ + getItemAt(index: number): Excel.ChartLegendEntry; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartLegendEntryCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartLegendEntryCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartLegendEntryCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; + load(option?: string | string[]): Excel.ChartLegendEntryCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartLegendEntryCollection; + toJSON(): Excel.Interfaces.ChartLegendEntryCollectionData; + } + /** + * + * Encapsulates the format properties of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + class ChartLegendFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formating information. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartLegendFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartLegendFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartLegendFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartLegendFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartLegendFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartLegendFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; + load(option?: string | string[]): Excel.ChartLegendFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegendFormat; + toJSON(): Excel.Interfaces.ChartLegendFormatData; + } + /** + * + * Represents a chart title object of a chart. + * + * [Api set: ExcelApi 1.1] + */ + class ChartTitle extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly format: Excel.ChartTitleFormat; + /** + * + * Returns the height, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly height: number; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left: number; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; + /** + * + * Represents a boolean value that determines if the chart title has a shadow. + * + * [Api set: ExcelApi 1.7] + */ + showShadow: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + top: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible: boolean; + /** + * + * Returns the width, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTitle): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTitleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTitle): void; + /** + * + * Get the substring of a chart title. Line break '\n' also counts one character. + * + * [Api set: ExcelApi 1.7] + * + * @param start Start position of substring to be retrieved. Position start with 0. + * @param length Length of substring to be retrieved. + */ + getSubstring(start: number, length: number): Excel.ChartFormatString; + /** + * + * Sets a string value that represents the formula of chart title using A1-style notation. + * + * [Api set: ExcelApi 1.7] + * + * @param formula A string that represents the formula to set. + */ + setFormula(formula: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTitle` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTitle` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTitle` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; + load(option?: string | string[]): Excel.ChartTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitle; + toJSON(): Excel.Interfaces.ChartTitleData; + } + /** + * + * Represents the substring in chart related objects that contains text, like ChartTitle object, ChartAxisTitle object, etc. + * + * [Api set: ExcelApi 1.7] + */ + class ChartFormatString extends OfficeExtension.ClientObject { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartFormatString): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartFormatStringUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartFormatString): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartFormatString` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartFormatString` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartFormatString` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartFormatStringLoadOptions): Excel.ChartFormatString; + load(option?: string | string[]): Excel.ChartFormatString; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartFormatString; + toJSON(): Excel.Interfaces.ChartFormatStringData; + } + /** + * + * Provides access to the office art formatting for chart title. + * + * [Api set: ExcelApi 1.1] + */ + class ChartTitleFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format of chart title, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formating information. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTitleFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTitleFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTitleFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTitleFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTitleFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTitleFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; + load(option?: string | string[]): Excel.ChartTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitleFormat; + toJSON(): Excel.Interfaces.ChartTitleFormatData; + } + /** + * + * Represents the fill formatting for a chart element. + * + * [Api set: ExcelApi 1.1] + */ + class ChartFill extends OfficeExtension.ClientObject { + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartFill; + /** + * + * Clear the fill color of a chart element. + * + * [Api set: ExcelApi 1.1] + */ + clear(): void; + /** + * + * Sets the fill formatting of a chart element to a uniform color. + * + * [Api set: ExcelApi 1.1] + * + * @param color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + */ + setSolidColor(color: string): void; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents the border formatting of a chart element. + * + * [Api set: ExcelApi 1.7] + */ + class ChartBorder extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the border, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartBorder): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartBorder): void; + /** + * + * Clear the border format of a chart element. + * + * [Api set: ExcelApi 1.8] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartBorder` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartBorder` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartBorder` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartBorderLoadOptions): Excel.ChartBorder; + load(option?: string | string[]): Excel.ChartBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartBorder; + toJSON(): Excel.Interfaces.ChartBorderData; + } + /** + * + * Encapsulates the formatting options for line elements. + * + * [Api set: ExcelApi 1.1] + */ + class ChartLineFormat extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the line, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartLineFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartLineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartLineFormat): void; + /** + * + * Clear the line format of a chart element. + * + * [Api set: ExcelApi 1.1] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartLineFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartLineFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartLineFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; + load(option?: string | string[]): Excel.ChartLineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLineFormat; + toJSON(): Excel.Interfaces.ChartLineFormatData; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a chart object. + * + * [Api set: ExcelApi 1.1] + */ + class ChartFont extends OfficeExtension.ClientObject { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name: string; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size: number; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline: Excel.ChartUnderlineStyle | "None" | "Single"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartFont): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartFontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartFont): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartFont` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartFont` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartFont` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; + load(option?: string | string[]): Excel.ChartFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartFont; + toJSON(): Excel.Interfaces.ChartFontData; + } + /** + * + * This object represents the attributes for a chart trendline object. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendline extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + readonly format: Excel.ChartTrendlineFormat; + /** + * + * Represents the label of a chart trendline. + * + * [Api set: ExcelApi 1.8] + */ + readonly label: Excel.ChartTrendlineLabel; + /** + * + * Represents the number of periods that the trendline extends backward. + * + * [Api set: ExcelApi 1.8] + */ + backwardPeriod: number; + /** + * + * Represents the number of periods that the trendline extends forward. + * + * [Api set: ExcelApi 1.8] + */ + forwardPeriod: number; + /** + * + * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + intercept: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder: number; + /** + * + * True if the equation for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showEquation: boolean; + /** + * + * True if the R-squared for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showRSquared: boolean; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTrendline): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTrendlineUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTrendline): void; + /** + * + * Delete the trendline object. + * + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTrendline` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTrendline` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTrendline` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTrendlineLoadOptions): Excel.ChartTrendline; + load(option?: string | string[]): Excel.ChartTrendline; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendline; + toJSON(): Excel.Interfaces.ChartTrendlineData; + } + /** + * + * Represents a collection of Chart Trendlines. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendlineCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ChartTrendline[]; + /** + * + * Adds a new trendline to trendline collection. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the trendline type. The default value is "Linear". See Excel.ChartTrendline for details. + */ + add(type?: Excel.ChartTrendlineType): Excel.ChartTrendline; + /** + * + * Adds a new trendline to trendline collection. + * + * [Api set: ExcelApi 1.7] + * + * @param type Specifies the trendline type. The default value is "Linear". See Excel.ChartTrendline for details. + */ + add(type?: "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"): Excel.ChartTrendline; + /** + * + * Returns the number of trendlines in the collection. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Get trendline object by index, which is the insertion order in items array. + * + * [Api set: ExcelApi 1.7] + * + * @param index Represents the insertion order in items array. + */ + getItem(index: number): Excel.ChartTrendline; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTrendlineCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTrendlineCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTrendlineCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; + load(option?: string | string[]): Excel.ChartTrendlineCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartTrendlineCollection; + toJSON(): Excel.Interfaces.ChartTrendlineCollectionData; + } + /** + * + * Represents the format properties for chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + class ChartTrendlineFormat extends OfficeExtension.ClientObject { + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTrendlineFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTrendlineFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTrendlineFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTrendlineFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTrendlineFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTrendlineFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTrendlineFormatLoadOptions): Excel.ChartTrendlineFormat; + load(option?: string | string[]): Excel.ChartTrendlineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendlineFormat; + toJSON(): Excel.Interfaces.ChartTrendlineFormatData; + } + /** + * + * This object represents the attributes for a chart trendline lable object. + * + * [Api set: ExcelApi 1.8] + */ + class ChartTrendlineLabel extends OfficeExtension.ClientObject { + /** + * + * Represents the format of chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartTrendlineLabelFormat; + /** + * + * Boolean value representing if trendline label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText: boolean; + /** + * + * String value that represents the formula of chart trendline label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula: string; + /** + * + * Returns the height, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + readonly height: number; + /** + * + * Represents the horizontal alignment for chart trendline label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of trendline label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * + * String value that represents the format code for trendline label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * + * String representing the text of the trendline label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text: string; + /** + * + * Represents the text orientation of chart trendline label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * + * Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * + * Represents the vertical alignment of chart trendline label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of trendline label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * Returns the width, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTrendlineLabel): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTrendlineLabelUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTrendlineLabel): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTrendlineLabel` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTrendlineLabel` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTrendlineLabel` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTrendlineLabelLoadOptions): Excel.ChartTrendlineLabel; + load(option?: string | string[]): Excel.ChartTrendlineLabel; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendlineLabel; + toJSON(): Excel.Interfaces.ChartTrendlineLabelData; + } + /** + * + * Encapsulates the format properties for the chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + class ChartTrendlineLabelFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of the current chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + readonly font: Excel.ChartFont; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartTrendlineLabelFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartTrendlineLabelFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartTrendlineLabelFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartTrendlineLabelFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartTrendlineLabelFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartTrendlineLabelFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions): Excel.ChartTrendlineLabelFormat; + load(option?: string | string[]): Excel.ChartTrendlineLabelFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTrendlineLabelFormat; + toJSON(): Excel.Interfaces.ChartTrendlineLabelFormatData; + } + /** + * + * This object represents the attributes for a chart plotArea object. + * + * [Api set: ExcelApi 1.8] + */ + class ChartPlotArea extends OfficeExtension.ClientObject { + /** + * + * Represents the formatting of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + readonly format: Excel.ChartPlotAreaFormat; + /** + * + * Represents the height value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + height: number; + /** + * + * Represents the insideHeight value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideHeight: number; + /** + * + * Represents the insideLeft value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideLeft: number; + /** + * + * Represents the insideTop value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideTop: number; + /** + * + * Represents the insideWidth value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideWidth: number; + /** + * + * Represents the left value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + left: number; + /** + * + * Represents the position of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + position: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * + * Represents the top value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + top: number; + /** + * + * Represents the width value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartPlotArea): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartPlotAreaUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartPlotArea): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPlotArea` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPlotArea` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPlotArea` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPlotAreaLoadOptions): Excel.ChartPlotArea; + load(option?: string | string[]): Excel.ChartPlotArea; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPlotArea; + toJSON(): Excel.Interfaces.ChartPlotAreaData; + } + /** + * + * Represents the format properties for chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + class ChartPlotAreaFormat extends OfficeExtension.ClientObject { + /** + * + * Represents the border attributes of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + readonly border: Excel.ChartBorder; + /** + * + * Represents the fill format of an object, which includes background formating information. + * + * [Api set: ExcelApi 1.8] + */ + readonly fill: Excel.ChartFill; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartPlotAreaFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartPlotAreaFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartPlotAreaFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPlotAreaFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPlotAreaFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPlotAreaFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions): Excel.ChartPlotAreaFormat; + load(option?: string | string[]): Excel.ChartPlotAreaFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPlotAreaFormat; + toJSON(): Excel.Interfaces.ChartPlotAreaFormatData; + } + /** + * + * Manages sorting operations on Range objects. + * + * [Api set: ExcelApi 1.2] + */ + class RangeSort extends OfficeExtension.ClientObject { + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Optional. Whether to have the casing impact string ordering. + * @param hasHeaders Optional. Whether the range has a header. + * @param orientation Optional. Whether the operation is sorting rows or columns. + * @param method Optional. The ordering method used for Chinese characters. + */ + apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: Excel.SortOrientation, method?: Excel.SortMethod): void; + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Optional. Whether to have the casing impact string ordering. + * @param hasHeaders Optional. Whether the range has a header. + * @param orientation Optional. Whether the operation is sorting rows or columns. + * @param method Optional. The ordering method used for Chinese characters. + */ + apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: "Rows" | "Columns", method?: "PinYin" | "StrokeCount"): void; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Manages sorting operations on Table objects. + * + * [Api set: ExcelApi 1.2] + */ + class TableSort extends OfficeExtension.ClientObject { + /** + * + * Represents the current conditions used to last sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly fields: Excel.SortField[]; + /** + * + * Represents whether the casing impacted the last sort of the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly matchCase: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly method: Excel.SortMethod | "PinYin" | "StrokeCount"; + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Optional. Whether to have the casing impact string ordering. + * @param method Optional. The ordering method used for Chinese characters. + */ + apply(fields: Excel.SortField[], matchCase?: boolean, method?: Excel.SortMethod): void; + /** + * + * Perform a sort operation. + * + * [Api set: ExcelApi 1.2] + * + * @param fields The list of conditions to sort on. + * @param matchCase Optional. Whether to have the casing impact string ordering. + * @param method Optional. The ordering method used for Chinese characters. + */ + apply(fields: Excel.SortField[], matchCase?: boolean, method?: "PinYin" | "StrokeCount"): void; + /** + * + * Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + * + * [Api set: ExcelApi 1.2] + */ + clear(): void; + /** + * + * Reapplies the current sorting parameters to the table. + * + * [Api set: ExcelApi 1.2] + */ + reapply(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableSort` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableSort` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableSort` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; + load(option?: string | string[]): Excel.TableSort; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableSort; + toJSON(): Excel.Interfaces.TableSortData; + } + /** + * + * Represents a condition in a sorting operation. + * + * [Api set: ExcelApi 1.2] + */ + interface SortField { + /** + * + * Represents whether the sorting is done in an ascending fashion. + * + * [Api set: ExcelApi 1.2] + */ + ascending?: boolean; + /** + * + * Represents the color that is the target of the condition if the sorting is on font or cell color. + * + * [Api set: ExcelApi 1.2] + */ + color?: string; + /** + * + * Represents additional sorting options for this field. + * + * [Api set: ExcelApi 1.2] + */ + dataOption?: Excel.SortDataOption | "Normal" | "TextAsNumber"; + /** + * + * Represents the icon that is the target of the condition if the sorting is on the cell's icon. + * + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * + * Represents the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). + * + * [Api set: ExcelApi 1.2] + */ + key: number; + /** + * + * Represents the type of sorting of this condition. + * + * [Api set: ExcelApi 1.2] + */ + sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; + } + /** + * + * Manages the filtering of a table's column. + * + * [Api set: ExcelApi 1.2] + */ + class Filter extends OfficeExtension.ClientObject { + /** + * + * The currently applied filter on the given column. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + readonly criteria: Excel.FilterCriteria; + /** + * + * Apply the given filter criteria on the given column. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria The criteria to apply. + */ + apply(criteria: Excel.FilterCriteria): void; + /** + * + * Apply a "Bottom Item" filter to the column for the given number of elements. + * + * [Api set: ExcelApi 1.2] + * + * @param count The number of elements from the bottom to show. + */ + applyBottomItemsFilter(count: number): void; + /** + * + * Apply a "Bottom Percent" filter to the column for the given percentage of elements. + * + * [Api set: ExcelApi 1.2] + * + * @param percent The percentage of elements from the bottom to show. + */ + applyBottomPercentFilter(percent: number): void; + /** + * + * Apply a "Cell Color" filter to the column for the given color. + * + * [Api set: ExcelApi 1.2] + * + * @param color The background color of the cells to show. + */ + applyCellColorFilter(color: string): void; + /** + * + * Apply an "Icon" filter to the column for the given criteria strings. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria1 The first criteria string. + * @param criteria2 Optional. The second criteria string. + * @param oper Optional. The operator that describes how the two criteria are joined. + */ + applyCustomFilter(criteria1: string, criteria2?: string, oper?: Excel.FilterOperator): void; + /** + * + * Apply an "Icon" filter to the column for the given criteria strings. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria1 The first criteria string. + * @param criteria2 Optional. The second criteria string. + * @param oper Optional. The operator that describes how the two criteria are joined. + */ + applyCustomFilter(criteria1: string, criteria2?: string, oper?: "And" | "Or"): void; + /** + * + * Apply a "Dynamic" filter to the column. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria The dynamic criteria to apply. + */ + applyDynamicFilter(criteria: Excel.DynamicFilterCriteria): void; + /** + * + * Apply a "Dynamic" filter to the column. + * + * [Api set: ExcelApi 1.2] + * + * @param criteria The dynamic criteria to apply. + */ + applyDynamicFilter(criteria: "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" | "AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" | "AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodSeptember" | "BelowAverage" | "LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear" | "Today" | "Tomorrow" | "YearToDate" | "Yesterday"): void; + /** + * + * Apply a "Font Color" filter to the column for the given color. + * + * [Api set: ExcelApi 1.2] + * + * @param color The font color of the cells to show. + */ + applyFontColorFilter(color: string): void; + /** + * + * Apply an "Icon" filter to the column for the given icon. + * + * [Api set: ExcelApi 1.2] + * + * @param icon The icons of the cells to show. + */ + applyIconFilter(icon: Excel.Icon): void; + /** + * + * Apply a "Top Item" filter to the column for the given number of elements. + * + * [Api set: ExcelApi 1.2] + * + * @param count The number of elements from the top to show. + */ + applyTopItemsFilter(count: number): void; + /** + * + * Apply a "Top Percent" filter to the column for the given percentage of elements. + * + * [Api set: ExcelApi 1.2] + * + * @param percent The percentage of elements from the top to show. + */ + applyTopPercentFilter(percent: number): void; + /** + * + * Apply a "Values" filter to the column for the given values. + * + * [Api set: ExcelApi 1.2] + * + * @param values The list of values to show. This must be an array of strings or an array of Excel.FilterDateTime objects. + */ + applyValuesFilter(values: Array): void; + /** + * + * Clear the filter on the given column. + * + * [Api set: ExcelApi 1.2] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Filter` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Filter` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Filter` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; + load(option?: string | string[]): Excel.Filter; + load(option?: { + select?: string; + expand?: string; + }): Excel.Filter; + toJSON(): Excel.Interfaces.FilterData; + } + /** + * + * Represents the filtering criteria applied to a column. + * + * [Api set: ExcelApi 1.2] + */ + interface FilterCriteria { + /** + * + * The HTML color string used to filter cells. Used with "cellColor" and "fontColor" filtering. + * + * [Api set: ExcelApi 1.2] + */ + color?: string; + /** + * + * The first criterion used to filter data. Used as an operator in the case of "custom" filtering. + For example ">50" for number greater than 50 or "=*s" for values ending in "s". + + Used as a number in the case of top/bottom items/percents. E.g. "5" for the top 5 items if filterOn is set to "topItems" + * + * [Api set: ExcelApi 1.2] + */ + criterion1?: string; + /** + * + * The second criterion used to filter data. Only used as an operator in the case of "custom" filtering. + * + * [Api set: ExcelApi 1.2] + */ + criterion2?: string; + /** + * + * The dynamic criteria from the Excel.DynamicFilterCriteria set to apply on this column. Used with "dynamic" filtering. + * + * [Api set: ExcelApi 1.2] + */ + dynamicCriteria?: Excel.DynamicFilterCriteria | "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" | "AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary" | "AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" | "AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodSeptember" | "BelowAverage" | "LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear" | "Today" | "Tomorrow" | "YearToDate" | "Yesterday"; + /** + * + * The property used by the filter to determine whether the values should stay visible. + * + * [Api set: ExcelApi 1.2] + */ + filterOn: Excel.FilterOn | "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" | "FontColor" | "Values" | "TopItems" | "TopPercent" | "Icon" | "Custom"; + /** + * + * The icon used to filter cells. Used with "icon" filtering. + * + * [Api set: ExcelApi 1.2] + */ + icon?: Excel.Icon; + /** + * + * The operator used to combine criterion 1 and 2 when using "custom" filtering. + * + * [Api set: ExcelApi 1.2] + */ + operator?: Excel.FilterOperator | "And" | "Or"; + /** + * + * The set of values to be used as part of "values" filtering. + * + * [Api set: ExcelApi 1.2] + */ + values?: Array; + } + /** + * + * Represents how to filter a date when filtering on values. + * + * [Api set: ExcelApi 1.2] + */ + interface FilterDatetime { + /** + * + * The date in ISO8601 format used to filter data. + * + * [Api set: ExcelApi 1.2] + */ + date: string; + /** + * + * How specific the date should be used to keep data. For example, if the date is 2005-04-02 and the specifity is set to "month", the filter operation will keep all rows with a date in the month of april 2009. + * + * [Api set: ExcelApi 1.2] + */ + specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; + } + /** + * + * Represents a cell icon. + * + * [Api set: ExcelApi 1.2] + */ + interface Icon { + /** + * + * Represents the index of the icon in the given set. + * + * [Api set: ExcelApi 1.2] + */ + index: number; + /** + * + * Represents the set that the icon is part of. + * + * [Api set: ExcelApi 1.2] + */ + set: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + } + /** + * + * A scoped collection of custom XML parts. + A scoped collection is the result of some operation, e.g. filtering by namespace. + A scoped collection cannot be scoped any further. + * + * [Api set: ExcelApi 1.5] + */ + class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.CustomXmlPart[]; + /** + * + * Gets the number of CustomXML parts in this collection. + * + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom XML part based on its ID. + * + * [Api set: ExcelApi 1.5] + * + * @param id ID of the object to be retrieved. + */ + getItem(id: string): Excel.CustomXmlPart; + /** + * + * Gets a custom XML part based on its ID. + If the CustomXmlPart does not exist, the return object's isNull property will be true. + * + * [Api set: ExcelApi 1.5] + * + * @param id ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Excel.CustomXmlPart; + /** + * + * If the collection contains exactly one item, this method returns it. + Otherwise, this method produces an error. + * + * [Api set: ExcelApi 1.5] + */ + getOnlyItem(): Excel.CustomXmlPart; + /** + * + * If the collection contains exactly one item, this method returns it. + Otherwise, this method returns Null. + * + * [Api set: ExcelApi 1.5] + */ + getOnlyItemOrNullObject(): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomXmlPartScopedCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomXmlPartScopedCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomXmlPartScopedCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; + load(option?: string | string[]): Excel.CustomXmlPartScopedCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; + toJSON(): Excel.Interfaces.CustomXmlPartScopedCollectionData; + } + /** + * + * A collection of custom XML parts. + * + * [Api set: ExcelApi 1.5] + */ + class CustomXmlPartCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.CustomXmlPart[]; + /** + * + * Adds a new custom XML part to the workbook. + * + * [Api set: ExcelApi 1.5] + * + * @param xml XML content. Must be a valid XML fragment. + */ + add(xml: string): Excel.CustomXmlPart; + /** + * + * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. + * + * [Api set: ExcelApi 1.5] + * + * @param namespaceUri This must be a fully qualified schema URI; for example, "http://schemas.contoso.com/review/1.0". + */ + getByNamespace(namespaceUri: string): Excel.CustomXmlPartScopedCollection; + /** + * + * Gets the number of CustomXml parts in the collection. + * + * [Api set: ExcelApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom XML part based on its ID. + * + * [Api set: ExcelApi 1.5] + * + * @param id ID of the object to be retrieved. + */ + getItem(id: string): Excel.CustomXmlPart; + /** + * + * Gets a custom XML part based on its ID. + If the CustomXmlPart does not exist, the return object's isNull property will be true. + * + * [Api set: ExcelApi 1.5] + * + * @param id ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Excel.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomXmlPartCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomXmlPartCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomXmlPartCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; + load(option?: string | string[]): Excel.CustomXmlPartCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; + toJSON(): Excel.Interfaces.CustomXmlPartCollectionData; + } + /** + * + * Represents a custom XML part object in a workbook. + * + * [Api set: ExcelApi 1.5] + */ + class CustomXmlPart extends OfficeExtension.ClientObject { + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + readonly namespaceUri: string; + /** + * + * Deletes the custom XML part. + * + * [Api set: ExcelApi 1.5] + */ + delete(): void; + /** + * + * Gets the custom XML part's full XML content. + * + * [Api set: ExcelApi 1.5] + */ + getXml(): OfficeExtension.ClientResult; + /** + * + * Sets the custom XML part's full XML content. + * + * [Api set: ExcelApi 1.5] + * + * @param xml XML content for the part. + */ + setXml(xml: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomXmlPart` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomXmlPart` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomXmlPart` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; + load(option?: string | string[]): Excel.CustomXmlPart; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomXmlPart; + toJSON(): Excel.Interfaces.CustomXmlPartData; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.3] + */ + class PivotTableCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.PivotTable[]; + /** + * + * Add a Pivottable based on the specified source data and insert it at the top left cell of the destination range. + * + * [Api set: ExcelApi 1.8] + * + * @param name The name of the new PivotTable. + * @param source The source data for the new PivotTable, this can either be a range (or string address including the worksheet name) or a table. + * @param destination The cell in the upper-left corner of the PivotTable report's destination range (the range on the worksheet where the resulting report will be placed). + * @returns Returns the newly inserted PivotTable. + */ + add(name: string, source: Range | string | Table, destination: Range | string): Excel.PivotTable; + /** + * + * Gets the number of pivot tables in the collection. + * + * [Api set: ExcelApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a PivotTable by name. + * + * [Api set: ExcelApi 1.3] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.PivotTable; + /** + * + * Gets a PivotTable by name. If the PivotTable does not exist, will return a null object. + * + * [Api set: ExcelApi 1.4] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotTable; + /** + * + * Refreshes all the pivot tables in the collection. + * + * [Api set: ExcelApi 1.3] + */ + refreshAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotTableCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotTableCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotTableCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; + load(option?: string | string[]): Excel.PivotTableCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotTableCollection; + toJSON(): Excel.Interfaces.PivotTableCollectionData; + } + /** + * + * Represents an Excel PivotTable. + * + * [Api set: ExcelApi 1.3] + * + * @remarks + * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | how-to guide on working with PivotTables} has detailed walkthroughs, images, and code samples. + */ + class PivotTable extends OfficeExtension.ClientObject { + /** + * + * The Column Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly columnHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * + * The Data Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly dataHierarchies: Excel.DataPivotHierarchyCollection; + /** + * + * The Filter Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly filterHierarchies: Excel.FilterPivotHierarchyCollection; + /** + * + * The Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly hierarchies: Excel.PivotHierarchyCollection; + /** + * + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly layout: Excel.PivotLayout; + /** + * + * The Row Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + readonly rowHierarchies: Excel.RowColumnPivotHierarchyCollection; + /** + * + * The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Id of the PivotTable. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + readonly id: string; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PivotTable): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PivotTableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotTable): void; + /** + * + * Deletes the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + delete(): void; + /** + * + * Refreshes the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + refresh(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotTable` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotTable` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotTable` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; + load(option?: string | string[]): Excel.PivotTable; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotTable; + toJSON(): Excel.Interfaces.PivotTableData; + } + /** + * + * Represents the visual layout of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + class PivotLayout extends OfficeExtension.ClientObject { + /** + * + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + layoutType: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if the PivotTable report shows grand totals for columns. + * + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals: boolean; + /** + * + * True if the PivotTable report shows grand totals for rows. + * + * [Api set: ExcelApi 1.8] + */ + showRowGrandTotals: boolean; + /** + * + * This property indicates the SubtotalLocationType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + subtotalLocation: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PivotLayout): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PivotLayoutUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotLayout): void; + /** + * + * Returns the range where the PivotTable's column labels reside. + * + * [Api set: ExcelApi 1.8] + */ + getColumnLabelRange(): Excel.Range; + /** + * + * Returns the range where the PivotTable's data values reside. + * + * [Api set: ExcelApi 1.8] + */ + getDataBodyRange(): Excel.Range; + /** + * + * Returns the range of the PivotTable's filter area. + * + * [Api set: ExcelApi 1.8] + */ + getFilterAxisRange(): Excel.Range; + /** + * + * Returns the range the PivotTable exists on, excluding the filter area. + * + * [Api set: ExcelApi 1.8] + */ + getRange(): Excel.Range; + /** + * + * Returns the range where the PivotTable's row labels reside. + * + * [Api set: ExcelApi 1.8] + */ + getRowLabelRange(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotLayout` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotLayout` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotLayout` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotLayoutLoadOptions): Excel.PivotLayout; + load(option?: string | string[]): Excel.PivotLayout; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotLayout; + toJSON(): Excel.Interfaces.PivotLayoutData; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.8] + */ + class PivotHierarchyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.PivotHierarchy[]; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a PivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.PivotHierarchy; + /** + * + * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotHierarchy; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotHierarchyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotHierarchyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotHierarchyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotHierarchyCollection; + load(option?: string | string[]): Excel.PivotHierarchyCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotHierarchyCollection; + toJSON(): Excel.Interfaces.PivotHierarchyCollectionData; + } + /** + * + * Represents the Excel PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + class PivotHierarchy extends OfficeExtension.ClientObject { + /** + * + * Returns the PivotFields associated with the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * + * Id of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Name of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PivotHierarchy): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotHierarchy): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotHierarchy` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotHierarchy` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotHierarchy` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotHierarchyLoadOptions): Excel.PivotHierarchy; + load(option?: string | string[]): Excel.PivotHierarchy; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotHierarchy; + toJSON(): Excel.Interfaces.PivotHierarchyData; + } + /** + * + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + class RowColumnPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.RowColumnPivotHierarchy[]; + /** + * + * Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, + or filter axis, it will be removed from that location. + * + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.RowColumnPivotHierarchy; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a RowColumnPivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.RowColumnPivotHierarchy; + /** + * + * Gets a RowColumnPivotHierarchy by name. If the RowColumnPivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the RowColumnPivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.RowColumnPivotHierarchy; + /** + * + * Removes the PivotHierarchy from the current axis. + * + * [Api set: ExcelApi 1.8] + */ + remove(rowColumnPivotHierarchy: Excel.RowColumnPivotHierarchy): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RowColumnPivotHierarchyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RowColumnPivotHierarchyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RowColumnPivotHierarchyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RowColumnPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RowColumnPivotHierarchyCollection; + load(option?: string | string[]): Excel.RowColumnPivotHierarchyCollection; + load(option?: OfficeExtension.LoadOption): Excel.RowColumnPivotHierarchyCollection; + toJSON(): Excel.Interfaces.RowColumnPivotHierarchyCollectionData; + } + /** + * + * Represents the Excel RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + class RowColumnPivotHierarchy extends OfficeExtension.ClientObject { + /** + * + * Returns the PivotFields associated with the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * + * Id of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Name of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * + * Position of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RowColumnPivotHierarchy): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RowColumnPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RowColumnPivotHierarchy): void; + /** + * + * Reset the RowColumnPivotHierarchy back to its default values. + * + * [Api set: ExcelApi 1.8] + */ + setToDefault(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RowColumnPivotHierarchy` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RowColumnPivotHierarchy` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RowColumnPivotHierarchy` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RowColumnPivotHierarchyLoadOptions): Excel.RowColumnPivotHierarchy; + load(option?: string | string[]): Excel.RowColumnPivotHierarchy; + load(option?: { + select?: string; + expand?: string; + }): Excel.RowColumnPivotHierarchy; + toJSON(): Excel.Interfaces.RowColumnPivotHierarchyData; + } + /** + * + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + class FilterPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.FilterPivotHierarchy[]; + /** + * + * Adds the PivotHierarchy to the current axis. If the hierarchy is present elsewhere on the row, column, + or filter axis, it will be removed from that location. + * + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.FilterPivotHierarchy; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a FilterPivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.FilterPivotHierarchy; + /** + * + * Gets a FilterPivotHierarchy by name. If the FilterPivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the FilterPivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.FilterPivotHierarchy; + /** + * + * Removes the PivotHierarchy from the current axis. + * + * [Api set: ExcelApi 1.8] + */ + remove(filterPivotHierarchy: Excel.FilterPivotHierarchy): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.FilterPivotHierarchyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.FilterPivotHierarchyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.FilterPivotHierarchyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.FilterPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.FilterPivotHierarchyCollection; + load(option?: string | string[]): Excel.FilterPivotHierarchyCollection; + load(option?: OfficeExtension.LoadOption): Excel.FilterPivotHierarchyCollection; + toJSON(): Excel.Interfaces.FilterPivotHierarchyCollectionData; + } + /** + * + * Represents the Excel FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + class FilterPivotHierarchy extends OfficeExtension.ClientObject { + /** + * + * Returns the PivotFields associated with the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly fields: Excel.PivotFieldCollection; + /** + * + * Determines whether to allow multiple filter items. + * + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems: boolean; + /** + * + * Id of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Name of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * + * Position of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.FilterPivotHierarchy): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FilterPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.FilterPivotHierarchy): void; + /** + * + * Reset the FilterPivotHierarchy back to its default values. + * + * [Api set: ExcelApi 1.8] + */ + setToDefault(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.FilterPivotHierarchy` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.FilterPivotHierarchy` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.FilterPivotHierarchy` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.FilterPivotHierarchyLoadOptions): Excel.FilterPivotHierarchy; + load(option?: string | string[]): Excel.FilterPivotHierarchy; + load(option?: { + select?: string; + expand?: string; + }): Excel.FilterPivotHierarchy; + toJSON(): Excel.Interfaces.FilterPivotHierarchyData; + } + /** + * + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + class DataPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.DataPivotHierarchy[]; + /** + * + * Adds the PivotHierarchy to the current axis. + * + * [Api set: ExcelApi 1.8] + */ + add(pivotHierarchy: Excel.PivotHierarchy): Excel.DataPivotHierarchy; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a DataPivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.DataPivotHierarchy; + /** + * + * Gets a DataPivotHierarchy by name. If the DataPivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the DataPivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.DataPivotHierarchy; + /** + * + * Removes the PivotHierarchy from the current axis. + * + * [Api set: ExcelApi 1.8] + */ + remove(DataPivotHierarchy: Excel.DataPivotHierarchy): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.DataPivotHierarchyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.DataPivotHierarchyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.DataPivotHierarchyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.DataPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DataPivotHierarchyCollection; + load(option?: string | string[]): Excel.DataPivotHierarchyCollection; + load(option?: OfficeExtension.LoadOption): Excel.DataPivotHierarchyCollection; + toJSON(): Excel.Interfaces.DataPivotHierarchyCollectionData; + } + /** + * + * Represents the Excel DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + class DataPivotHierarchy extends OfficeExtension.ClientObject { + /** + * + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly field: Excel.PivotField; + /** + * + * Id of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Name of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * + * Number format of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat: string; + /** + * + * Position of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position: number; + /** + * + * Determines whether the data should be sown as a specific summary calculation or not. + * + * [Api set: ExcelApi 1.8] + */ + showAs: Excel.ShowAsRule; + /** + * + * Determines whether to show all items of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + summarizeBy: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.DataPivotHierarchy): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DataPivotHierarchyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.DataPivotHierarchy): void; + /** + * + * Reset the DataPivotHierarchy back to its default values. + * + * [Api set: ExcelApi 1.8] + */ + setToDefault(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.DataPivotHierarchy` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.DataPivotHierarchy` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.DataPivotHierarchy` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.DataPivotHierarchyLoadOptions): Excel.DataPivotHierarchy; + load(option?: string | string[]): Excel.DataPivotHierarchy; + load(option?: { + select?: string; + expand?: string; + }): Excel.DataPivotHierarchy; + toJSON(): Excel.Interfaces.DataPivotHierarchyData; + } + /** + * [Api set: ExcelApi 1.8] + */ + interface ShowAsRule { + /** + * + * The Base PivotField to base the ShowAs calculation, if applicable based on the ShowAsCalculation type, else null. + * + * [Api set: ExcelApi 1.8] + */ + baseField?: Excel.PivotField; + /** + * + * The Base Item to base the ShowAs calculation on, if applicable based on the ShowAsCalculation type, else null. + * + * [Api set: ExcelApi 1.8] + */ + baseItem?: Excel.PivotItem; + /** + * + * The ShowAs Calculation to use for the Data PivotField. See Excel.ShowAsCalculation for Details. + * + * [Api set: ExcelApi 1.8] + */ + calculation: Excel.ShowAsCalculation | "Unknown" | "None" | "PercentOfGrandTotal" | "PercentOfRowTotal" | "PercentOfColumnTotal" | "PercentOfParentRowTotal" | "PercentOfParentColumnTotal" | "PercentOfParentTotal" | "PercentOf" | "RunningTotal" | "PercentRunningTotal" | "DifferenceFrom" | "PercentDifferenceFrom" | "RankAscending" | "RankDecending" | "Index"; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.8] + */ + class PivotFieldCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.PivotField[]; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a PivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.PivotField; + /** + * + * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotField; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotFieldCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotFieldCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotFieldCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotFieldCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotFieldCollection; + load(option?: string | string[]): Excel.PivotFieldCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotFieldCollection; + toJSON(): Excel.Interfaces.PivotFieldCollectionData; + } + /** + * + * Represents the Excel PivotField. + * + * [Api set: ExcelApi 1.8] + */ + class PivotField extends OfficeExtension.ClientObject { + /** + * + * Returns the PivotFields associated with the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + readonly items: Excel.PivotItemCollection; + /** + * + * Id of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Name of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * + * Determines whether to show all items of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + showAllItems: boolean; + /** + * + * Subtotals of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + subtotals: Excel.Subtotals; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PivotField): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PivotFieldUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotField): void; + /** + * + * Sorts the PivotField. If a DataPivotHierarchy is specified, then sort will be applied based on it, if not sort will be based on the PivotField itself. + * + * [Api set: ExcelApi 1.8] + * + * @param sortby Represents whether the sorting is done in an ascending or descending order. + */ + sortByLabels(sortby: Excel.SortBy): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotField` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotField` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotField` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotFieldLoadOptions): Excel.PivotField; + load(option?: string | string[]): Excel.PivotField; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotField; + toJSON(): Excel.Interfaces.PivotFieldData; + } + /** + * + * Represents a collection of all the Pivot Items related to their parent PivotField. + * + * [Api set: ExcelApi 1.8] + */ + class PivotItemCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.PivotItem[]; + /** + * + * Gets the number of pivot hierarchies in the collection. + * + * [Api set: ExcelApi 1.8] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a PivotHierarchy by its name or id. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotTable to be retrieved. + */ + getItem(name: string): Excel.PivotItem; + /** + * + * Gets a PivotHierarchy by name. If the PivotHierarchy does not exist, will return a null object. + * + * [Api set: ExcelApi 1.8] + * + * @param name Name of the PivotHierarchy to be retrieved. + */ + getItemOrNullObject(name: string): Excel.PivotItem; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotItemCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotItemCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotItemCollection; + load(option?: string | string[]): Excel.PivotItemCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotItemCollection; + toJSON(): Excel.Interfaces.PivotItemCollectionData; + } + /** + * + * Represents the Excel PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + class PivotItem extends OfficeExtension.ClientObject { + /** + * + * Id of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + readonly id: string; + /** + * + * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. + * + * [Api set: ExcelApi 1.8] + */ + isExpanded: boolean; + /** + * + * Name of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + name: string; + /** + * + * Determines whether the PivotItem is visible or not. + * + * [Api set: ExcelApi 1.8] + */ + visible: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PivotItem): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PivotItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PivotItem): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PivotItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PivotItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PivotItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PivotItemLoadOptions): Excel.PivotItem; + load(option?: string | string[]): Excel.PivotItem; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotItem; + toJSON(): Excel.Interfaces.PivotItemData; + } + /** + * + * Subtotals for the Pivot Field. + * + * [Api set: ExcelApi 1.8] + */ + interface Subtotals { + /** + * + * If Automatic is set to true, then all other values will be ignored when setting the Subtotals. + * + * [Api set: ExcelApi 1.8] + */ + automatic?: boolean; + average?: boolean; + count?: boolean; + countNumbers?: boolean; + max?: boolean; + min?: boolean; + product?: boolean; + standardDeviation?: boolean; + standardDeviationP?: boolean; + sum?: boolean; + variance?: boolean; + varianceP?: boolean; + } + /** + * + * Represents the sort direction. + * + * [Api set: ExcelApi 1.8] + */ + enum SortBy { + /** + * + * Ascending sort. Smallest to largest or A to Z. + * + */ + ascending = "Ascending", + /** + * + * Descending sort. Largest to smallest or Z to A. + * + */ + descending = "Descending", + } + /** + * + * Aggregation Function for the Data Pivot Field. + * + * [Api set: ExcelApi 1.8] + */ + enum AggregationFunction { + /** + * + * Aggregation function is unknown or unsupported. + * + */ + unknown = "Unknown", + /** + * + * Excel will automatically select the aggregation based on the data items. + * + */ + automatic = "Automatic", + /** + * + * Aggregate using the sum of the data, equivalent to the SUM function. + * + */ + sum = "Sum", + /** + * + * Aggregate using the count of items in the data, equivalent to the COUNTA function. + * + */ + count = "Count", + /** + * + * Aggregate using the average of the data, equivalent to the AVERAGE function. + * + */ + average = "Average", + /** + * + * Aggregate using the maximum value of the data, equivalent to the MAX function. + * + */ + max = "Max", + /** + * + * Aggregate using the minimum value of the data, equivalent to the MIN function. + * + */ + min = "Min", + /** + * + * Aggregate using the product of the data, equivalent to the PRODUCT function. + * + */ + product = "Product", + /** + * + * Aggregate using the count of numbers in the data, equivalent to the COUNTA function. + * + */ + countNumbers = "CountNumbers", + /** + * + * Aggregate using the standard deviation of the data, equivalent to the STDEV function. + * + */ + standardDeviation = "StandardDeviation", + /** + * + * Aggregate using the standard deviation of the data, equivalent to the STDEVP function. + * + */ + standardDeviationP = "StandardDeviationP", + /** + * + * Aggregate using the variance of the data, equivalent to the VAR function. + * + */ + variance = "Variance", + /** + * + * Aggregate using the variance of the data, equivalent to the VARP function. + * + */ + varianceP = "VarianceP", + } + /** + * + * The ShowAs Calculation function for the Data Pivot Field. + * + * [Api set: ExcelApi 1.8] + */ + enum ShowAsCalculation { + /** + * + * Calculation is unknown or unsupported. + * + */ + unknown = "Unknown", + /** + * + * No calculation is applied. + * + */ + none = "None", + /** + * + * Percent of the grand total. + * + */ + percentOfGrandTotal = "PercentOfGrandTotal", + /** + * + * Percent of the row total. + * + */ + percentOfRowTotal = "PercentOfRowTotal", + /** + * + * Percent of the column total. + * + */ + percentOfColumnTotal = "PercentOfColumnTotal", + /** + * + * Percent of the row total for the specified Base Field. + * + */ + percentOfParentRowTotal = "PercentOfParentRowTotal", + /** + * + * Percent of the column total for the specified Base Field. + * + */ + percentOfParentColumnTotal = "PercentOfParentColumnTotal", + /** + * + * Percent of the grand total for the specified Base Field. + * + */ + percentOfParentTotal = "PercentOfParentTotal", + /** + * + * Percent of the specified Base Field and Base Item. + * + */ + percentOf = "PercentOf", + /** + * + * Running Total of the specified Base Field. + * + */ + runningTotal = "RunningTotal", + /** + * + * Percent Running Total of the specified Base Field. + * + */ + percentRunningTotal = "PercentRunningTotal", + /** + * + * Difference from the specified Base Field and Base Item. + * + */ + differenceFrom = "DifferenceFrom", + /** + * + * Difference from the specified Base Field and Base Item. + * + */ + percentDifferenceFrom = "PercentDifferenceFrom", + /** + * + * Ascending Rank of the specified Base Field. + * + */ + rankAscending = "RankAscending", + /** + * + * Descending Rank of the specified Base Field. + * + */ + rankDecending = "RankDecending", + /** + * + * Calculates the values as follows: + ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) + * + */ + index = "Index", + } + /** + * + * Represents workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + class DocumentProperties extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of custom properties of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly custom: Excel.CustomPropertyCollection; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company: string; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly creationDate: Date; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords: string; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly lastAuthor: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.DocumentProperties): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.DocumentProperties): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.DocumentProperties` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.DocumentProperties` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.DocumentProperties` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.DocumentPropertiesLoadOptions): Excel.DocumentProperties; + load(option?: string | string[]): Excel.DocumentProperties; + load(option?: { + select?: string; + expand?: string; + }): Excel.DocumentProperties; + toJSON(): Excel.Interfaces.DocumentPropertiesData; + } + /** + * + * Represents a custom property. + * + * [Api set: ExcelApi 1.7] + */ + class CustomProperty extends OfficeExtension.ClientObject { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly key: string; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + readonly type: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.CustomProperty): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CustomProperty): void; + /** + * + * Deletes the custom property. + * + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomProperty` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomProperty` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomProperty` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomPropertyLoadOptions): Excel.CustomProperty; + load(option?: string | string[]): Excel.CustomProperty; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomProperty; + toJSON(): Excel.Interfaces.CustomPropertyData; + } + /** + * + * Contains the collection of customProperty objects. + * + * [Api set: ExcelApi 1.7] + */ + class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.CustomProperty[]; + /** + * + * Creates a new or sets an existing custom property. + * + * [Api set: ExcelApi 1.7] + * + * @param key Required. The custom property's key, which is case-insensitive. + * @param value Required. The custom property's value. + */ + add(key: string, value: any): Excel.CustomProperty; + /** + * + * Deletes all custom properties in this collection. + * + * [Api set: ExcelApi 1.7] + */ + deleteAll(): void; + /** + * + * Gets the count of custom properties. + * + * [Api set: ExcelApi 1.7] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. + * + * [Api set: ExcelApi 1.7] + * + * @param key The key that identifies the custom property object. + */ + getItem(key: string): Excel.CustomProperty; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. + * + * [Api set: ExcelApi 1.7] + * + * @param key Required. The key that identifies the custom property object. + */ + getItemOrNullObject(key: string): Excel.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomPropertyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomPropertyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomPropertyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; + load(option?: string | string[]): Excel.CustomPropertyCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomPropertyCollection; + toJSON(): Excel.Interfaces.CustomPropertyCollectionData; + } + /** + * + * Represents a collection of all the conditional formats that are overlap the range. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalFormatCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ConditionalFormat[]; + /** + * + * Adds a new conditional format to the collection at the first/top priority. + * + * [Api set: ExcelApi 1.6] + * + * @param type The type of conditional format being added. See Excel.ConditionalFormatType for details. + */ + add(type: Excel.ConditionalFormatType): Excel.ConditionalFormat; + /** + * + * Adds a new conditional format to the collection at the first/top priority. + * + * [Api set: ExcelApi 1.6] + * + * @param type The type of conditional format being added. See Excel.ConditionalFormatType for details. + */ + add(type: "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"): Excel.ConditionalFormat; + /** + * + * Clears all conditional formats active on the current specified range. + * + * [Api set: ExcelApi 1.6] + */ + clearAll(): void; + /** + * + * Returns the number of conditional formats in the workbook. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a conditional format for the given ID. + * + * [Api set: ExcelApi 1.6] + * + * @param id The id of the conditional format. + * @returns Conditional Format object. + */ + getItem(id: string): Excel.ConditionalFormat; + /** + * + * Returns a conditional format at the given index. + * + * [Api set: ExcelApi 1.6] + * + * @param index Index of the conditional formats to be retrieved. + */ + getItemAt(index: number): Excel.ConditionalFormat; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalFormatCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalFormatCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalFormatCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; + load(option?: string | string[]): Excel.ConditionalFormatCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; + toJSON(): Excel.Interfaces.ConditionalFormatCollectionData; + } + /** + * + * An object encapsulating a conditional format's range, format, rule, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly cellValue: Excel.CellValueConditionalFormat; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly colorScale: Excel.ColorScaleConditionalFormat; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly custom: Excel.CustomConditionalFormat; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly customOrNullObject: Excel.CustomConditionalFormat; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly dataBar: Excel.DataBarConditionalFormat; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly iconSet: Excel.IconSetConditionalFormat; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + readonly preset: Excel.PresetCriteriaConditionalFormat; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + readonly presetOrNullObject: Excel.PresetCriteriaConditionalFormat; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly textComparison: Excel.TextConditionalFormat; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly textComparisonOrNullObject: Excel.TextConditionalFormat; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly topBottom: Excel.TopBottomConditionalFormat; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly id: string; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + priority: number; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly type: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalFormat): void; + /** + * + * Deletes this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + delete(): void; + /** + * + * Returns the range the conditonal format is applied to. Throws an error if the conditional format is applied to multiple ranges. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + getRange(): Excel.Range; + /** + * + * Returns the range the conditonal format is applied to, or a null object if the conditional format is applied to multiple ranges. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + getRangeOrNullObject(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; + load(option?: string | string[]): Excel.ConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormat; + toJSON(): Excel.Interfaces.ConditionalFormatData; + } + /** + * + * Represents an Excel Conditional Data Bar Type. + * + * [Api set: ExcelApi 1.6] + */ + class DataBarConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Representation of all values to the left of the axis in an Excel data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor: string; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule: Excel.ConditionalDataBarRule; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule: Excel.ConditionalDataBarRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.DataBarConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DataBarConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.DataBarConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.DataBarConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.DataBarConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.DataBarConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; + load(option?: string | string[]): Excel.DataBarConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.DataBarConditionalFormat; + toJSON(): Excel.Interfaces.DataBarConditionalFormatData; + } + /** + * + * Represents a conditional format DataBar Format for the positive side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalDataBarPositiveFormat extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalDataBarPositiveFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalDataBarPositiveFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalDataBarPositiveFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalDataBarPositiveFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalDataBarPositiveFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalDataBarPositiveFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; + load(option?: string | string[]): Excel.ConditionalDataBarPositiveFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarPositiveFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarPositiveFormatData; + } + /** + * + * Represents a conditional format DataBar Format for the negative side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalDataBarNegativeFormat extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor: string; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalDataBarNegativeFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalDataBarNegativeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalDataBarNegativeFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalDataBarNegativeFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalDataBarNegativeFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalDataBarNegativeFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; + load(option?: string | string[]): Excel.ConditionalDataBarNegativeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarNegativeFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarNegativeFormatData; + } + /** + * + * Represents a rule-type for a Data Bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarRule { + /** + * + * The formula, if required, to evaluate the databar rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * The type of rule for the databar. + * + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatRuleType | "Invalid" | "Automatic" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * + * Represents a custom conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + class CustomConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * + * Represents the Rule object on this conditional format. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly rule: Excel.ConditionalFormatRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.CustomConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CustomConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CustomConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CustomConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CustomConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CustomConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; + load(option?: string | string[]): Excel.CustomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomConditionalFormat; + toJSON(): Excel.Interfaces.CustomConditionalFormatData; + } + /** + * + * Represents a rule, for all traditional rule/format pairings. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalFormatRule extends OfficeExtension.ClientObject { + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalFormatRule): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalFormatRuleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalFormatRule): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalFormatRule` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalFormatRule` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalFormatRule` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; + load(option?: string | string[]): Excel.ConditionalFormatRule; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormatRule; + toJSON(): Excel.Interfaces.ConditionalFormatRuleData; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + class IconSetConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria: Excel.ConditionalIconCriterion[]; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.IconSetConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.IconSetConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.IconSetConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.IconSetConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.IconSetConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.IconSetConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; + load(option?: string | string[]): Excel.IconSetConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.IconSetConditionalFormat; + toJSON(): Excel.Interfaces.IconSetConditionalFormatData; + } + /** + * + * Represents an Icon Criterion which contains a type, value, an Operator, and an optional custom icon, if not using an iconset. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalIconCriterion { + /** + * + * The custom icon for the current criterion if different from the default IconSet, else null will be returned. + * + * [Api set: ExcelApi 1.6] + */ + customIcon?: Excel.Icon; + /** + * + * A number or a formula depending on the type. + * + * [Api set: ExcelApi 1.6] + */ + formula: string; + /** + * + * GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. + * + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalIconCriterionOperator | "Invalid" | "GreaterThan" | "GreaterThanOrEqual"; + /** + * + * What the icon conditional formula should be based on. + * + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatIconRuleType | "Invalid" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + class ColorScaleConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria: Excel.ConditionalColorScaleCriteria; + /** + * + * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). + * + * [Api set: ExcelApi 1.6] + */ + readonly threeColorScale: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ColorScaleConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ColorScaleConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ColorScaleConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ColorScaleConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ColorScaleConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ColorScaleConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; + load(option?: string | string[]): Excel.ColorScaleConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ColorScaleConditionalFormat; + toJSON(): Excel.Interfaces.ColorScaleConditionalFormatData; + } + /** + * + * Represents the criteria of the color scale. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriteria { + /** + * + * The maximum point Color Scale Criterion. + * + * [Api set: ExcelApi 1.6] + */ + maximum: Excel.ConditionalColorScaleCriterion; + /** + * + * The midpoint Color Scale Criterion if the color scale is a 3-color scale. + * + * [Api set: ExcelApi 1.6] + */ + midpoint?: Excel.ConditionalColorScaleCriterion; + /** + * + * The minimum point Color Scale Criterion. + * + * [Api set: ExcelApi 1.6] + */ + minimum: Excel.ConditionalColorScaleCriterion; + } + /** + * + * Represents a Color Scale Criterion which contains a type, value, and a color. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalColorScaleCriterion { + /** + * + * HTML color code representation of the color scale color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * A number, a formula, or null (if Type is LowestValue). + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * What the icon conditional formula should be based on. + * + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalFormatColorCriterionType | "Invalid" | "LowestValue" | "HighestValue" | "Number" | "Percent" | "Formula" | "Percentile"; + } + /** + * + * Represents a Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + class TopBottomConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule: Excel.ConditionalTopBottomRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TopBottomConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TopBottomConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TopBottomConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TopBottomConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TopBottomConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TopBottomConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; + load(option?: string | string[]): Excel.TopBottomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TopBottomConditionalFormat; + toJSON(): Excel.Interfaces.TopBottomConditionalFormatData; + } + /** + * + * Represents the rule of the top/bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTopBottomRule { + /** + * + * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. + * + * [Api set: ExcelApi 1.6] + */ + rank: number; + /** + * + * Format values based on the top or bottom rank. + * + * [Api set: ExcelApi 1.6] + */ + type: Excel.ConditionalTopBottomCriterionType | "Invalid" | "TopItems" | "TopPercent" | "BottomItems" | "BottomPercent"; + } + /** + * + * Represents the the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * [Api set: ExcelApi 1.6] + */ + class PresetCriteriaConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule: Excel.ConditionalPresetCriteriaRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PresetCriteriaConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PresetCriteriaConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PresetCriteriaConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PresetCriteriaConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PresetCriteriaConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PresetCriteriaConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; + load(option?: string | string[]): Excel.PresetCriteriaConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.PresetCriteriaConditionalFormat; + toJSON(): Excel.Interfaces.PresetCriteriaConditionalFormatData; + } + /** + * + * Represents the Preset Criteria Conditional Format Rule + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalPresetCriteriaRule { + /** + * + * The criterion of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + criterion: Excel.ConditionalFormatPresetCriterion | "Invalid" | "Blanks" | "NonBlanks" | "Errors" | "NonErrors" | "Yesterday" | "Today" | "Tomorrow" | "LastSevenDays" | "LastWeek" | "ThisWeek" | "NextWeek" | "LastMonth" | "ThisMonth" | "NextMonth" | "AboveAverage" | "BelowAverage" | "EqualOrAboveAverage" | "EqualOrBelowAverage" | "OneStdDevAboveAverage" | "OneStdDevBelowAverage" | "TwoStdDevAboveAverage" | "TwoStdDevBelowAverage" | "ThreeStdDevAboveAverage" | "ThreeStdDevBelowAverage" | "UniqueValues" | "DuplicateValues"; + } + /** + * + * Represents a specific text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + class TextConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule: Excel.ConditionalTextComparisonRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TextConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TextConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TextConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TextConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TextConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TextConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; + load(option?: string | string[]): Excel.TextConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TextConditionalFormat; + toJSON(): Excel.Interfaces.TextConditionalFormatData; + } + /** + * + * Represents a Cell Value Conditional Format Rule + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalTextComparisonRule { + /** + * + * The operator of the text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalTextOperator | "Invalid" | "Contains" | "NotContains" | "BeginsWith" | "EndsWith"; + /** + * + * The Text value of conditional format. + * + * [Api set: ExcelApi 1.6] + */ + text: string; + } + /** + * + * Represents a cell value conditional format. + * + * [Api set: ExcelApi 1.6] + */ + class CellValueConditionalFormat extends OfficeExtension.ClientObject { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + readonly format: Excel.ConditionalRangeFormat; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule: Excel.ConditionalCellValueRule; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.CellValueConditionalFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CellValueConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.CellValueConditionalFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CellValueConditionalFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CellValueConditionalFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CellValueConditionalFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; + load(option?: string | string[]): Excel.CellValueConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CellValueConditionalFormat; + toJSON(): Excel.Interfaces.CellValueConditionalFormatData; + } + /** + * + * Represents a cell value conditional format rule. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalCellValueRule { + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula1: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula2?: string; + /** + * + * The operator of the text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + operator: Excel.ConditionalCellValueOperator | "Invalid" | "Between" | "NotBetween" | "EqualTo" | "NotEqualTo" | "GreaterThan" | "LessThan" | "GreaterThanOrEqual" | "LessThanOrEqual"; + } + /** + * + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalRangeFormat extends OfficeExtension.ClientObject { + /** + * + * Collection of border objects that apply to the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly borders: Excel.ConditionalRangeBorderCollection; + /** + * + * Returns the fill object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly fill: Excel.ConditionalRangeFill; + /** + * + * Returns the font object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly font: Excel.ConditionalRangeFont; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalRangeFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalRangeFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalRangeFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalRangeFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; + load(option?: string | string[]): Excel.ConditionalRangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFormat; + toJSON(): Excel.Interfaces.ConditionalRangeFormatData; + } + /** + * + * This object represents the font attributes (font style, color, etc.) for an object. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalRangeFont extends OfficeExtension.ClientObject { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalRangeFont): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalRangeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalRangeFont): void; + /** + * + * Resets the font formats. + * + * [Api set: ExcelApi 1.6] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalRangeFont` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeFont` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeFont` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; + load(option?: string | string[]): Excel.ConditionalRangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFont; + toJSON(): Excel.Interfaces.ConditionalRangeFontData; + } + /** + * + * Represents the background of a conditional range object. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalRangeFill extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalRangeFill): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalRangeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalRangeFill): void; + /** + * + * Resets the fill. + * + * [Api set: ExcelApi 1.6] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalRangeFill` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeFill` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeFill` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; + load(option?: string | string[]): Excel.ConditionalRangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFill; + toJSON(): Excel.Interfaces.ConditionalRangeFillData; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalRangeBorder extends OfficeExtension.ClientObject { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly sideIndex: Excel.ConditionalRangeBorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ConditionalRangeBorder): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ConditionalRangeBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ConditionalRangeBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalRangeBorder` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeBorder` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeBorder` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; + load(option?: string | string[]): Excel.ConditionalRangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeBorder; + toJSON(): Excel.Interfaces.ConditionalRangeBorderData; + } + /** + * + * Represents the border objects that make up range border. + * + * [Api set: ExcelApi 1.6] + */ + class ConditionalRangeBorderCollection extends OfficeExtension.ClientObject { + /** + * + * Gets the bottom border. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly bottom: Excel.ConditionalRangeBorder; + /** + * + * Gets the left border. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly left: Excel.ConditionalRangeBorder; + /** + * + * Gets the right border. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly right: Excel.ConditionalRangeBorder; + /** + * + * Gets the top border. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly top: Excel.ConditionalRangeBorder; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.ConditionalRangeBorder[]; + /** + * + * Number of border objects in the collection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + readonly count: number; + /** + * + * Gets a border object using its name. + * + * [Api set: ExcelApi 1.6] + * + * @param index Index value of the border object to be retrieved. See Excel.ConditionalRangeBorderIndex for details. + */ + getItem(index: Excel.ConditionalRangeBorderIndex): Excel.ConditionalRangeBorder; + /** + * + * Gets a border object using its name. + * + * [Api set: ExcelApi 1.6] + * + * @param index Index value of the border object to be retrieved. See Excel.ConditionalRangeBorderIndex for details. + */ + getItem(index: "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"): Excel.ConditionalRangeBorder; + /** + * + * Gets a border object using its index. + * + * [Api set: ExcelApi 1.6] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.ConditionalRangeBorder; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ConditionalRangeBorderCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeBorderCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeBorderCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; + load(option?: string | string[]): Excel.ConditionalRangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; + toJSON(): Excel.Interfaces.ConditionalRangeBorderCollectionData; + } + /** + * + * An object encapsulating a style's format and other properties. + * + * [Api set: ExcelApi 1.7] + */ + class Style extends OfficeExtension.ClientObject { + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + readonly borders: Excel.RangeBorderCollection; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly fill: Excel.RangeFill; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly font: Excel.RangeFont; + /** + * + * Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * [Api set: ExcelApi 1.8] + */ + autoIndent: boolean; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + readonly builtIn: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + readonly name: string; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit: boolean; + /** + * + * The text orientation for the style. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation: number; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Style): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Style): void; + /** + * + * Deletes this style. + * + * [Api set: ExcelApi 1.7] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Style` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Style` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Style` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.StyleLoadOptions): Excel.Style; + load(option?: string | string[]): Excel.Style; + load(option?: { + select?: string; + expand?: string; + }): Excel.Style; + toJSON(): Excel.Interfaces.StyleData; + } + /** + * + * Represents a collection of all the styles. + * + * [Api set: ExcelApi 1.7] + */ + class StyleCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Style[]; + /** + * + * Adds a new style to the collection. + * + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be added. + */ + add(name: string): void; + /** + * + * Gets a style by name. + * + * [Api set: ExcelApi 1.7] + * + * @param name Name of the style to be retrieved. + */ + getItem(name: string): Excel.Style; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.StyleCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.StyleCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.StyleCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; + load(option?: string | string[]): Excel.StyleCollection; + load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; + toJSON(): Excel.Interfaces.StyleCollectionData; + } + /** + * + * Represents a collection of all the Data Connections that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.7] + */ + class DataConnectionCollection extends OfficeExtension.ClientObject { + /** + * + * Refreshes all the Data Connections in the collection. + * + * [Api set: ExcelApi 1.7] + */ + refreshAll(): void; + toJSON(): { + [key: string]: string; + }; + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisType { + invalid = "Invalid", + /** + * + * Axis displays categories. + * + */ + category = "Category", + /** + * + * Axis displays values. + * + */ + value = "Value", + /** + * + * Axis displays data series. + * + */ + series = "Series", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisGroup { + primary = "Primary", + secondary = "Secondary", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisScaleType { + linear = "Linear", + logarithmic = "Logarithmic", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisPosition { + automatic = "Automatic", + maximum = "Maximum", + minimum = "Minimum", + custom = "Custom", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickMark { + none = "None", + cross = "Cross", + inside = "Inside", + outside = "Outside", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTickLabelPosition { + nextToAxis = "NextToAxis", + high = "High", + low = "Low", + none = "None", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisDisplayUnit { + /** + * + * Default option. This will reset display unit to the axis, and set unit label invisible. + * + */ + none = "None", + /** + * + * This will set the axis in units of hundreds. + * + */ + hundreds = "Hundreds", + /** + * + * This will set the axis in units of thousands. + * + */ + thousands = "Thousands", + /** + * + * This will set the axis in units of tens of thousands. + * + */ + tenThousands = "TenThousands", + /** + * + * This will set the axis in units of hundreds of thousands. + * + */ + hundredThousands = "HundredThousands", + /** + * + * This will set the axis in units of millions. + * + */ + millions = "Millions", + /** + * + * This will set the axis in units of tens of millions. + * + */ + tenMillions = "TenMillions", + /** + * + * This will set the axis in units of hundreds of millions. + * + */ + hundredMillions = "HundredMillions", + /** + * + * This will set the axis in units of billions. + * + */ + billions = "Billions", + /** + * + * This will set the axis in units of trillions. + * + */ + trillions = "Trillions", + /** + * + * This will set the axis in units of custom value. + * + */ + custom = "Custom", + } + /** + * + * Specifies the unit of time for chart axes and data series. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisTimeUnit { + days = "Days", + months = "Months", + years = "Years", + } + /** + * + * Specifies the type of the category axis. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartAxisCategoryType { + /** + * + * Excel controls the axis type. + * + */ + automatic = "Automatic", + /** + * + * Axis groups data by an arbitrary set of categories. + * + */ + textAxis = "TextAxis", + /** + * + * Axis groups data on a time scale. + * + */ + dateAxis = "DateAxis", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", + grey25 = "Grey25", + grey50 = "Grey50", + grey75 = "Grey75", + automatic = "Automatic", + roundDot = "RoundDot", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum ChartDataLabelPosition { + invalid = "Invalid", + none = "None", + center = "Center", + insideEnd = "InsideEnd", + insideBase = "InsideBase", + outsideEnd = "OutsideEnd", + left = "Left", + right = "Right", + top = "Top", + bottom = "Bottom", + bestFit = "BestFit", + callout = "Callout", + } + /** + * + * Represents the position of chart title. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTitlePosition { + automatic = "Automatic", + top = "Top", + bottom = "Bottom", + left = "Left", + right = "Right", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum ChartLegendPosition { + invalid = "Invalid", + top = "Top", + bottom = "Bottom", + left = "Left", + right = "Right", + corner = "Corner", + custom = "Custom", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartMarkerStyle { + invalid = "Invalid", + automatic = "Automatic", + none = "None", + square = "Square", + diamond = "Diamond", + triangle = "Triangle", + x = "X", + star = "Star", + dot = "Dot", + dash = "Dash", + circle = "Circle", + plus = "Plus", + picture = "Picture", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotAreaPosition { + automatic = "Automatic", + custom = "Custom", + } + /** + * + * Specifies whether the series are by rows or by columns. On Desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns; on Excel Online, "auto" will simply default to "columns". + * + * [Api set: ExcelApi 1.1] + */ + enum ChartSeriesBy { + /** + * + * On Desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns; on Excel Online, "auto" will simply default to "columns". + * + */ + auto = "Auto", + columns = "Columns", + rows = "Rows", + } + /** + * + * Represents the horizontal alignment for the specified object. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTextHorizontalAlignment { + center = "Center", + left = "Left", + right = "Right", + justify = "Justify", + distributed = "Distributed", + } + /** + * + * Represents the vertical alignment for the specified object. + * + * [Api set: ExcelApi 1.7] + */ + enum ChartTextVerticalAlignment { + center = "Center", + bottom = "Bottom", + top = "Top", + justify = "Justify", + distributed = "Distributed", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartTickLabelAlignment { + center = "Center", + left = "Left", + right = "Right", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum ChartType { + invalid = "Invalid", + columnClustered = "ColumnClustered", + columnStacked = "ColumnStacked", + columnStacked100 = "ColumnStacked100", + _3DColumnClustered = "3DColumnClustered", + _3DColumnStacked = "3DColumnStacked", + _3DColumnStacked100 = "3DColumnStacked100", + barClustered = "BarClustered", + barStacked = "BarStacked", + barStacked100 = "BarStacked100", + _3DBarClustered = "3DBarClustered", + _3DBarStacked = "3DBarStacked", + _3DBarStacked100 = "3DBarStacked100", + lineStacked = "LineStacked", + lineStacked100 = "LineStacked100", + lineMarkers = "LineMarkers", + lineMarkersStacked = "LineMarkersStacked", + lineMarkersStacked100 = "LineMarkersStacked100", + pieOfPie = "PieOfPie", + pieExploded = "PieExploded", + _3DPieExploded = "3DPieExploded", + barOfPie = "BarOfPie", + xyscatterSmooth = "XYScatterSmooth", + xyscatterSmoothNoMarkers = "XYScatterSmoothNoMarkers", + xyscatterLines = "XYScatterLines", + xyscatterLinesNoMarkers = "XYScatterLinesNoMarkers", + areaStacked = "AreaStacked", + areaStacked100 = "AreaStacked100", + _3DAreaStacked = "3DAreaStacked", + _3DAreaStacked100 = "3DAreaStacked100", + doughnutExploded = "DoughnutExploded", + radarMarkers = "RadarMarkers", + radarFilled = "RadarFilled", + surface = "Surface", + surfaceWireframe = "SurfaceWireframe", + surfaceTopView = "SurfaceTopView", + surfaceTopViewWireframe = "SurfaceTopViewWireframe", + bubble = "Bubble", + bubble3DEffect = "Bubble3DEffect", + stockHLC = "StockHLC", + stockOHLC = "StockOHLC", + stockVHLC = "StockVHLC", + stockVOHLC = "StockVOHLC", + cylinderColClustered = "CylinderColClustered", + cylinderColStacked = "CylinderColStacked", + cylinderColStacked100 = "CylinderColStacked100", + cylinderBarClustered = "CylinderBarClustered", + cylinderBarStacked = "CylinderBarStacked", + cylinderBarStacked100 = "CylinderBarStacked100", + cylinderCol = "CylinderCol", + coneColClustered = "ConeColClustered", + coneColStacked = "ConeColStacked", + coneColStacked100 = "ConeColStacked100", + coneBarClustered = "ConeBarClustered", + coneBarStacked = "ConeBarStacked", + coneBarStacked100 = "ConeBarStacked100", + coneCol = "ConeCol", + pyramidColClustered = "PyramidColClustered", + pyramidColStacked = "PyramidColStacked", + pyramidColStacked100 = "PyramidColStacked100", + pyramidBarClustered = "PyramidBarClustered", + pyramidBarStacked = "PyramidBarStacked", + pyramidBarStacked100 = "PyramidBarStacked100", + pyramidCol = "PyramidCol", + _3DColumn = "3DColumn", + line = "Line", + _3DLine = "3DLine", + _3DPie = "3DPie", + pie = "Pie", + xyscatter = "XYScatter", + _3DArea = "3DArea", + area = "Area", + doughnut = "Doughnut", + radar = "Radar", + histogram = "Histogram", + boxwhisker = "Boxwhisker", + pareto = "Pareto", + regionMap = "RegionMap", + treemap = "Treemap", + waterfall = "Waterfall", + sunburst = "Sunburst", + funnel = "Funnel", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum ChartUnderlineStyle { + none = "None", + single = "Single", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartDisplayBlanksAs { + notPlotted = "NotPlotted", + zero = "Zero", + interplotted = "Interplotted", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartPlotBy { + rows = "Rows", + columns = "Columns", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartColorScheme { + colorfulPalette1 = "ColorfulPalette1", + colorfulPalette2 = "ColorfulPalette2", + colorfulPalette3 = "ColorfulPalette3", + colorfulPalette4 = "ColorfulPalette4", + monochromaticPalette1 = "MonochromaticPalette1", + monochromaticPalette2 = "MonochromaticPalette2", + monochromaticPalette3 = "MonochromaticPalette3", + monochromaticPalette4 = "MonochromaticPalette4", + monochromaticPalette5 = "MonochromaticPalette5", + monochromaticPalette6 = "MonochromaticPalette6", + monochromaticPalette7 = "MonochromaticPalette7", + monochromaticPalette8 = "MonochromaticPalette8", + monochromaticPalette9 = "MonochromaticPalette9", + monochromaticPalette10 = "MonochromaticPalette10", + monochromaticPalette11 = "MonochromaticPalette11", + monochromaticPalette12 = "MonochromaticPalette12", + monochromaticPalette13 = "MonochromaticPalette13", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ChartTrendlineType { + linear = "Linear", + exponential = "Exponential", + logarithmic = "Logarithmic", + movingAverage = "MovingAverage", + polynomial = "Polynomial", + power = "Power", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BindingType { + range = "Range", + table = "Table", + text = "Text", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderIndex { + edgeTop = "EdgeTop", + edgeBottom = "EdgeBottom", + edgeLeft = "EdgeLeft", + edgeRight = "EdgeRight", + insideVertical = "InsideVertical", + insideHorizontal = "InsideHorizontal", + diagonalDown = "DiagonalDown", + diagonalUp = "DiagonalUp", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", + double = "Double", + slantDashDot = "SlantDashDot", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum BorderWeight { + hairline = "Hairline", + thin = "Thin", + medium = "Medium", + thick = "Thick", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum CalculationMode { + automatic = "Automatic", + automaticExceptTables = "AutomaticExceptTables", + manual = "Manual", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum CalculationType { + /** + * + * Recalculates all cells that Excel has marked as dirty, that is, dependents of volatile or changed data, and cells programmatically marked as dirty. + * + */ + recalculate = "Recalculate", + /** + * + * This will mark all cells as dirty and then recalculate them. + * + */ + full = "Full", + /** + * + * This will rebuild the full dependency chain, mark all cells as dirty and then recalculate them. + * + */ + fullRebuild = "FullRebuild", + } + /** + * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks & HyperlinksAndFormats.] + */ + enum ClearApplyTo { + all = "All", + /** + * + * Clears all formatting for the range. + * + */ + formats = "Formats", + /** + * + * Clears the contents of the range. + * + */ + contents = "Contents", + /** + * + * Clears all hyperlinks, but leaves all content and formatting intact. + * + */ + hyperlinks = "Hyperlinks", + /** + * + * Removes hyperlinks and formatting for the cell but leaves content, conditional formats, and data validation intact. + * + */ + removeHyperlinks = "RemoveHyperlinks", + } + /** + * + * Represents the format options for a Data Bar Axis. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarAxisFormat { + automatic = "Automatic", + none = "None", + cellMidPoint = "CellMidPoint", + } + /** + * + * Represents the Data Bar direction within a cell. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalDataBarDirection { + context = "Context", + leftToRight = "LeftToRight", + rightToLeft = "RightToLeft", + } + /** + * + * Represents the direction for a selection. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatDirection { + top = "Top", + bottom = "Bottom", + } + /** + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatType { + custom = "Custom", + dataBar = "DataBar", + colorScale = "ColorScale", + iconSet = "IconSet", + topBottom = "TopBottom", + presetCriteria = "PresetCriteria", + containsText = "ContainsText", + cellValue = "CellValue", + } + /** + * + * Represents the types of conditional format values. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatRuleType { + invalid = "Invalid", + automatic = "Automatic", + lowestValue = "LowestValue", + highestValue = "HighestValue", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", + } + /** + * + * Represents the types of conditional format values. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatIconRuleType { + invalid = "Invalid", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", + } + /** + * + * Represents the types of conditional format values. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatColorCriterionType { + invalid = "Invalid", + lowestValue = "LowestValue", + highestValue = "HighestValue", + number = "Number", + percent = "Percent", + formula = "Formula", + percentile = "Percentile", + } + /** + * + * Represents the criteria for the above/below average conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTopBottomCriterionType { + invalid = "Invalid", + topItems = "TopItems", + topPercent = "TopPercent", + bottomItems = "BottomItems", + bottomPercent = "BottomPercent", + } + /** + * + * Represents the criteria for the Preset Criteria conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalFormatPresetCriterion { + invalid = "Invalid", + blanks = "Blanks", + nonBlanks = "NonBlanks", + errors = "Errors", + nonErrors = "NonErrors", + yesterday = "Yesterday", + today = "Today", + tomorrow = "Tomorrow", + lastSevenDays = "LastSevenDays", + lastWeek = "LastWeek", + thisWeek = "ThisWeek", + nextWeek = "NextWeek", + lastMonth = "LastMonth", + thisMonth = "ThisMonth", + nextMonth = "NextMonth", + aboveAverage = "AboveAverage", + belowAverage = "BelowAverage", + equalOrAboveAverage = "EqualOrAboveAverage", + equalOrBelowAverage = "EqualOrBelowAverage", + oneStdDevAboveAverage = "OneStdDevAboveAverage", + oneStdDevBelowAverage = "OneStdDevBelowAverage", + twoStdDevAboveAverage = "TwoStdDevAboveAverage", + twoStdDevBelowAverage = "TwoStdDevBelowAverage", + threeStdDevAboveAverage = "ThreeStdDevAboveAverage", + threeStdDevBelowAverage = "ThreeStdDevBelowAverage", + uniqueValues = "UniqueValues", + duplicateValues = "DuplicateValues", + } + /** + * + * Represents the operator of the text conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalTextOperator { + invalid = "Invalid", + contains = "Contains", + notContains = "NotContains", + beginsWith = "BeginsWith", + endsWith = "EndsWith", + } + /** + * + * Represents the operator of the text conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalCellValueOperator { + invalid = "Invalid", + between = "Between", + notBetween = "NotBetween", + equalTo = "EqualTo", + notEqualTo = "NotEqualTo", + greaterThan = "GreaterThan", + lessThan = "LessThan", + greaterThanOrEqual = "GreaterThanOrEqual", + lessThanOrEqual = "LessThanOrEqual", + } + /** + * + * Represents the operator for each icon criteria. + * + * [Api set: ExcelApi 1.6] + */ + enum ConditionalIconCriterionOperator { + invalid = "Invalid", + greaterThan = "GreaterThan", + greaterThanOrEqual = "GreaterThanOrEqual", + } + /** + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderIndex { + edgeTop = "EdgeTop", + edgeBottom = "EdgeBottom", + edgeLeft = "EdgeLeft", + edgeRight = "EdgeRight", + } + /** + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeBorderLineStyle { + none = "None", + continuous = "Continuous", + dash = "Dash", + dashDot = "DashDot", + dashDotDot = "DashDotDot", + dot = "Dot", + } + /** + * [Api set: ExcelApi 1.6] + */ + enum ConditionalRangeFontUnderlineStyle { + none = "None", + single = "Single", + double = "Double", + } + /** + * + * Represents Data validation type enum. + * + * [Api set: ExcelApi 1.8] + */ + enum DataValidationType { + /** + * + * None means allow any value and so there is no data validation in the range. + * + */ + none = "None", + /** + * + * Whole number data validation type + * + */ + wholeNumber = "WholeNumber", + /** + * + * Decimal data validation type + * + */ + decimal = "Decimal", + /** + * + * List data validation type + * + */ + list = "List", + /** + * + * Date data validation type + * + */ + date = "Date", + /** + * + * Time data validation type + * + */ + time = "Time", + /** + * + * Text length data validation type + * + */ + textLength = "TextLength", + /** + * + * Custom data validation type + * + */ + custom = "Custom", + /** + * + * Inconsistent means that the range has inconsistent data validation (there are different rules on different cells) + * + */ + inconsistent = "Inconsistent", + /** + * + * MixedCriteria means that the range has data validation present on some but not all cells + * + */ + mixedCriteria = "MixedCriteria", + } + /** + * + * Represents Data validation operator enum. + * + * [Api set: ExcelApi 1.8] + */ + enum DataValidationOperator { + between = "Between", + notBetween = "NotBetween", + equalTo = "EqualTo", + notEqualTo = "NotEqualTo", + greaterThan = "GreaterThan", + lessThan = "LessThan", + greaterThanOrEqualTo = "GreaterThanOrEqualTo", + lessThanOrEqualTo = "LessThanOrEqualTo", + } + /** + * + * Represents Data validation error alert style. The default is "Stop". + * + * [Api set: ExcelApi 1.8] + */ + enum DataValidationAlertStyle { + stop = "Stop", + warning = "Warning", + information = "Information", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum DeleteShiftDirection { + up = "Up", + left = "Left", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum DynamicFilterCriteria { + unknown = "Unknown", + aboveAverage = "AboveAverage", + allDatesInPeriodApril = "AllDatesInPeriodApril", + allDatesInPeriodAugust = "AllDatesInPeriodAugust", + allDatesInPeriodDecember = "AllDatesInPeriodDecember", + allDatesInPeriodFebruray = "AllDatesInPeriodFebruray", + allDatesInPeriodJanuary = "AllDatesInPeriodJanuary", + allDatesInPeriodJuly = "AllDatesInPeriodJuly", + allDatesInPeriodJune = "AllDatesInPeriodJune", + allDatesInPeriodMarch = "AllDatesInPeriodMarch", + allDatesInPeriodMay = "AllDatesInPeriodMay", + allDatesInPeriodNovember = "AllDatesInPeriodNovember", + allDatesInPeriodOctober = "AllDatesInPeriodOctober", + allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1", + allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2", + allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3", + allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4", + allDatesInPeriodSeptember = "AllDatesInPeriodSeptember", + belowAverage = "BelowAverage", + lastMonth = "LastMonth", + lastQuarter = "LastQuarter", + lastWeek = "LastWeek", + lastYear = "LastYear", + nextMonth = "NextMonth", + nextQuarter = "NextQuarter", + nextWeek = "NextWeek", + nextYear = "NextYear", + thisMonth = "ThisMonth", + thisQuarter = "ThisQuarter", + thisWeek = "ThisWeek", + thisYear = "ThisYear", + today = "Today", + tomorrow = "Tomorrow", + yearToDate = "YearToDate", + yesterday = "Yesterday", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum FilterDatetimeSpecificity { + year = "Year", + month = "Month", + day = "Day", + hour = "Hour", + minute = "Minute", + second = "Second", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum FilterOn { + bottomItems = "BottomItems", + bottomPercent = "BottomPercent", + cellColor = "CellColor", + dynamic = "Dynamic", + fontColor = "FontColor", + values = "Values", + topItems = "TopItems", + topPercent = "TopPercent", + icon = "Icon", + custom = "Custom", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum FilterOperator { + and = "And", + or = "Or", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum HorizontalAlignment { + general = "General", + left = "Left", + center = "Center", + right = "Right", + fill = "Fill", + justify = "Justify", + centerAcrossSelection = "CenterAcrossSelection", + distributed = "Distributed", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum IconSet { + invalid = "Invalid", + threeArrows = "ThreeArrows", + threeArrowsGray = "ThreeArrowsGray", + threeFlags = "ThreeFlags", + threeTrafficLights1 = "ThreeTrafficLights1", + threeTrafficLights2 = "ThreeTrafficLights2", + threeSigns = "ThreeSigns", + threeSymbols = "ThreeSymbols", + threeSymbols2 = "ThreeSymbols2", + fourArrows = "FourArrows", + fourArrowsGray = "FourArrowsGray", + fourRedToBlack = "FourRedToBlack", + fourRating = "FourRating", + fourTrafficLights = "FourTrafficLights", + fiveArrows = "FiveArrows", + fiveArrowsGray = "FiveArrowsGray", + fiveRating = "FiveRating", + fiveQuarters = "FiveQuarters", + threeStars = "ThreeStars", + threeTriangles = "ThreeTriangles", + fiveBoxes = "FiveBoxes", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum ImageFittingMode { + fit = "Fit", + fitAndCenter = "FitAndCenter", + fill = "Fill", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum InsertShiftDirection { + down = "Down", + right = "Right", + } + /** + * [Api set: ExcelApi 1.4] + */ + enum NamedItemScope { + worksheet = "Worksheet", + workbook = "Workbook", + } + /** + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + enum NamedItemType { + string = "String", + integer = "Integer", + double = "Double", + boolean = "Boolean", + range = "Range", + error = "Error", + array = "Array", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum RangeUnderlineStyle { + none = "None", + single = "Single", + double = "Double", + singleAccountant = "SingleAccountant", + doubleAccountant = "DoubleAccountant", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum SheetVisibility { + visible = "Visible", + hidden = "Hidden", + veryHidden = "VeryHidden", + } + /** + * [Api set: ExcelApi 1.1 for Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7 for RichValue] + */ + enum RangeValueType { + unknown = "Unknown", + empty = "Empty", + string = "String", + integer = "Integer", + double = "Double", + boolean = "Boolean", + error = "Error", + richValue = "RichValue", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum SortOrientation { + rows = "Rows", + columns = "Columns", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum SortOn { + value = "Value", + cellColor = "CellColor", + fontColor = "FontColor", + icon = "Icon", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum SortDataOption { + normal = "Normal", + textAsNumber = "TextAsNumber", + } + /** + * [Api set: ExcelApi 1.2] + */ + enum SortMethod { + pinYin = "PinYin", + strokeCount = "StrokeCount", + } + /** + * [Api set: ExcelApi 1.1] + */ + enum VerticalAlignment { + top = "Top", + center = "Center", + bottom = "Bottom", + justify = "Justify", + distributed = "Distributed", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyType { + number = "Number", + boolean = "Boolean", + date = "Date", + string = "String", + float = "Float", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum EventSource { + /** + * + * Local means event comes from local user session. + * + */ + local = "Local", + /** + * + * Remote means event comes from remote user session. + * + */ + remote = "Remote", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DataChangeType { + /** + * + * Unknown represents the type of data change is not the listed types. + * + */ + unknown = "Unknown", + /** + * + * RangeEdited represents the data change event is triggered by range being edited. + * + */ + rangeEdited = "RangeEdited", + /** + * + * RowInserted represents the data change event is triggered by inserting new rows. + * + */ + rowInserted = "RowInserted", + /** + * + * RowDeleted represents the data change event is triggered by deleting rows. + * + */ + rowDeleted = "RowDeleted", + /** + * + * ColumnInserted represents the data change event is triggered by inserting new columns. + * + */ + columnInserted = "ColumnInserted", + /** + * + * ColumnDeleted represents the data change event is triggered by deleting columns. + * + */ + columnDeleted = "ColumnDeleted", + /** + * + * CellInserted represents the data change event is triggered by inserting new cells. + * + */ + cellInserted = "CellInserted", + /** + * + * CellDeleted represents the data change event is triggered by deleting cells. + * + */ + cellDeleted = "CellDeleted", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum EventType { + /** + * + * WorksheetChanged represents the type of event registered on Worksheet or WorksheetCollection, and occurs when data changes. + * + */ + worksheetChanged = "WorksheetChanged", + /** + * + * WorksheetSelectionChanged represents the type of event registered on Worksheet, and occurs when selection changes. + * + */ + worksheetSelectionChanged = "WorksheetSelectionChanged", + /** + * + * WorksheetAdded represents the type of event registered on WorksheetCollection, and occurs when a new worksheet is added to the workbook. + * + */ + worksheetAdded = "WorksheetAdded", + /** + * + * WorksheetActivated represents the type of event registered on Worksheet or WorksheetCollection, and occurs when worksheet activates. + * + */ + worksheetActivated = "WorksheetActivated", + /** + * + * WorksheetDeactivated represents the type of event registered on Worksheet or WorksheetCollection, and occurs when worksheet deactivates. + * + */ + worksheetDeactivated = "WorksheetDeactivated", + /** + * + * TableChanged represents the type of event registered on Table, and occurs when data changes. + * + */ + tableChanged = "TableChanged", + /** + * + * TableSelectionChanged represents the type of event registered on Table, and occurs when selection changes. + * + */ + tableSelectionChanged = "TableSelectionChanged", + /** + * + * WorksheetDeleted represents the type of event registered on WorksheetCollection, and occurs when a worksheet is deleted from the workbook. + * + */ + worksheetDeleted = "WorksheetDeleted", + /** + * + * ChartAdded represents the type of event registered on ChartCollection, and occurs when a new chart is added to the worksheet. + * + */ + chartAdded = "ChartAdded", + /** + * + * ChartActivated represents the type of event registered on Chart or ChartCollection, and occurs when chart activates. + * + */ + chartActivated = "ChartActivated", + /** + * + * ChartDeactivated represents the type of event registered on Chart or ChartCollection, and occurs when chart deactivates. + * + */ + chartDeactivated = "ChartDeactivated", + /** + * + * ChartDeleted represents the type of event registered on ChartCollection, and occurs when a chart is deleted from the worksheet. + * + */ + chartDeleted = "ChartDeleted", + /** + * + * WorksheetCalculated represents the type of event registered on Worksheet or WorksheetCollection, and occurs when a worksheet is calculated. + * + */ + worksheetCalculated = "WorksheetCalculated", + /** + * + * VisualSelectionChanged represents the type of event registered on VisualCollection, and occurs when visual selection changes. + * + */ + visualSelectionChanged = "VisualSelectionChanged", + /** + * + * AgaveVisualUpdate represents the type of an event that is associated with an agave visual, and carries a new data view following a data change + * + */ + agaveVisualUpdate = "AgaveVisualUpdate", + /** + * + * TableAdded represents the type of event registered on TableCollection, and occurs when a table is added. + * + */ + tableAdded = "TableAdded", + /** + * + * TableDeleted represents the type of event that is registered on TableCollection, and occurs when a table is deleted. + * + */ + tableDeleted = "TableDeleted", + /** + * + * TableFiltered represents the type of event registered on table or TableCollection, and occurs when data of table is filtered. + * + */ + tableFiltered = "TableFiltered", + /** + * + * WorksheetFiltered represents the type of event registered on worksheet or WorksheetCollection, and occurs when data of autofilter in the worksheet is filtered. + * + */ + worksheetFiltered = "WorksheetFiltered", + /** + * + * ShapeActivated represents the type of event that is registered on Shape, and occurs when shape activates. + * + */ + shapeActivated = "ShapeActivated", + /** + * + * ShapeDeactivated represents the type of event that is registered on Shape, and occurs when shape deactivates. + * + */ + shapeDeactivated = "ShapeDeactivated", + /** + * + * VisualChange represents the type of event registered on Visual, and occurs when there is a visual change. + * + */ + visualChange = "VisualChange", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum DocumentPropertyItem { + title = "Title", + subject = "Subject", + author = "Author", + keywords = "Keywords", + comments = "Comments", + template = "Template", + lastAuth = "LastAuth", + revision = "Revision", + appName = "AppName", + lastPrint = "LastPrint", + creation = "Creation", + lastSave = "LastSave", + category = "Category", + format = "Format", + manager = "Manager", + company = "Company", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum SubtotalLocationType { + /** + * + * Subtotals are at the top. + * + */ + atTop = "AtTop", + /** + * + * Subtotals are at the bottom. + * + */ + atBottom = "AtBottom", + /** + * + * Subtotals are off. + * + */ + off = "Off", + } + /** + * [Api set: ExcelApi 1.8] + */ + enum PivotLayoutType { + /** + * + * A horizontally compressed form with labels from the next field in the same column. + * + */ + compact = "Compact", + /** + * + * Inner fields' items are always on a new line relative to the outer fields' items. + * + */ + tabular = "Tabular", + /** + * + * Inner fields' items are on same row as outer fields' items and subtotals are always on the bottom. + * + */ + outline = "Outline", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ProtectionSelectionMode { + /** + * + * Selection is allowed for all cells. + * + */ + normal = "Normal", + /** + * + * Selection is allowed only for cells that are not locked. + * + */ + unlocked = "Unlocked", + /** + * + * Selection is not allowed for all cells. + * + */ + none = "None", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum PageOrientation { + portrait = "Portrait", + landscape = "Landscape", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum ReadingOrder { + /** + * + * Reading order is determined by the language of the first character entered. + If a right-to-left language character is entered first, reading order is right to left. + If a left-to-right language character is entered first, reading order is left to right. + * + */ + context = "Context", + /** + * + * Left to right reading order + * + */ + leftToRight = "LeftToRight", + /** + * + * Right to left reading order + * + */ + rightToLeft = "RightToLeft", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum BuiltInStyle { + normal = "Normal", + comma = "Comma", + currency = "Currency", + percent = "Percent", + wholeComma = "WholeComma", + wholeDollar = "WholeDollar", + hlink = "Hlink", + hlinkTrav = "HlinkTrav", + note = "Note", + warningText = "WarningText", + emphasis1 = "Emphasis1", + emphasis2 = "Emphasis2", + emphasis3 = "Emphasis3", + sheetTitle = "SheetTitle", + heading1 = "Heading1", + heading2 = "Heading2", + heading3 = "Heading3", + heading4 = "Heading4", + input = "Input", + output = "Output", + calculation = "Calculation", + checkCell = "CheckCell", + linkedCell = "LinkedCell", + total = "Total", + good = "Good", + bad = "Bad", + neutral = "Neutral", + accent1 = "Accent1", + accent1_20 = "Accent1_20", + accent1_40 = "Accent1_40", + accent1_60 = "Accent1_60", + accent2 = "Accent2", + accent2_20 = "Accent2_20", + accent2_40 = "Accent2_40", + accent2_60 = "Accent2_60", + accent3 = "Accent3", + accent3_20 = "Accent3_20", + accent3_40 = "Accent3_40", + accent3_60 = "Accent3_60", + accent4 = "Accent4", + accent4_20 = "Accent4_20", + accent4_40 = "Accent4_40", + accent4_60 = "Accent4_60", + accent5 = "Accent5", + accent5_20 = "Accent5_20", + accent5_40 = "Accent5_40", + accent5_60 = "Accent5_60", + accent6 = "Accent6", + accent6_20 = "Accent6_20", + accent6_40 = "Accent6_40", + accent6_60 = "Accent6_60", + explanatoryText = "ExplanatoryText", + } + /** + * [Api set: ExcelApi 1.7] + */ + enum WorksheetPositionType { + none = "None", + before = "Before", + after = "After", + beginning = "Beginning", + end = "End", + } + /** + * + * An object containing the result of a function-evaluation operation + * + * [Api set: ExcelApi 1.2] + */ + class FunctionResult extends OfficeExtension.ClientObject { + /** + * + * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. + * + * [Api set: ExcelApi 1.2] + */ + readonly error: string; + /** + * + * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). + * + * [Api set: ExcelApi 1.2] + */ + readonly value: T; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): FunctionResult` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): FunctionResult` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): FunctionResult` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; + load(option?: string | string[]): FunctionResult; + load(option?: { + select?: string; + expand?: string; + }): FunctionResult; + toJSON(): Interfaces.FunctionResultData; + } + /** + * + * An object for evaluating Excel functions. + * + * [Api set: ExcelApi 1.2] + */ + class Functions extends OfficeExtension.ClientObject { + /** + * + * Returns the absolute value of a number, a number without its sign. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the real number for which you want the absolute value. + */ + abs(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the accrued interest for a security that pays periodic interest. + * + * [Api set: ExcelApi 1.2] + * + * @param issue Is the security's issue date, expressed as a serial date number. + * @param firstInterest Is the security's first interest date, expressed as a serial date number. + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param rate Is the security's annual coupon rate. + * @param par Is the security's par value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + * @param calcMethod Is a logical value: to accrued interest from issue date = TRUE or omitted; to calculate from last coupon payment date = FALSE. + */ + accrInt(issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, par: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, calcMethod?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the accrued interest for a security that pays interest at maturity. + * + * [Api set: ExcelApi 1.2] + * + * @param issue Is the security's issue date, expressed as a serial date number. + * @param settlement Is the security's maturity date, expressed as a serial date number. + * @param rate Is the security's annual coupon rate. + * @param par Is the security's par value. + * @param basis Is the type of day count basis to use. + */ + accrIntM(issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, par: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the arccosine of a number, in radians in the range 0 to Pi. The arccosine is the angle whose cosine is Number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the cosine of the angle you want and must be from -1 to 1. + */ + acos(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse hyperbolic cosine of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number equal to or greater than 1. + */ + acosh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the arccotangent of a number, in radians in the range 0 to Pi. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the cotangent of the angle you want. + */ + acot(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse hyperbolic cotangent of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the hyperbolic cotangent of the angle that you want. + */ + acoth(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the prorated linear depreciation of an asset for each accounting period. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the cost of the asset. + * @param datePurchased Is the date the asset is purchased. + * @param firstPeriod Is the date of the end of the first period. + * @param salvage Is the salvage value at the end of life of the asset. + * @param period Is the period. + * @param rate Is the rate of depreciation. + * @param basis Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. + */ + amorDegrc(cost: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, datePurchased: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the prorated linear depreciation of an asset for each accounting period. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the cost of the asset. + * @param datePurchased Is the date the asset is purchased. + * @param firstPeriod Is the date of the end of the first period. + * @param salvage Is the salvage value at the end of life of the asset. + * @param period Is the period. + * @param rate Is the rate of depreciation. + * @param basis Year_basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days. + */ + amorLinc(cost: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, datePurchased: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references. + */ + and(...values: Array>): FunctionResult; + /** + * + * Converts a Roman numeral to Arabic. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the Roman numeral you want to convert. + */ + arabic(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell. + * + * [Api set: ExcelApi 1.2] + * + * @param reference Is a reference to a cell or range of cells and can refer to multiple areas. + */ + areas(reference: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Changes full-width (double-byte) characters to half-width (single-byte) characters. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is a text, or a reference to a cell containing a text. + */ + asc(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the sine of the angle you want and must be from -1 to 1. + */ + asin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse hyperbolic sine of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number equal to or greater than 1. + */ + asinh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the tangent of the angle you want. + */ + atan(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the arctangent of the specified x- and y- coordinates, in radians between -Pi and Pi, excluding -Pi. + * + * [Api set: ExcelApi 1.2] + * + * @param xNum Is the x-coordinate of the point. + * @param yNum Is the y-coordinate of the point. + */ + atan2(xNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse hyperbolic tangent of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number between -1 and 1 excluding -1 and 1. + */ + atanh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the average of the absolute deviations of data points from their mean. Arguments can be numbers or names, arrays, or references that contain numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 arguments for which you want the average of the absolute deviations. + */ + aveDev(...values: Array>): FunctionResult; + /** + * + * Returns the average (arithmetic mean) of its arguments, which can be numbers or names, arrays, or references that contain numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numeric arguments for which you want the average. + */ + average(...values: Array>): FunctionResult; + /** + * + * Returns the average (arithmetic mean) of its arguments, evaluating text and FALSE in arguments as 0; TRUE evaluates as 1. Arguments can be numbers, names, arrays, or references. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 arguments for which you want the average. + */ + averageA(...values: Array>): FunctionResult; + /** + * + * Finds average(arithmetic mean) for the cells specified by a given condition or criteria. + * + * [Api set: ExcelApi 1.2] + * + * @param range Is the range of cells you want evaluated. + * @param criteria Is the condition or criteria in the form of a number, expression, or text that defines which cells will be used to find the average. + * @param averageRange Are the actual cells to be used to find the average. If omitted, the cells in range are used. + */ + averageIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, averageRange?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Finds average(arithmetic mean) for the cells specified by a given set of conditions or criteria. + * + * [Api set: ExcelApi 1.2] + * + * @param averageRange Are the actual cells to be used to find the average. + * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition or criteria in the form of a number, expression, or text that defines which cells will be used to find the average. + */ + averageIfs(averageRange: Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array | number | string | boolean>): FunctionResult; + /** + * + * Converts a number to text (baht). + * + * [Api set: ExcelApi 1.2] + * + * @param number Is a number that you want to convert. + */ + bahtText(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a number into a text representation with the given radix (base). + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number that you want to convert. + * @param radix Is the base Radix that you want to convert the number into. + * @param minLength Is the minimum length of the returned string. If omitted leading zeros are not added. + */ + base(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, radix: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, minLength?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the modified Bessel function In(x). + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function. + * @param n Is the order of the Bessel function. + */ + besselI(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Bessel function Jn(x). + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function. + * @param n Is the order of the Bessel function. + */ + besselJ(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the modified Bessel function Kn(x). + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function. + * @param n Is the order of the function. + */ + besselK(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Bessel function Yn(x). + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function. + * @param n Is the order of the function. + */ + besselY(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the beta probability distribution function. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value between A and B at which to evaluate the function. + * @param alpha Is a parameter to the distribution and must be greater than 0. + * @param beta Is a parameter to the distribution and must be greater than 0. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + * @param A Is an optional lower bound to the interval of x. If omitted, A = 0. + * @param B Is an optional upper bound to the interval of x. If omitted, B = 1. + */ + beta_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, A?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, B?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the cumulative beta probability density function (BETA.DIST). + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the beta distribution. + * @param alpha Is a parameter to the distribution and must be greater than 0. + * @param beta Is a parameter to the distribution and must be greater than 0. + * @param A Is an optional lower bound to the interval of x. If omitted, A = 0. + * @param B Is an optional upper bound to the interval of x. If omitted, B = 1. + */ + beta_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, A?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, B?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a binary number to decimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the binary number you want to convert. + */ + bin2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a binary number to hexadecimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the binary number you want to convert. + * @param places Is the number of characters to use. + */ + bin2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a binary number to octal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the binary number you want to convert. + * @param places Is the number of characters to use. + */ + bin2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the individual term binomial distribution probability. + * + * [Api set: ExcelApi 1.2] + * + * @param numberS Is the number of successes in trials. + * @param trials Is the number of independent trials. + * @param probabilityS Is the probability of success on each trial. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + */ + binom_Dist(numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the probability of a trial result using a binomial distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param trials Is the number of independent trials. + * @param probabilityS Is the probability of success on each trial. + * @param numberS Is the number of successes in trials. + * @param numberS2 If provided this function returns the probability that the number of successful trials shall lie between numberS and numberS2. + */ + binom_Dist_Range(trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS2?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value. + * + * [Api set: ExcelApi 1.2] + * + * @param trials Is the number of Bernoulli trials. + * @param probabilityS Is the probability of success on each trial, a number between 0 and 1 inclusive. + * @param alpha Is the criterion value, a number between 0 and 1 inclusive. + */ + binom_Inv(trials: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a bitwise 'And' of two numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param number1 Is the decimal representation of the binary number you want to evaluate. + * @param number2 Is the decimal representation of the binary number you want to evaluate. + */ + bitand(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a number shifted left by shift_amount bits. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the decimal representation of the binary number you want to evaluate. + * @param shiftAmount Is the number of bits that you want to shift Number left by. + */ + bitlshift(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, shiftAmount: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a bitwise 'Or' of two numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param number1 Is the decimal representation of the binary number you want to evaluate. + * @param number2 Is the decimal representation of the binary number you want to evaluate. + */ + bitor(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a number shifted right by shift_amount bits. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the decimal representation of the binary number you want to evaluate. + * @param shiftAmount Is the number of bits that you want to shift Number right by. + */ + bitrshift(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, shiftAmount: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a bitwise 'Exclusive Or' of two numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param number1 Is the decimal representation of the binary number you want to evaluate. + * @param number2 Is the decimal representation of the binary number you want to evaluate. + */ + bitxor(number1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number up, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value you want to round. + * @param significance Is the multiple to which you want to round. + * @param mode When given and nonzero this function will round away from zero. + */ + ceiling_Math(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mode?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number up, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value you want to round. + * @param significance Is the multiple to which you want to round. + */ + ceiling_Precise(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the character specified by the code number from the character set for your computer. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is a number between 1 and 255 specifying which character you want. + */ + char(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the left-tailed probability of the chi-squared distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. + * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + */ + chiSq_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the right-tailed probability of the chi-squared distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. + * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + chiSq_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the left-tailed probability of the chi-squared distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. + * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + chiSq_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the right-tailed probability of the chi-squared distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the chi-squared distribution, a value between 0 and 1 inclusive. + * @param degFreedom Is the number of degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + chiSq_Inv_RT(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Chooses a value or action to perform from a list of values, based on an index number. + * + * [Api set: ExcelApi 1.2] + * + * @param indexNum Specifies which value argument is selected. indexNum must be between 1 and 254, or a formula or a reference to a number between 1 and 254. + * @param values List of parameters, whose elements are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects. + */ + choose(indexNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; + /** + * + * Removes all nonprintable characters from text. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is any worksheet information from which you want to remove nonprintable characters. + */ + clean(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a numeric code for the first character in a text string, in the character set used by your computer. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text for which you want the code of the first character. + */ + code(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of columns in an array or reference. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is an array or array formula, or a reference to a range of cells for which you want the number of columns. + */ + columns(array: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of combinations for a given number of items. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the total number of items. + * @param numberChosen Is the number of items in each combination. + */ + combin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of combinations with repetitions for a given number of items. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the total number of items. + * @param numberChosen Is the number of items in each combination. + */ + combina(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts real and imaginary coefficients into a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param realNum Is the real coefficient of the complex number. + * @param iNum Is the imaginary coefficient of the complex number. + * @param suffix Is the suffix for the imaginary component of the complex number. + */ + complex(realNum: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, iNum: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, suffix?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Joins several text strings into one text string. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 text strings to be joined into a single text string and can be text strings, numbers, or single-cell references. + */ + concatenate(...values: Array>): FunctionResult; + /** + * + * Returns the confidence interval for a population mean, using a normal distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param alpha Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. + * @param standardDev Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. + * @param size Is the sample size. + */ + confidence_Norm(alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, size: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the confidence interval for a population mean, using a Student's T distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param alpha Is the significance level used to compute the confidence level, a number greater than 0 and less than 1. + * @param standardDev Is the population standard deviation for the data range and is assumed to be known. standardDev must be greater than 0. + * @param size Is the sample size. + */ + confidence_T(alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, size: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a number from one measurement system to another. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value in from_units to convert. + * @param fromUnit Is the units for number. + * @param toUnit Is the units for the result. + */ + convert(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fromUnit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, toUnit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cosine of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the cosine. + */ + cos(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic cosine of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number. + */ + cosh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cotangent of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the cotangent. + */ + cot(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic cotangent of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the hyperbolic cotangent. + */ + coth(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Counts the number of cells in a range that contain numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 arguments that can contain or refer to a variety of different types of data, but only numbers are counted. + */ + count(...values: Array>): FunctionResult; + /** + * + * Counts the number of cells in a range that are not empty. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 arguments representing the values and cells you want to count. Values can be any type of information. + */ + countA(...values: Array>): FunctionResult; + /** + * + * Counts the number of empty cells in a specified range of cells. + * + * [Api set: ExcelApi 1.2] + * + * @param range Is the range from which you want to count the empty cells. + */ + countBlank(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Counts the number of cells within a range that meet the given condition. + * + * [Api set: ExcelApi 1.2] + * + * @param range Is the range of cells from which you want to count nonblank cells. + * @param criteria Is the condition in the form of a number, expression, or text that defines which cells will be counted. + */ + countIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Counts the number of cells specified by a given set of conditions or criteria. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition in the form of a number, expression, or text that defines which cells will be counted. + */ + countIfs(...values: Array | number | string | boolean>): FunctionResult; + /** + * + * Returns the number of days from the beginning of the coupon period to the settlement date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupDayBs(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of days in the coupon period that contains the settlement date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupDays(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of days from the settlement date to the next coupon date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupDaysNc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the next coupon date after the settlement date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupNcd(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of coupons payable between the settlement date and maturity date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupNum(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the previous coupon date before the settlement date. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + coupPcd(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cosecant of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the cosecant. + */ + csc(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic cosecant of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the hyperbolic cosecant. + */ + csch(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cumulative interest paid between two periods. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate. + * @param nper Is the total number of payment periods. + * @param pv Is the present value. + * @param startPeriod Is the first period in the calculation. + * @param endPeriod Is the last period in the calculation. + * @param type Is the timing of the payment. + */ + cumIPmt(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cumulative principal paid on a loan between two periods. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate. + * @param nper Is the total number of payment periods. + * @param pv Is the present value. + * @param startPeriod Is the first period in the calculation. + * @param endPeriod Is the last period in the calculation. + * @param type Is the timing of the payment. + */ + cumPrinc(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Averages the values in a column in a list or database that match conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + daverage(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Counts the cells containing numbers in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dcount(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Counts nonblank cells in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dcountA(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Extracts from a database a single record that matches the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dget(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the largest number in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dmax(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the smallest number in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dmin(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Multiplies the values in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dproduct(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Estimates the standard deviation based on a sample from selected database entries. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dstDev(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Calculates the standard deviation based on the entire population of selected database entries. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dstDevP(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Adds the numbers in the field (column) of records in the database that match the conditions you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dsum(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Estimates variance based on a sample from selected database entries. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dvar(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Calculates variance based on the entire population of selected database entries. + * + * [Api set: ExcelApi 1.2] + * + * @param database Is the range of cells that makes up the list or database. A database is a list of related data. + * @param field Is either the label of the column in double quotation marks or a number that represents the column's position in the list. + * @param criteria Is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition. + */ + dvarP(database: Excel.Range | Excel.RangeReference | Excel.FunctionResult, field: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number that represents the date in Microsoft Excel date-time code. + * + * [Api set: ExcelApi 1.2] + * + * @param year Is a number from 1900 or 1904 (depending on the workbook's date system) to 9999. + * @param month Is a number from 1 to 12 representing the month of the year. + * @param day Is a number from 1 to 31 representing the day of the month. + */ + date(year: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, month: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, day: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a date in the form of text to a number that represents the date in Microsoft Excel date-time code. + * + * [Api set: ExcelApi 1.2] + * + * @param dateText Is text that represents a date in a Microsoft Excel date format, between 1/1/1900 or 1/1/1904 (depending on the workbook's date system) and 12/31/9999. + */ + datevalue(dateText: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the day of the month, a number from 1 to 31. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel. + */ + day(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of days between the two dates. + * + * [Api set: ExcelApi 1.2] + * + * @param endDate startDate and endDate are the two dates between which you want to know the number of days. + * @param startDate startDate and endDate are the two dates between which you want to know the number of days. + */ + days(endDate: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startDate: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of days between two dates based on a 360-day year (twelve 30-day months). + * + * [Api set: ExcelApi 1.2] + * + * @param startDate startDate and endDate are the two dates between which you want to know the number of days. + * @param endDate startDate and endDate are the two dates between which you want to know the number of days. + * @param method Is a logical value specifying the calculation method: U.S. (NASD) = FALSE or omitted; European = TRUE. + */ + days360(startDate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, method?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the depreciation of an asset for a specified period using the fixed-declining balance method. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the initial cost of the asset. + * @param salvage Is the salvage value at the end of the life of the asset. + * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + * @param period Is the period for which you want to calculate the depreciation. Period must use the same units as Life. + * @param month Is the number of months in the first year. If month is omitted, it is assumed to be 12. + */ + db(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, month?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Changes half-width (single-byte) characters within a character string to full-width (double-byte) characters. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is a text, or a reference to a cell containing a text. + */ + dbcs(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the initial cost of the asset. + * @param salvage Is the salvage value at the end of the life of the asset. + * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + * @param period Is the period for which you want to calculate the depreciation. Period must use the same units as Life. + * @param factor Is the rate at which the balance declines. If Factor is omitted, it is assumed to be 2 (the double-declining balance method). + */ + ddb(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, period: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, factor?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a decimal number to binary. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the decimal integer you want to convert. + * @param places Is the number of characters to use. + */ + dec2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a decimal number to hexadecimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the decimal integer you want to convert. + * @param places Is the number of characters to use. + */ + dec2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a decimal number to octal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the decimal integer you want to convert. + * @param places Is the number of characters to use. + */ + dec2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a text representation of a number in a given base into a decimal number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number that you want to convert. + * @param radix Is the base Radix of the number you are converting. + */ + decimal(number: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, radix: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts radians to degrees. + * + * [Api set: ExcelApi 1.2] + * + * @param angle Is the angle in radians that you want to convert. + */ + degrees(angle: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Tests whether two numbers are equal. + * + * [Api set: ExcelApi 1.2] + * + * @param number1 Is the first number. + * @param number2 Is the second number. + */ + delta(number1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number2?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sum of squares of deviations of data points from their sample mean. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 arguments, or an array or array reference, on which you want DEVSQ to calculate. + */ + devSq(...values: Array>): FunctionResult; + /** + * + * Returns the discount rate for a security. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param pr Is the security's price per $100 face value. + * @param redemption Is the security's redemption value per $100 face value. + * @param basis Is the type of day count basis to use. + */ + disc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a number to text, using currency format. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. + * @param decimals Is the number of digits to the right of the decimal point. The number is rounded as necessary; if omitted, Decimals = 2. + */ + dollar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number. + * + * [Api set: ExcelApi 1.2] + * + * @param fractionalDollar Is a number expressed as a fraction. + * @param fraction Is the integer to use in the denominator of the fraction. + */ + dollarDe(fractionalDollar: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fraction: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction. + * + * [Api set: ExcelApi 1.2] + * + * @param decimalDollar Is a decimal number. + * @param fraction Is the integer to use in the denominator of a fraction. + */ + dollarFr(decimalDollar: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fraction: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the annual duration of a security with periodic interest payments. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param coupon Is the security's annual coupon rate. + * @param yld Is the security's annual yield. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + duration(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number up, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value you want to round. + * @param significance Is the multiple to which you want to round. + */ + ecma_Ceiling(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the serial number of the date that is the indicated number of months before or after the start date. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param months Is the number of months before or after startDate. + */ + edate(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, months: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the effective annual interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param nominalRate Is the nominal interest rate. + * @param npery Is the number of compounding periods per year. + */ + effect(nominalRate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, npery: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the serial number of the last day of the month before or after a specified number of months. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param months Is the number of months before or after the startDate. + */ + eoMonth(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, months: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the error function. + * + * [Api set: ExcelApi 1.2] + * + * @param lowerLimit Is the lower bound for integrating ERF. + * @param upperLimit Is the upper bound for integrating ERF. + */ + erf(lowerLimit: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, upperLimit?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the complementary error function. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the lower bound for integrating ERF. + */ + erfC(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the complementary error function. + * + * [Api set: ExcelApi 1.2] + * + * @param X Is the lower bound for integrating ERFC.PRECISE. + */ + erfC_Precise(X: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the error function. + * + * [Api set: ExcelApi 1.2] + * + * @param X Is the lower bound for integrating ERF.PRECISE. + */ + erf_Precise(X: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a number matching an error value. + * + * [Api set: ExcelApi 1.2] + * + * @param errorVal Is the error value for which you want the identifying number, and can be an actual error value or a reference to a cell containing an error value. + */ + error_Type(errorVal: string | number | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a positive number up and negative number down to the nearest even integer. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to round. + */ + even(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive. + * + * [Api set: ExcelApi 1.2] + * + * @param text1 Is the first text string. + * @param text2 Is the second text string. + */ + exact(text1: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, text2: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns e raised to the power of a given number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm. + */ + exp(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the exponential distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value of the function, a nonnegative number. + * @param lambda Is the parameter value, a positive number. + * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + */ + expon_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lambda: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the future value of an initial principal after applying a series of compound interest rates. + * + * [Api set: ExcelApi 1.2] + * + * @param principal Is the present value. + * @param schedule Is an array of interest rates to apply. + */ + fvschedule(principal: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, schedule: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the (left-tailed) F probability distribution (degree of diversity) for two data sets. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function, a nonnegative number. + * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + */ + f_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the (right-tailed) F probability distribution (degree of diversity) for two data sets. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function, a nonnegative number. + * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + f_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the (left-tailed) F probability distribution: if p = F.DIST(x,...), then F.INV(p,...) = x. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. + * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + f_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the (right-tailed) F probability distribution: if p = F.DIST.RT(x,...), then F.INV.RT(p,...) = x. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the F cumulative distribution, a number between 0 and 1 inclusive. + * @param degFreedom1 Is the numerator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + * @param degFreedom2 Is the denominator degrees of freedom, a number between 1 and 10^10, excluding 10^10. + */ + f_Inv_RT(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom1: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom2: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the factorial of a number, equal to 1*2*3*...* Number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the nonnegative number you want the factorial of. + */ + fact(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the double factorial of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value for which to return the double factorial. + */ + factDouble(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the logical value FALSE. + * + * [Api set: ExcelApi 1.2] + */ + false(): FunctionResult; + /** + * + * Returns the starting position of one text string within another text string. FIND is case-sensitive. + * + * [Api set: ExcelApi 1.2] + * + * @param findText Is the text you want to find. Use double quotes (empty text) to match the first character in withinText; wildcard characters not allowed. + * @param withinText Is the text containing the text you want to find. + * @param startNum Specifies the character at which to start the search. The first character in withinText is character number 1. If omitted, startNum = 1. + */ + find(findText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, withinText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Finds the starting position of one text string within another text string. FINDB is case-sensitive. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param findText Is the text you want to find. + * @param withinText Is the text containing the text you want to find. + * @param startNum Specifies the character at which to start the search. + */ + findB(findText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, withinText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Fisher transformation. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want the transformation, a number between -1 and 1, excluding -1 and 1. + */ + fisher(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the Fisher transformation: if y = FISHER(x), then FISHERINV(y) = x. + * + * [Api set: ExcelApi 1.2] + * + * @param y Is the value for which you want to perform the inverse of the transformation. + */ + fisherInv(y: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number to the specified number of decimals and returns the result as text with or without commas. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number you want to round and convert to text. + * @param decimals Is the number of digits to the right of the decimal point. If omitted, Decimals = 2. + * @param noCommas Is a logical value: do not display commas in the returned text = TRUE; do display commas in the returned text = FALSE or omitted. + */ + fixed(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, noCommas?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number down, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value you want to round. + * @param significance Is the multiple to which you want to round. + * @param mode When given and nonzero this function will round towards zero. + */ + floor_Math(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mode?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number down, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the numeric value you want to round. + * @param significance Is the multiple to which you want to round. + */ + floor_Precise(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the future value of an investment based on periodic, constant payments and a constant interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param nper Is the total number of payment periods in the investment. + * @param pmt Is the payment made each period; it cannot change over the life of the investment. + * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. If omitted, Pv = 0. + * @param type Is a value representing the timing of payment: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + */ + fv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Gamma function value. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want to calculate Gamma. + */ + gamma(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the natural logarithm of the gamma function. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want to calculate GAMMALN, a positive number. + */ + gammaLn(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the natural logarithm of the gamma function. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want to calculate GAMMALN.PRECISE, a positive number. + */ + gammaLn_Precise(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the gamma distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which you want to evaluate the distribution, a nonnegative number. + * @param alpha Is a parameter to the distribution, a positive number. + * @param beta Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.DIST returns the standard gamma distribution. + * @param cumulative Is a logical value: return the cumulative distribution function = TRUE; return the probability mass function = FALSE or omitted. + */ + gamma_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the gamma cumulative distribution: if p = GAMMA.DIST(x,...), then GAMMA.INV(p,...) = x. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is the probability associated with the gamma distribution, a number between 0 and 1, inclusive. + * @param alpha Is a parameter to the distribution, a positive number. + * @param beta Is a parameter to the distribution, a positive number. If beta = 1, GAMMA.INV returns the inverse of the standard gamma distribution. + */ + gamma_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns 0.5 less than the standard normal cumulative distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want the distribution. + */ + gauss(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the greatest common divisor. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 values. + */ + gcd(...values: Array>): FunctionResult; + /** + * + * Tests whether a number is greater than a threshold value. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to test against step. + * @param step Is the threshold value. + */ + geStep(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, step?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the geometric mean of an array or range of positive numeric data. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the mean. + */ + geoMean(...values: Array>): FunctionResult; + /** + * + * Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param lookupValue Is the value to be found in the first row of the table and can be a value, a reference, or a text string. + * @param tableArray Is a table of text, numbers, or logical values in which data is looked up. tableArray can be a reference to a range or a range name. + * @param rowIndexNum Is the row number in tableArray from which the matching value should be returned. The first row of values in the table is row 1. + * @param rangeLookup Is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE or omitted; find an exact match = FALSE. + */ + hlookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, tableArray: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rowIndexNum: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rangeLookup?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the harmonic mean of a data set of positive numbers: the reciprocal of the arithmetic mean of reciprocals. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the harmonic mean. + */ + harMean(...values: Array>): FunctionResult; + /** + * + * Converts a Hexadecimal number to binary. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the hexadecimal number you want to convert. + * @param places Is the number of characters to use. + */ + hex2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a hexadecimal number to decimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the hexadecimal number you want to convert. + */ + hex2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a hexadecimal number to octal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the hexadecimal number you want to convert. + * @param places Is the number of characters to use. + */ + hex2Oct(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.). + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel, or text in time format, such as 16:48:00 or 4:48:00 PM. + */ + hour(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hypergeometric distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param sampleS Is the number of successes in the sample. + * @param numberSample Is the size of the sample. + * @param populationS Is the number of successes in the population. + * @param numberPop Is the population size. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + */ + hypGeom_Dist(sampleS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberSample: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, populationS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberPop: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet. + * + * [Api set: ExcelApi 1.2] + * + * @param linkLocation Is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path. + * @param friendlyName Is text or a number that is displayed in the cell. If omitted, the cell displays the linkLocation text. + */ + hyperlink(linkLocation: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, friendlyName?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number up, to the nearest integer or to the nearest multiple of significance. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value you want to round. + * @param significance Is the optional multiple to which you want to round. + */ + iso_Ceiling(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param logicalTest Is any value or expression that can be evaluated to TRUE or FALSE. + * @param valueIfTrue Is the value that is returned if logicalTest is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions. + * @param valueIfFalse Is the value that is returned if logicalTest is FALSE. If omitted, FALSE is returned. + */ + if(logicalTest: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, valueIfTrue?: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult, valueIfFalse?: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the absolute value (modulus) of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the absolute value. + */ + imAbs(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the argument q, an angle expressed in radians. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the argument. + */ + imArgument(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the complex conjugate of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the conjugate. + */ + imConjugate(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cosine of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the cosine. + */ + imCos(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic cosine of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the hyperbolic cosine. + */ + imCosh(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cotangent of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the cotangent. + */ + imCot(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the cosecant of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the cosecant. + */ + imCsc(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic cosecant of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the hyperbolic cosecant. + */ + imCsch(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the quotient of two complex numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber1 Is the complex numerator or dividend. + * @param inumber2 Is the complex denominator or divisor. + */ + imDiv(inumber1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, inumber2: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the exponential of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the exponential. + */ + imExp(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the natural logarithm of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the natural logarithm. + */ + imLn(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the base-10 logarithm of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the common logarithm. + */ + imLog10(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the base-2 logarithm of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the base-2 logarithm. + */ + imLog2(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a complex number raised to an integer power. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number you want to raise to a power. + * @param number Is the power to which you want to raise the complex number. + */ + imPower(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the product of 1 to 255 complex numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values Inumber1, Inumber2,... are from 1 to 255 complex numbers to multiply. + */ + imProduct(...values: Array>): FunctionResult; + /** + * + * Returns the real coefficient of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the real coefficient. + */ + imReal(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the secant of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the secant. + */ + imSec(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic secant of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the hyperbolic secant. + */ + imSech(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sine of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the sine. + */ + imSin(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic sine of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the hyperbolic sine. + */ + imSinh(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the square root of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the square root. + */ + imSqrt(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the difference of two complex numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber1 Is the complex number from which to subtract inumber2. + * @param inumber2 Is the complex number to subtract from inumber1. + */ + imSub(inumber1: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, inumber2: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sum of complex numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are from 1 to 255 complex numbers to add. + */ + imSum(...values: Array>): FunctionResult; + /** + * + * Returns the tangent of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the tangent. + */ + imTan(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the imaginary coefficient of a complex number. + * + * [Api set: ExcelApi 1.2] + * + * @param inumber Is a complex number for which you want the imaginary coefficient. + */ + imaginary(inumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number down to the nearest integer. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the real number you want to round down to an integer. + */ + int(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the interest rate for a fully invested security. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param investment Is the amount invested in the security. + * @param redemption Is the amount to be received at maturity. + * @param basis Is the type of day count basis to use. + */ + intRate(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, investment: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the interest payment for a given period for an investment, based on periodic, constant payments and a constant interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param per Is the period for which you want to find the interest and must be in the range 1 to Nper. + * @param nper Is the total number of payment periods in an investment. + * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. + * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, Fv = 0. + * @param type Is a logical value representing the timing of payment: at the end of the period = 0 or omitted, at the beginning of the period = 1. + */ + ipmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the internal rate of return for a series of cash flows. + * + * [Api set: ExcelApi 1.2] + * + * @param values Is an array or a reference to cells that contain numbers for which you want to calculate the internal rate of return. + * @param guess Is a number that you guess is close to the result of IRR; 0.1 (10 percent) if omitted. + */ + irr(values: Excel.Range | Excel.RangeReference | Excel.FunctionResult, guess?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is an error (#VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!) excluding #N/A, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isErr(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is an error (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!), and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isError(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns TRUE if the number is even. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to test. + */ + isEven(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a reference is to a cell containing a formula, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param reference Is a reference to the cell you want to test. Reference can be a cell reference, a formula, or name that refers to a cell. + */ + isFormula(reference: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is a logical value (TRUE or FALSE), and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isLogical(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is #N/A, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isNA(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is not text (blank cells are not text), and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want tested: a cell; a formula; or a name referring to a cell, formula, or value. + */ + isNonText(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is a number, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isNumber(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns TRUE if the number is odd. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to test. + */ + isOdd(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is text, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isText(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the ISO week number in the year for a given date. + * + * [Api set: ExcelApi 1.2] + * + * @param date Is the date-time code used by Microsoft Excel for date and time calculation. + */ + isoWeekNum(date: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the interest paid during a specific period of an investment. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param per Period for which you want to find the interest. + * @param nper Number of payment periods in an investment. + * @param pv Lump sum amount that a series of future payments is right now. + */ + ispmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is a reference, and returns TRUE or FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want to test. Value can refer to a cell, a formula, or a name that refers to a cell, formula, or value. + */ + isref(value: Excel.Range | number | string | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the kurtosis of a data set. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the kurtosis. + */ + kurt(...values: Array>): FunctionResult; + /** + * + * Returns the k-th largest value in a data set. For example, the fifth largest number. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data for which you want to determine the k-th largest value. + * @param k Is the position (from the largest) in the array or cell range of the value to return. + */ + large(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the least common multiple. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 values for which you want the least common multiple. + */ + lcm(...values: Array>): FunctionResult; + /** + * + * Returns the specified number of characters from the start of a text string. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string containing the characters you want to extract. + * @param numChars Specifies how many characters you want LEFT to extract; 1 if omitted. + */ + left(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the specified number of characters from the start of a text string. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string containing the characters you want to extract. + * @param numBytes Specifies how many characters you want LEFT to return. + */ + leftb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of characters in a text string. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text whose length you want to find. Spaces count as characters. + */ + len(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of characters in a text string. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text whose length you want to find. + */ + lenb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the natural logarithm of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the positive real number for which you want the natural logarithm. + */ + ln(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the logarithm of a number to the base you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the positive real number for which you want the logarithm. + * @param base Is the base of the logarithm; 10 if omitted. + */ + log(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, base?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the base-10 logarithm of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the positive real number for which you want the base-10 logarithm. + */ + log10(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the lognormal distribution of x, where ln(x) is normally distributed with parameters Mean and Standard_dev. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function, a positive number. + * @param mean Is the mean of ln(x). + * @param standardDev Is the standard deviation of ln(x), a positive number. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + */ + logNorm_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the lognormal cumulative distribution function of x, where ln(x) is normally distributed with parameters Mean and Standard_dev. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability associated with the lognormal distribution, a number between 0 and 1, inclusive. + * @param mean Is the mean of ln(x). + * @param standardDev Is the standard deviation of ln(x), a positive number. + */ + logNorm_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility. + * + * [Api set: ExcelApi 1.2] + * + * @param lookupValue Is a value that LOOKUP searches for in lookupVector and can be a number, text, a logical value, or a name or reference to a value. + * @param lookupVector Is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order. + * @param resultVector Is a range that contains only one row or column, the same size as lookupVector. + */ + lookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lookupVector: Excel.Range | Excel.RangeReference | Excel.FunctionResult, resultVector?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts all letters in a text string to lowercase. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text you want to convert to lowercase. Characters in Text that are not letters are not changed. + */ + lower(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Macauley modified duration for a security with an assumed par value of $100. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param coupon Is the security's annual coupon rate. + * @param yld Is the security's annual yield. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + mduration(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the internal rate of return for a series of periodic cash flows, considering both cost of investment and interest on reinvestment of cash. + * + * [Api set: ExcelApi 1.2] + * + * @param values Is an array or a reference to cells that contain numbers that represent a series of payments (negative) and income (positive) at regular periods. + * @param financeRate Is the interest rate you pay on the money used in the cash flows. + * @param reinvestRate Is the interest rate you receive on the cash flows as you reinvest them. + */ + mirr(values: Excel.Range | Excel.RangeReference | Excel.FunctionResult, financeRate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, reinvestRate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a number rounded to the desired multiple. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to round. + * @param multiple Is the multiple to which you want to round number. + */ + mround(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, multiple: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the relative position of an item in an array that matches a specified value in a specified order. + * + * [Api set: ExcelApi 1.2] + * + * @param lookupValue Is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these. + * @param lookupArray Is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array. + * @param matchType Is a number 1, 0, or -1 indicating which value to return. + */ + match(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lookupArray: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, matchType?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the largest value in a set of values. Ignores logical values and text. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. + */ + max(...values: Array>): FunctionResult; + /** + * + * Returns the largest value in a set of values. Does not ignore logical values and text. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the maximum. + */ + maxA(...values: Array>): FunctionResult; + /** + * + * Returns the median, or the number in the middle of the set of given numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the median. + */ + median(...values: Array>): FunctionResult; + /** + * + * Returns the characters from the middle of a text string, given a starting position and length. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string from which you want to extract the characters. + * @param startNum Is the position of the first character you want to extract. The first character in Text is 1. + * @param numChars Specifies how many characters to return from Text. + */ + mid(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns characters from the middle of a text string, given a starting position and length. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string containing the characters you want to extract. + * @param startNum Is the position of the first character you want to extract in text. + * @param numBytes Specifies how many characters to return from text. + */ + midb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the smallest number in a set of values. Ignores logical values and text. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. + */ + min(...values: Array>): FunctionResult; + /** + * + * Returns the smallest value in a set of values. Does not ignore logical values and text. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, empty cells, logical values, or text numbers for which you want the minimum. + */ + minA(...values: Array>): FunctionResult; + /** + * + * Returns the minute, a number from 0 to 59. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel or text in time format, such as 16:48:00 or 4:48:00 PM. + */ + minute(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the remainder after a number is divided by a divisor. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number for which you want to find the remainder after the division is performed. + * @param divisor Is the number by which you want to divide Number. + */ + mod(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, divisor: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the month, a number from 1 (January) to 12 (December). + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel. + */ + month(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the multinomial of a set of numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 values for which you want the multinomial. + */ + multiNomial(...values: Array>): FunctionResult; + /** + * + * Converts non-number value to a number, dates to serial numbers, TRUE to 1, anything else to 0 (zero). + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value you want converted. + */ + n(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of periods for an investment based on periodic, constant payments and a constant interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param pmt Is the payment made each period; it cannot change over the life of the investment. + * @param pv Is the present value, or the lump-sum amount that a series of future payments is worth now. + * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, zero is used. + * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + */ + nper(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the error value #N/A (value not available). + * + * [Api set: ExcelApi 1.2] + */ + na(): FunctionResult; + /** + * + * Returns the negative binomial distribution, the probability that there will be Number_f failures before the Number_s-th success, with Probability_s probability of a success. + * + * [Api set: ExcelApi 1.2] + * + * @param numberF Is the number of failures. + * @param numberS Is the threshold number of successes. + * @param probabilityS Is the probability of a success; a number between 0 and 1. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + */ + negBinom_Dist(numberF: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, probabilityS: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of whole workdays between two dates. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param endDate Is a serial date number that represents the end date. + * @param holidays Is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. + */ + networkDays(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of whole workdays between two dates with custom weekend parameters. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param endDate Is a serial date number that represents the end date. + * @param weekend Is a number or string specifying when weekends occur. + * @param holidays Is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. + */ + networkDays_Intl(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, weekend?: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the annual nominal interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param effectRate Is the effective interest rate. + * @param npery Is the number of compounding periods per year. + */ + nominal(effectRate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, npery: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the normal distribution for the specified mean and standard deviation. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value for which you want the distribution. + * @param mean Is the arithmetic mean of the distribution. + * @param standardDev Is the standard deviation of the distribution, a positive number. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + */ + norm_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. + * @param mean Is the arithmetic mean of the distribution. + * @param standardDev Is the standard deviation of the distribution, a positive number. + */ + norm_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the standard normal distribution (has a mean of zero and a standard deviation of one). + * + * [Api set: ExcelApi 1.2] + * + * @param z Is the value for which you want the distribution. + * @param cumulative Is a logical value for the function to return: the cumulative distribution function = TRUE; the probability density function = FALSE. + */ + norm_S_Dist(z: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the inverse of the standard normal cumulative distribution (has a mean of zero and a standard deviation of one). + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is a probability corresponding to the normal distribution, a number between 0 and 1 inclusive. + */ + norm_S_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Changes FALSE to TRUE, or TRUE to FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param logical Is a value or expression that can be evaluated to TRUE or FALSE. + */ + not(logical: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the current date and time formatted as a date and time. + * + * [Api set: ExcelApi 1.2] + */ + now(): FunctionResult; + /** + * + * Returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values). + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the rate of discount over the length of one period. + * @param values List of parameters, whose elements are 1 to 254 payments and income, equally spaced in time and occurring at the end of each period. + */ + npv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; + /** + * + * Converts text to number in a locale-independent manner. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the string representing the number you want to convert. + * @param decimalSeparator Is the character used as the decimal separator in the string. + * @param groupSeparator Is the character used as the group separator in the string. + */ + numberValue(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimalSeparator?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, groupSeparator?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts an octal number to binary. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the octal number you want to convert. + * @param places Is the number of characters to use. + */ + oct2Bin(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts an octal number to decimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the octal number you want to convert. + */ + oct2Dec(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts an octal number to hexadecimal. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the octal number you want to convert. + * @param places Is the number of characters to use. + */ + oct2Hex(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, places?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a positive number up and negative number down to the nearest odd integer. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the value to round. + */ + odd(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value of a security with an odd first period. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param issue Is the security's issue date, expressed as a serial date number. + * @param firstCoupon Is the security's first coupon date, expressed as a serial date number. + * @param rate Is the security's interest rate. + * @param yld Is the security's annual yield. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + oddFPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstCoupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the yield of a security with an odd first period. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param issue Is the security's issue date, expressed as a serial date number. + * @param firstCoupon Is the security's first coupon date, expressed as a serial date number. + * @param rate Is the security's interest rate. + * @param pr Is the security's price. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + oddFYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, firstCoupon: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value of a security with an odd last period. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param lastInterest Is the security's last coupon date, expressed as a serial date number. + * @param rate Is the security's interest rate. + * @param yld Is the security's annual yield. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + oddLPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lastInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the yield of a security with an odd last period. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param lastInterest Is the security's last coupon date, expressed as a serial date number. + * @param rate Is the security's interest rate. + * @param pr Is the security's price. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + oddLYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, lastInterest: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 conditions that you want to test that can be either TRUE or FALSE. + */ + or(...values: Array>): FunctionResult; + /** + * + * Returns the number of periods required by an investment to reach a specified value. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. + * @param pv Is the present value of the investment. + * @param fv Is the desired future value of the investment. + */ + pduration(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the rank of a value in a data set as a percentage of the data set as a percentage (0..1, exclusive) of the data set. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data with numeric values that defines relative standing. + * @param x Is the value for which you want to know the rank. + * @param significance Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). + */ + percentRank_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the rank of a value in a data set as a percentage of the data set as a percentage (0..1, inclusive) of the data set. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data with numeric values that defines relative standing. + * @param x Is the value for which you want to know the rank. + * @param significance Is an optional value that identifies the number of significant digits for the returned percentage, three digits if omitted (0.xxx%). + */ + percentRank_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, significance?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data that defines relative standing. + * @param k Is the percentile value that is between 0 through 1, inclusive. + */ + percentile_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data that defines relative standing. + * @param k Is the percentile value that is between 0 through 1, inclusive. + */ + percentile_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of permutations for a given number of objects that can be selected from the total objects. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the total number of objects. + * @param numberChosen Is the number of objects in each permutation. + */ + permut(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the total number of objects. + * @param numberChosen Is the number of objects in each permutation. + */ + permutationa(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberChosen: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the value of the density function for a standard normal distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the number for which you want the density of the standard normal distribution. + */ + phi(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the value of Pi, 3.14159265358979, accurate to 15 digits. + * + * [Api set: ExcelApi 1.2] + */ + pi(): FunctionResult; + /** + * + * Calculates the payment for a loan based on constant payments and a constant interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period for the loan. For example, use 6%/4 for quarterly payments at 6% APR. + * @param nper Is the total number of payments for the loan. + * @param pv Is the present value: the total amount that a series of future payments is worth now. + * @param fv Is the future value, or a cash balance you want to attain after the last payment is made, 0 (zero) if omitted. + * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + */ + pmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Poisson distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the number of events. + * @param mean Is the expected numeric value, a positive number. + * @param cumulative Is a logical value: for the cumulative Poisson probability, use TRUE; for the Poisson probability mass function, use FALSE. + */ + poisson_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the result of a number raised to a power. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the base number, any real number. + * @param power Is the exponent, to which the base number is raised. + */ + power(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, power: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the payment on the principal for a given investment based on periodic, constant payments and a constant interest rate. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param per Specifies the period and must be in the range 1 to nper. + * @param nper Is the total number of payment periods in an investment. + * @param pv Is the present value: the total amount that a series of future payments is worth now. + * @param fv Is the future value, or cash balance you want to attain after the last payment is made. + * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + */ + ppmt(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value of a security that pays periodic interest. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param rate Is the security's annual coupon rate. + * @param yld Is the security's annual yield. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + price(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value of a discounted security. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param discount Is the security's discount rate. + * @param redemption Is the security's redemption value per $100 face value. + * @param basis Is the type of day count basis to use. + */ + priceDisc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value of a security that pays interest at maturity. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param issue Is the security's issue date, expressed as a serial date number. + * @param rate Is the security's interest rate at date of issue. + * @param yld Is the security's annual yield. + * @param basis Is the type of day count basis to use. + */ + priceMat(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, yld: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Multiplies all the numbers given as arguments. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply. + */ + product(...values: Array>): FunctionResult; + /** + * + * Converts a text string to proper case; the first letter in each word to uppercase, and all other letters to lowercase. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing text to partially capitalize. + */ + proper(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the present value of an investment: the total amount that a series of future payments is worth now. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR. + * @param nper Is the total number of payment periods in an investment. + * @param pmt Is the payment made each period and cannot change over the life of the investment. + * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. + * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + */ + pv(rate: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the quartile of a data set, based on percentile values from 0..1, exclusive. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or cell range of numeric values for which you want the quartile value. + * @param quart Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. + */ + quartile_Exc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, quart: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the quartile of a data set, based on percentile values from 0..1, inclusive. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or cell range of numeric values for which you want the quartile value. + * @param quart Is a number: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. + */ + quartile_Inc(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, quart: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the integer portion of a division. + * + * [Api set: ExcelApi 1.2] + * + * @param numerator Is the dividend. + * @param denominator Is the divisor. + */ + quotient(numerator: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, denominator: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts degrees to radians. + * + * [Api set: ExcelApi 1.2] + * + * @param angle Is an angle in degrees that you want to convert. + */ + radians(angle: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation). + * + * [Api set: ExcelApi 1.2] + */ + rand(): FunctionResult; + /** + * + * Returns a random number between the numbers you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param bottom Is the smallest integer RANDBETWEEN will return. + * @param top Is the largest integer RANDBETWEEN will return. + */ + randBetween(bottom: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, top: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the rank of a number in a list of numbers: its size relative to other values in the list; if more than one value has the same rank, the average rank is returned. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number for which you want to find the rank. + * @param ref Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. + * @param order Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. + */ + rank_Avg(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ref: Excel.Range | Excel.RangeReference | Excel.FunctionResult, order?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the rank of a number in a list of numbers: its size relative to other values in the list; if more than one value has the same rank, the top rank of that set of values is returned. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number for which you want to find the rank. + * @param ref Is an array of, or a reference to, a list of numbers. Nonnumeric values are ignored. + * @param order Is a number: rank in the list sorted descending = 0 or omitted; rank in the list sorted ascending = any nonzero value. + */ + rank_Eq(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ref: Excel.Range | Excel.RangeReference | Excel.FunctionResult, order?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the interest rate per period of a loan or an investment. For example, use 6%/4 for quarterly payments at 6% APR. + * + * [Api set: ExcelApi 1.2] + * + * @param nper Is the total number of payment periods for the loan or investment. + * @param pmt Is the payment made each period and cannot change over the life of the loan or investment. + * @param pv Is the present value: the total amount that a series of future payments is worth now. + * @param fv Is the future value, or a cash balance you want to attain after the last payment is made. If omitted, uses Fv = 0. + * @param type Is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0 or omitted. + * @param guess Is your guess for what the rate will be; if omitted, Guess = 0.1 (10 percent). + */ + rate(nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pmt: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, type?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, guess?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the amount received at maturity for a fully invested security. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param investment Is the amount invested in the security. + * @param discount Is the security's discount rate. + * @param basis Is the type of day count basis to use. + */ + received(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, investment: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Replaces part of a text string with a different text string. + * + * [Api set: ExcelApi 1.2] + * + * @param oldText Is text in which you want to replace some characters. + * @param startNum Is the position of the character in oldText that you want to replace with newText. + * @param numChars Is the number of characters in oldText that you want to replace. + * @param newText Is the text that will replace characters in oldText. + */ + replace(oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Replaces part of a text string with a different text string. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param oldText Is text in which you want to replace some characters. + * @param startNum Is the position of the character in oldText that you want to replace with newText. + * @param numBytes Is the number of characters in oldText that you want to replace with newText. + * @param newText Is the text that will replace characters in oldText. + */ + replaceB(oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text you want to repeat. + * @param numberTimes Is a positive number specifying the number of times to repeat text. + */ + rept(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numberTimes: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the specified number of characters from the end of a text string. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string that contains the characters you want to extract. + * @param numChars Specifies how many characters you want to extract, 1 if omitted. + */ + right(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numChars?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the specified number of characters from the end of a text string. Use with double-byte character sets (DBCS). + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text string containing the characters you want to extract. + * @param numBytes Specifies how many characters you want to extract. + */ + rightb(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numBytes?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts an Arabic numeral to Roman, as text. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the Arabic numeral you want to convert. + * @param form Is the number specifying the type of Roman numeral you want. + */ + roman(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, form?: boolean | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number to a specified number of digits. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number you want to round. + * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero to the nearest integer. + */ + round(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number down, toward zero. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number that you want rounded down. + * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero or omitted, to the nearest integer. + */ + roundDown(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Rounds a number up, away from zero. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number that you want rounded up. + * @param numDigits Is the number of digits to which you want to round. Negative rounds to the left of the decimal point; zero or omitted, to the nearest integer. + */ + roundUp(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of rows in a reference or array. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is an array, an array formula, or a reference to a range of cells for which you want the number of rows. + */ + rows(array: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns an equivalent interest rate for the growth of an investment. + * + * [Api set: ExcelApi 1.2] + * + * @param nper Is the number of periods for the investment. + * @param pv Is the present value of the investment. + * @param fv Is the future value of the investment. + */ + rri(nper: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, fv: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the secant of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the secant. + */ + sec(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic secant of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the hyperbolic secant. + */ + sech(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the second, a number from 0 to 59. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel or text in time format, such as 16:48:23 or 4:48:47 PM. + */ + second(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sum of a power series based on the formula. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the input value to the power series. + * @param n Is the initial power to which you want to raise x. + * @param m Is the step by which to increase n for each term in the series. + * @param coefficients Is a set of coefficients by which each successive power of x is multiplied. + */ + seriesSum(x: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, n: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, m: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, coefficients: Excel.Range | string | number | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sheet number of the referenced sheet. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the name of a sheet or a reference that you want the sheet number of. If omitted the number of the sheet containing the function is returned. + */ + sheet(value?: Excel.Range | string | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number of sheets in a reference. + * + * [Api set: ExcelApi 1.2] + * + * @param reference Is a reference for which you want to know the number of sheets it contains. If omitted the number of sheets in the workbook containing the function is returned. + */ + sheets(reference?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number. + */ + sign(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the sine of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the sine. Degrees * PI()/180 = radians. + */ + sin(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic sine of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number. + */ + sinh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the skewness of a distribution: a characterization of the degree of asymmetry of a distribution around its mean. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers or names, arrays, or references that contain numbers for which you want the skewness. + */ + skew(...values: Array>): FunctionResult; + /** + * + * Returns the skewness of a distribution based on a population: a characterization of the degree of asymmetry of a distribution around its mean. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 254 numbers or names, arrays, or references that contain numbers for which you want the population skewness. + */ + skew_p(...values: Array>): FunctionResult; + /** + * + * Returns the straight-line depreciation of an asset for one period. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the initial cost of the asset. + * @param salvage Is the salvage value at the end of the life of the asset. + * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + */ + sln(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the k-th smallest value in a data set. For example, the fifth smallest number. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is an array or range of numerical data for which you want to determine the k-th smallest value. + * @param k Is the position (from the smallest) in the array or range of the value to return. + */ + small(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, k: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the square root of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number for which you want the square root. + */ + sqrt(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the square root of (number * Pi). + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number by which p is multiplied. + */ + sqrtPi(number: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Estimates standard deviation based on a sample, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 values corresponding to a sample of a population and can be values or names or references to values. + */ + stDevA(...values: Array>): FunctionResult; + /** + * + * Calculates standard deviation based on an entire population, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 values corresponding to a population and can be values, names, arrays, or references that contain values. + */ + stDevPA(...values: Array>): FunctionResult; + /** + * + * Calculates standard deviation based on the entire population given as arguments (ignores logical values and text). + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers corresponding to a population and can be numbers or references that contain numbers. + */ + stDev_P(...values: Array>): FunctionResult; + /** + * + * Estimates standard deviation based on a sample (ignores logical values and text in the sample). + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers corresponding to a sample of a population and can be numbers or references that contain numbers. + */ + stDev_S(...values: Array>): FunctionResult; + /** + * + * Returns a normalized value from a distribution characterized by a mean and standard deviation. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value you want to normalize. + * @param mean Is the arithmetic mean of the distribution. + * @param standardDev Is the standard deviation of the distribution, a positive number. + */ + standardize(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, mean: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, standardDev: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Replaces existing text with new text in a text string. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text or the reference to a cell containing text in which you want to substitute characters. + * @param oldText Is the existing text you want to replace. If the case of oldText does not match the case of text, SUBSTITUTE will not replace the text. + * @param newText Is the text you want to replace oldText with. + * @param instanceNum Specifies which occurrence of oldText you want to replace. If omitted, every instance of oldText is replaced. + */ + substitute(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, oldText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, newText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, instanceNum?: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a subtotal in a list or database. + * + * [Api set: ExcelApi 1.2] + * + * @param functionNum Is the number 1 to 11 that specifies the summary function for the subtotal. + * @param values List of parameters, whose elements are 1 to 254 ranges or references for which you want the subtotal. + */ + subtotal(functionNum: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array>): FunctionResult; + /** + * + * Adds all the numbers in a range of cells. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments. + */ + sum(...values: Array>): FunctionResult; + /** + * + * Adds the cells specified by a given condition or criteria. + * + * [Api set: ExcelApi 1.2] + * + * @param range Is the range of cells you want evaluated. + * @param criteria Is the condition or criteria in the form of a number, expression, or text that defines which cells will be added. + * @param sumRange Are the actual cells to sum. If omitted, the cells in range are used. + */ + sumIf(range: Excel.Range | Excel.RangeReference | Excel.FunctionResult, criteria: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sumRange?: Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Adds the cells specified by a given set of conditions or criteria. + * + * [Api set: ExcelApi 1.2] + * + * @param sumRange Are the actual cells to sum. + * @param values List of parameters, where the first element of each pair is the Is the range of cells you want evaluated for the particular condition , and the second element is is the condition or criteria in the form of a number, expression, or text that defines which cells will be added. + */ + sumIfs(sumRange: Excel.Range | Excel.RangeReference | Excel.FunctionResult, ...values: Array | number | string | boolean>): FunctionResult; + /** + * + * Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares. + */ + sumSq(...values: Array>): FunctionResult; + /** + * + * Returns the sum-of-years' digits depreciation of an asset for a specified period. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the initial cost of the asset. + * @param salvage Is the salvage value at the end of the life of the asset. + * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + * @param per Is the period and must use the same units as Life. + */ + syd(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, per: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Checks whether a value is text, and returns the text if it is, or returns double quotes (empty text) if it is not. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is the value to test. + */ + t(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the bond-equivalent yield for a treasury bill. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. + * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. + * @param discount Is the Treasury bill's discount rate. + */ + tbillEq(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the price per $100 face value for a treasury bill. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. + * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. + * @param discount Is the Treasury bill's discount rate. + */ + tbillPrice(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, discount: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the yield for a treasury bill. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the Treasury bill's settlement date, expressed as a serial date number. + * @param maturity Is the Treasury bill's maturity date, expressed as a serial date number. + * @param pr Is the Treasury Bill's price per $100 face value. + */ + tbillYield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the left-tailed Student's t-distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the numeric value at which to evaluate the distribution. + * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability density function, use FALSE. + */ + t_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the two-tailed Student's t-distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the numeric value at which to evaluate the distribution. + * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. + */ + t_Dist_2T(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the right-tailed Student's t-distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the numeric value at which to evaluate the distribution. + * @param degFreedom Is an integer indicating the number of degrees of freedom that characterize the distribution. + */ + t_Dist_RT(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the left-tailed inverse of the Student's t-distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. + * @param degFreedom Is a positive integer indicating the number of degrees of freedom to characterize the distribution. + */ + t_Inv(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the two-tailed inverse of the Student's t-distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param probability Is the probability associated with the two-tailed Student's t-distribution, a number between 0 and 1 inclusive. + * @param degFreedom Is a positive integer indicating the number of degrees of freedom to characterize the distribution. + */ + t_Inv_2T(probability: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, degFreedom: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the tangent of an angle. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the angle in radians for which you want the tangent. Degrees * PI()/180 = radians. + */ + tan(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the hyperbolic tangent of a number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is any real number. + */ + tanh(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a value to text in a specific number format. + * + * [Api set: ExcelApi 1.2] + * + * @param value Is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value. + * @param formatText Is a number format in text form from the Category box on the Number tab in the Format Cells dialog box (not General). + */ + text(value: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, formatText: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts hours, minutes, and seconds given as numbers to an Excel serial number, formatted with a time format. + * + * [Api set: ExcelApi 1.2] + * + * @param hour Is a number from 0 to 23 representing the hour. + * @param minute Is a number from 0 to 59 representing the minute. + * @param second Is a number from 0 to 59 representing the second. + */ + time(hour: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, minute: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, second: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a text time to an Excel serial number for a time, a number from 0 (12:00:00 AM) to 0.999988426 (11:59:59 PM). Format the number with a time format after entering the formula. + * + * [Api set: ExcelApi 1.2] + * + * @param timeText Is a text string that gives a time in any one of the Microsoft Excel time formats (date information in the string is ignored). + */ + timevalue(timeText: string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the current date formatted as a date. + * + * [Api set: ExcelApi 1.2] + */ + today(): FunctionResult; + /** + * + * Removes all spaces from a text string except for single spaces between words. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text from which you want spaces removed. + */ + trim(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the mean of the interior portion of a set of data values. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the range or array of values to trim and average. + * @param percent Is the fractional number of data points to exclude from the top and bottom of the data set. + */ + trimMean(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, percent: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the logical value TRUE. + * + * [Api set: ExcelApi 1.2] + */ + true(): FunctionResult; + /** + * + * Truncates a number to an integer by removing the decimal, or fractional, part of the number. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the number you want to truncate. + * @param numDigits Is a number specifying the precision of the truncation, 0 (zero) if omitted. + */ + trunc(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, numDigits?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns an integer representing the data type of a value: number = 1; text = 2; logical value = 4; error value = 16; array = 64. + * + * [Api set: ExcelApi 1.2] + * + * @param value Can be any value. + */ + type(value: boolean | string | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a number to text, using currency format. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is a number, a reference to a cell containing a number, or a formula that evaluates to a number. + * @param decimals Is the number of digits to the right of the decimal point. + */ + usdollar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, decimals?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Unicode character referenced by the given numeric value. + * + * [Api set: ExcelApi 1.2] + * + * @param number Is the Unicode number representing a character. + */ + unichar(number: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the number (code point) corresponding to the first character of the text. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the character that you want the Unicode value of. + */ + unicode(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a text string to all uppercase letters. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text you want converted to uppercase, a reference or a text string. + */ + upper(text: string | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order. + * + * [Api set: ExcelApi 1.2] + * + * @param lookupValue Is the value to be found in the first column of the table, and can be a value, a reference, or a text string. + * @param tableArray Is a table of text, numbers, or logical values, in which data is retrieved. tableArray can be a reference to a range or a range name. + * @param colIndexNum Is the column number in tableArray from which the matching value should be returned. The first column of values in the table is column 1. + * @param rangeLookup Is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE or omitted; find an exact match = FALSE. + */ + vlookup(lookupValue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, tableArray: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, colIndexNum: Excel.Range | number | Excel.RangeReference | Excel.FunctionResult, rangeLookup?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Converts a text string that represents a number to a number. + * + * [Api set: ExcelApi 1.2] + * + * @param text Is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert. + */ + value(text: string | boolean | number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Estimates variance based on a sample, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 value arguments corresponding to a sample of a population. + */ + varA(...values: Array>): FunctionResult; + /** + * + * Calculates variance based on the entire population, including logical values and text. Text and the logical value FALSE have the value 0; the logical value TRUE has the value 1. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 value arguments corresponding to a population. + */ + varPA(...values: Array>): FunctionResult; + /** + * + * Calculates variance based on the entire population (ignores logical values and text in the population). + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a population. + */ + var_P(...values: Array>): FunctionResult; + /** + * + * Estimates variance based on a sample (ignores logical values and text in the sample). + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 255 numeric arguments corresponding to a sample of a population. + */ + var_S(...values: Array>): FunctionResult; + /** + * + * Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify. + * + * [Api set: ExcelApi 1.2] + * + * @param cost Is the initial cost of the asset. + * @param salvage Is the salvage value at the end of the life of the asset. + * @param life Is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset). + * @param startPeriod Is the starting period for which you want to calculate the depreciation, in the same units as Life. + * @param endPeriod Is the ending period for which you want to calculate the depreciation, in the same units as Life. + * @param factor Is the rate at which the balance declines, 2 (double-declining balance) if omitted. + * @param noSwitch Switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE or omitted; do not switch = TRUE. + */ + vdb(cost: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, salvage: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, life: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, startPeriod: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endPeriod: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, factor?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, noSwitch?: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the week number in the year. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is the date-time code used by Microsoft Excel for date and time calculation. + * @param returnType Is a number (1 or 2) that determines the type of the return value. + */ + weekNum(serialNumber: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, returnType?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a number from 1 to 7 identifying the day of the week of a date. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number that represents a date. + * @param returnType Is a number: for Sunday=1 through Saturday=7, use 1; for Monday=1 through Sunday=7, use 2; for Monday=0 through Sunday=6, use 3. + */ + weekday(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, returnType?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the Weibull distribution. + * + * [Api set: ExcelApi 1.2] + * + * @param x Is the value at which to evaluate the function, a nonnegative number. + * @param alpha Is a parameter to the distribution, a positive number. + * @param beta Is a parameter to the distribution, a positive number. + * @param cumulative Is a logical value: for the cumulative distribution function, use TRUE; for the probability mass function, use FALSE. + */ + weibull_Dist(x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, alpha: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, beta: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, cumulative: boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the serial number of the date before or after a specified number of workdays. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param days Is the number of nonweekend and non-holiday days before or after startDate. + * @param holidays Is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. + */ + workDay(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, days: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param days Is the number of nonweekend and non-holiday days before or after startDate. + * @param weekend Is a number or string specifying when weekends occur. + * @param holidays Is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays. + */ + workDay_Intl(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, days: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, weekend?: number | string | Excel.Range | Excel.RangeReference | Excel.FunctionResult, holidays?: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the internal rate of return for a schedule of cash flows. + * + * [Api set: ExcelApi 1.2] + * + * @param values Is a series of cash flows that correspond to a schedule of payments in dates. + * @param dates Is a schedule of payment dates that corresponds to the cash flow payments. + * @param guess Is a number that you guess is close to the result of XIRR. + */ + xirr(values: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, dates: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, guess?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the net present value for a schedule of cash flows. + * + * [Api set: ExcelApi 1.2] + * + * @param rate Is the discount rate to apply to the cash flows. + * @param values Is a series of cash flows that correspond to a schedule of payments in dates. + * @param dates Is a schedule of payment dates that corresponds to the cash flow payments. + */ + xnpv(rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, values: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult, dates: number | string | Excel.Range | boolean | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns a logical 'Exclusive Or' of all arguments. + * + * [Api set: ExcelApi 1.2] + * + * @param values List of parameters, whose elements are 1 to 254 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references. + */ + xor(...values: Array>): FunctionResult; + /** + * + * Returns the year of a date, an integer in the range 1900 - 9999. + * + * [Api set: ExcelApi 1.2] + * + * @param serialNumber Is a number in the date-time code used by Microsoft Excel. + */ + year(serialNumber: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the year fraction representing the number of whole days between start_date and end_date. + * + * [Api set: ExcelApi 1.2] + * + * @param startDate Is a serial date number that represents the start date. + * @param endDate Is a serial date number that represents the end date. + * @param basis Is the type of day count basis to use. + */ + yearFrac(startDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, endDate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the yield on a security that pays periodic interest. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param rate Is the security's annual coupon rate. + * @param pr Is the security's price per $100 face value. + * @param redemption Is the security's redemption value per $100 face value. + * @param frequency Is the number of coupon payments per year. + * @param basis Is the type of day count basis to use. + */ + yield(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, frequency: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the annual yield for a discounted security. For example, a treasury bill. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param pr Is the security's price per $100 face value. + * @param redemption Is the security's redemption value per $100 face value. + * @param basis Is the type of day count basis to use. + */ + yieldDisc(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, redemption: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the annual yield of a security that pays interest at maturity. + * + * [Api set: ExcelApi 1.2] + * + * @param settlement Is the security's settlement date, expressed as a serial date number. + * @param maturity Is the security's maturity date, expressed as a serial date number. + * @param issue Is the security's issue date, expressed as a serial date number. + * @param rate Is the security's interest rate at date of issue. + * @param pr Is the security's price per $100 face value. + * @param basis Is the type of day count basis to use. + */ + yieldMat(settlement: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, maturity: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, issue: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, rate: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, pr: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult, basis?: number | string | boolean | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * + * Returns the one-tailed P-value of a z-test. + * + * [Api set: ExcelApi 1.2] + * + * @param array Is the array or range of data against which to test X. + * @param x Is the value to test. + * @param sigma Is the population (known) standard deviation. If omitted, the sample standard deviation is used. + */ + z_Test(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sigma?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + toJSON(): { + [key: string]: string; + }; + } + enum ErrorCodes { + accessDenied = "AccessDenied", + apiNotFound = "ApiNotFound", + conflict = "Conflict", + generalException = "GeneralException", + insertDeleteConflict = "InsertDeleteConflict", + invalidArgument = "InvalidArgument", + invalidBinding = "InvalidBinding", + invalidOperation = "InvalidOperation", + invalidReference = "InvalidReference", + invalidSelection = "InvalidSelection", + itemAlreadyExists = "ItemAlreadyExists", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + unsupportedOperation = "UnsupportedOperation", + invalidOperationInCellEditMode = "InvalidOperationInCellEditMode", + } + module Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the Runtime object, for use in "runtime.set({ ... })". */ + interface RuntimeUpdateData { + /** + * + * Turn on/off JavaScript events in current taskpane or content add-in. + * + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** An interface for updating data on the Application object, for use in "application.set({ ... })". */ + interface ApplicationUpdateData { + /** + * + * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + } + /** An interface for updating data on the Workbook object, for use in "workbook.set({ ... })". */ + interface WorkbookUpdateData { + /** + * + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesUpdateData; + } + /** An interface for updating data on the Worksheet object, for use in "worksheet.set({ ... })". */ + interface WorksheetUpdateData { + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * + * Gets or sets the worksheet's gridlines flag. + This flag determines whether gridlines are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * + * Gets or sets the worksheet's headings flag. + This flag determines whether headings are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * + * Returns or sets the standard (default) width of all the columns in the worksheet. + One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * + * Gets or sets the worksheet tab color. + When retrieving the tab color, if the worksheet is invisible, the value will be null. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + } + /** An interface for updating data on the WorksheetCollection object, for use in "worksheetCollection.set({ ... })". */ + interface WorksheetCollectionUpdateData { + items?: Excel.Interfaces.WorksheetData[]; + } + /** An interface for updating data on the Range object, for use in "range.set({ ... })". */ + interface RangeUpdateData { + /** + * + * Returns a data validation object. + * + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatUpdateData; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: any[][]; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Represents the style of the current range. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface for updating data on the RangeView object, for use in "rangeView.set({ ... })". */ + interface RangeViewUpdateData { + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: any[][]; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + } + /** An interface for updating data on the RangeViewCollection object, for use in "rangeViewCollection.set({ ... })". */ + interface RangeViewCollectionUpdateData { + items?: Excel.Interfaces.RangeViewData[]; + } + /** An interface for updating data on the SettingCollection object, for use in "settingCollection.set({ ... })". */ + interface SettingCollectionUpdateData { + items?: Excel.Interfaces.SettingData[]; + } + /** An interface for updating data on the Setting object, for use in "setting.set({ ... })". */ + interface SettingUpdateData { + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: any; + } + /** An interface for updating data on the NamedItemCollection object, for use in "namedItemCollection.set({ ... })". */ + interface NamedItemCollectionUpdateData { + items?: Excel.Interfaces.NamedItemData[]; + } + /** An interface for updating data on the NamedItem object, for use in "namedItem.set({ ... })". */ + interface NamedItemUpdateData { + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the BindingCollection object, for use in "bindingCollection.set({ ... })". */ + interface BindingCollectionUpdateData { + items?: Excel.Interfaces.BindingData[]; + } + /** An interface for updating data on the TableCollection object, for use in "tableCollection.set({ ... })". */ + interface TableCollectionUpdateData { + items?: Excel.Interfaces.TableData[]; + } + /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ + interface TableUpdateData { + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: string; + } + /** An interface for updating data on the TableColumnCollection object, for use in "tableColumnCollection.set({ ... })". */ + interface TableColumnCollectionUpdateData { + items?: Excel.Interfaces.TableColumnData[]; + } + /** An interface for updating data on the TableColumn object, for use in "tableColumn.set({ ... })". */ + interface TableColumnUpdateData { + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: string; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface for updating data on the TableRowCollection object, for use in "tableRowCollection.set({ ... })". */ + interface TableRowCollectionUpdateData { + items?: Excel.Interfaces.TableRowData[]; + } + /** An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". */ + interface TableRowUpdateData { + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface for updating data on the DataValidation object, for use in "dataValidation.set({ ... })". */ + interface DataValidationUpdateData { + /** + * + * Error alert when user enters invalid data. + * + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * + * Ignore blanks: no data validation will be performed on blank cells, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * + * Prompt when users select a cell. + * + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * + * Data Validation rule that contains different type of data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + } + /** An interface for updating data on the RangeFormat object, for use in "rangeFormat.set({ ... })". */ + interface RangeFormatUpdateData { + /** + * + * Returns the fill object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * + * Returns the font object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionUpdateData; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * + * Gets or sets the text orientation of all the cells within the range. + The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. + If the orientation within a range are not uniform, then null will be returned. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Determines if the row height of the Range object equals the standard height of the sheet. + Returns True if the row height of the Range object equals the standard height of the sheet. + Returns Null if the range contains more than one row and the rows aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the column width of the Range object equals the standard width of the sheet. + Returns True if the column width of the Range object equals the standard width of the sheet. + Returns Null if the range contains more than one column and the columns aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface for updating data on the FormatProtection object, for use in "formatProtection.set({ ... })". */ + interface FormatProtectionUpdateData { + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** An interface for updating data on the RangeFill object, for use in "rangeFill.set({ ... })". */ + interface RangeFillUpdateData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + } + /** An interface for updating data on the RangeBorder object, for use in "rangeBorder.set({ ... })". */ + interface RangeBorderUpdateData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } + /** An interface for updating data on the RangeBorderCollection object, for use in "rangeBorderCollection.set({ ... })". */ + interface RangeBorderCollectionUpdateData { + items?: Excel.Interfaces.RangeBorderData[]; + } + /** An interface for updating data on the RangeFont object, for use in "rangeFont.set({ ... })". */ + interface RangeFontUpdateData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + } + /** An interface for updating data on the ChartCollection object, for use in "chartCollection.set({ ... })". */ + interface ChartCollectionUpdateData { + items?: Excel.Interfaces.ChartData[]; + } + /** An interface for updating data on the Chart object, for use in "chart.set({ ... })". */ + interface ChartUpdateData { + /** + * + * Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesUpdateData; + /** + * + * Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * + * Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatUpdateData; + /** + * + * Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendUpdateData; + /** + * + * Represents the plotArea for the chart. + * + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaUpdateData; + /** + * + * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleUpdateData; + /** + * + * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to + the level of where the category labels are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Returns or sets the way that blank cells are plotted on a chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Returns or sets the way columns or rows are used as data series on the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotBy?: Excel.ChartPlotBy | "Rows" | "Columns"; + /** + * + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * + * Returns or sets a ChartSeriesNameLevel enumeration constant referring to + the level of where the series names are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * + * Returns or sets the chart style for the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the ChartAreaFormat object, for use in "chartAreaFormat.set({ ... })". */ + interface ChartAreaFormatUpdateData { + /** + * + * Represents the border format of chart area, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartSeriesCollection object, for use in "chartSeriesCollection.set({ ... })". */ + interface ChartSeriesCollectionUpdateData { + items?: Excel.Interfaces.ChartSeriesData[]; + } + /** An interface for updating data on the ChartSeries object, for use in "chartSeries.set({ ... })". */ + interface ChartSeriesUpdateData { + /** + * + * Represents a collection of all dataLabels in the series. + * + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsUpdateData; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatUpdateData; + /** + * + * Returns or sets the group for the specified series. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * + * Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * + * Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + firstSliceAngle?: number; + /** + * + * Represents the gap width of a chart series. Only valid on bar and column charts, as well as + specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * + * Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable to line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * + * Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + splitType?: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** An interface for updating data on the ChartSeriesFormat object, for use in "chartSeriesFormat.set({ ... })". */ + interface ChartSeriesFormatUpdateData { + /** + * + * Represents line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartPointsCollection object, for use in "chartPointsCollection.set({ ... })". */ + interface ChartPointsCollectionUpdateData { + items?: Excel.Interfaces.ChartPointData[]; + } + /** An interface for updating data on the ChartPoint object, for use in "chartPoint.set({ ... })". */ + interface ChartPointUpdateData { + /** + * + * Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelUpdateData; + /** + * + * Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatUpdateData; + /** + * + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + } + /** An interface for updating data on the ChartPointFormat object, for use in "chartPointFormat.set({ ... })". */ + interface ChartPointFormatUpdateData { + /** + * + * Represents the border format of a chart data point, which includes color, style, and weight information. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + } + /** An interface for updating data on the ChartAxes object, for use in "chartAxes.set({ ... })". */ + interface ChartAxesUpdateData { + /** + * + * Represents the category axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * + * Represents the series axis of a 3-dimensional chart. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisUpdateData; + /** + * + * Represents the value axis in an axis. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisUpdateData; + } + /** An interface for updating data on the ChartAxis object, for use in "chartAxis.set({ ... })". */ + interface ChartAxisUpdateData { + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatUpdateData; + /** + * + * Returns a Gridlines object that represents the major gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesUpdateData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleUpdateData; + /** + * + * Represents the alignment for the specified axis tick label. See Excel.ChartTextHorizontalAlignment for detail. + * + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents whether value axis crosses the category axis between categories. + * + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + majorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit?: any; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum?: any; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + minorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * + * Represents whether an axis is multilevel or not. + * + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * + * Represents the format code for the axis tick label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * Represents the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. + * + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * + * Represents the specified axis position where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the text orientation of the axis tick label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisFormat object, for use in "chartAxisFormat.set({ ... })". */ + interface ChartAxisFormatUpdateData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartAxisTitle object, for use in "chartAxisTitle.set({ ... })". */ + interface ChartAxisTitleUpdateData { + /** + * + * Represents the formatting of chart axis title. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatUpdateData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartAxisTitleFormat object, for use in "chartAxisTitleFormat.set({ ... })". */ + interface ChartAxisTitleFormatUpdateData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartDataLabels object, for use in "chartDataLabels.set({ ... })". */ + interface ChartDataLabelsUpdateData { + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * + * Represents whether data labels automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the format code for data labels. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * + * Represents the text orientation of data labels. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + } + /** An interface for updating data on the ChartDataLabel object, for use in "chartDataLabel.set({ ... })". */ + interface ChartDataLabelUpdateData { + /** + * + * Represents the format of chart data label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatUpdateData; + /** + * + * Boolean value representing if data label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart data label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * String value that represents the format code for data label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data label on a chart. + * + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * + * String representing the text of the data label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * + * Represents the text orientation of chart data label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + } + /** An interface for updating data on the ChartDataLabelFormat object, for use in "chartDataLabelFormat.set({ ... })". */ + interface ChartDataLabelFormatUpdateData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartGridlines object, for use in "chartGridlines.set({ ... })". */ + interface ChartGridlinesUpdateData { + /** + * + * Represents the formatting of chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatUpdateData; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartGridlinesFormat object, for use in "chartGridlinesFormat.set({ ... })". */ + interface ChartGridlinesFormatUpdateData { + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartLegend object, for use in "chartLegend.set({ ... })". */ + interface ChartLegendUpdateData { + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatUpdateData; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface for updating data on the ChartLegendEntry object, for use in "chartLegendEntry.set({ ... })". */ + interface ChartLegendEntryUpdateData { + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartLegendEntryCollection object, for use in "chartLegendEntryCollection.set({ ... })". */ + interface ChartLegendEntryCollectionUpdateData { + items?: Excel.Interfaces.ChartLegendEntryData[]; + } + /** An interface for updating data on the ChartLegendFormat object, for use in "chartLegendFormat.set({ ... })". */ + interface ChartLegendFormatUpdateData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartTitle object, for use in "chartTitle.set({ ... })". */ + interface ChartTitleUpdateData { + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatUpdateData; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; + /** + * + * Represents a boolean value that determines if the chart title has a shadow. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface for updating data on the ChartFormatString object, for use in "chartFormatString.set({ ... })". */ + interface ChartFormatStringUpdateData { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartTitleFormat object, for use in "chartTitleFormat.set({ ... })". */ + interface ChartTitleFormatUpdateData { + /** + * + * Represents the border format of chart title, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartBorder object, for use in "chartBorder.set({ ... })". */ + interface ChartBorderUpdateData { + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the border, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface for updating data on the ChartLineFormat object, for use in "chartLineFormat.set({ ... })". */ + interface ChartLineFormatUpdateData { + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the line, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface for updating data on the ChartFont object, for use in "chartFont.set({ ... })". */ + interface ChartFontUpdateData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: Excel.ChartUnderlineStyle | "None" | "Single"; + } + /** An interface for updating data on the ChartTrendline object, for use in "chartTrendline.set({ ... })". */ + interface ChartTrendlineUpdateData { + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatUpdateData; + /** + * + * Represents the label of a chart trendline. + * + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelUpdateData; + /** + * + * Represents the number of periods that the trendline extends backward. + * + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * + * Represents the number of periods that the trendline extends forward. + * + * [Api set: ExcelApi 1.8] + */ + forwardPeriod?: number; + /** + * + * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * + * True if the equation for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * + * True if the R-squared for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; + } + /** An interface for updating data on the ChartTrendlineCollection object, for use in "chartTrendlineCollection.set({ ... })". */ + interface ChartTrendlineCollectionUpdateData { + items?: Excel.Interfaces.ChartTrendlineData[]; + } + /** An interface for updating data on the ChartTrendlineFormat object, for use in "chartTrendlineFormat.set({ ... })". */ + interface ChartTrendlineFormatUpdateData { + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } + /** An interface for updating data on the ChartTrendlineLabel object, for use in "chartTrendlineLabel.set({ ... })". */ + interface ChartTrendlineLabelUpdateData { + /** + * + * Represents the format of chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatUpdateData; + /** + * + * Boolean value representing if trendline label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart trendline label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * + * Represents the horizontal alignment for chart trendline label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of trendline label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * String value that represents the format code for trendline label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * String representing the text of the trendline label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * + * Represents the text orientation of chart trendline label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart trendline label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of trendline label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + } + /** An interface for updating data on the ChartTrendlineLabelFormat object, for use in "chartTrendlineLabelFormat.set({ ... })". */ + interface ChartTrendlineLabelFormatUpdateData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontUpdateData; + } + /** An interface for updating data on the ChartPlotArea object, for use in "chartPlotArea.set({ ... })". */ + interface ChartPlotAreaUpdateData { + /** + * + * Represents the formatting of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatUpdateData; + /** + * + * Represents the height value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * + * Represents the insideHeight value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * + * Represents the insideLeft value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * + * Represents the insideTop value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * + * Represents the insideWidth value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * + * Represents the left value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * Represents the position of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * + * Represents the top value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the width value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface for updating data on the ChartPlotAreaFormat object, for use in "chartPlotAreaFormat.set({ ... })". */ + interface ChartPlotAreaFormatUpdateData { + /** + * + * Represents the border attributes of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderUpdateData; + } + /** An interface for updating data on the CustomXmlPartScopedCollection object, for use in "customXmlPartScopedCollection.set({ ... })". */ + interface CustomXmlPartScopedCollectionUpdateData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the CustomXmlPartCollection object, for use in "customXmlPartCollection.set({ ... })". */ + interface CustomXmlPartCollectionUpdateData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the PivotTableCollection object, for use in "pivotTableCollection.set({ ... })". */ + interface PivotTableCollectionUpdateData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** An interface for updating data on the PivotTable object, for use in "pivotTable.set({ ... })". */ + interface PivotTableUpdateData { + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: string; + } + /** An interface for updating data on the PivotLayout object, for use in "pivotLayout.set({ ... })". */ + interface PivotLayoutUpdateData { + /** + * + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if the PivotTable report shows grand totals for columns. + * + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * + * True if the PivotTable report shows grand totals for rows. + * + * [Api set: ExcelApi 1.8] + */ + showRowGrandTotals?: boolean; + /** + * + * This property indicates the SubtotalLocationType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; + } + /** An interface for updating data on the PivotHierarchyCollection object, for use in "pivotHierarchyCollection.set({ ... })". */ + interface PivotHierarchyCollectionUpdateData { + items?: Excel.Interfaces.PivotHierarchyData[]; + } + /** An interface for updating data on the PivotHierarchy object, for use in "pivotHierarchy.set({ ... })". */ + interface PivotHierarchyUpdateData { + /** + * + * Name of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + } + /** An interface for updating data on the RowColumnPivotHierarchyCollection object, for use in "rowColumnPivotHierarchyCollection.set({ ... })". */ + interface RowColumnPivotHierarchyCollectionUpdateData { + items?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + } + /** An interface for updating data on the RowColumnPivotHierarchy object, for use in "rowColumnPivotHierarchy.set({ ... })". */ + interface RowColumnPivotHierarchyUpdateData { + /** + * + * Name of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Position of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + } + /** An interface for updating data on the FilterPivotHierarchyCollection object, for use in "filterPivotHierarchyCollection.set({ ... })". */ + interface FilterPivotHierarchyCollectionUpdateData { + items?: Excel.Interfaces.FilterPivotHierarchyData[]; + } + /** An interface for updating data on the FilterPivotHierarchy object, for use in "filterPivotHierarchy.set({ ... })". */ + interface FilterPivotHierarchyUpdateData { + /** + * + * Determines whether to allow multiple filter items. + * + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * + * Name of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Position of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + } + /** An interface for updating data on the DataPivotHierarchyCollection object, for use in "dataPivotHierarchyCollection.set({ ... })". */ + interface DataPivotHierarchyCollectionUpdateData { + items?: Excel.Interfaces.DataPivotHierarchyData[]; + } + /** An interface for updating data on the DataPivotHierarchy object, for use in "dataPivotHierarchy.set({ ... })". */ + interface DataPivotHierarchyUpdateData { + /** + * + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldUpdateData; + /** + * + * Name of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Number format of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * Position of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * + * Determines whether the data should be sown as a specific summary calculation or not. + * + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * + * Determines whether to show all items of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; + } + /** An interface for updating data on the PivotFieldCollection object, for use in "pivotFieldCollection.set({ ... })". */ + interface PivotFieldCollectionUpdateData { + items?: Excel.Interfaces.PivotFieldData[]; + } + /** An interface for updating data on the PivotField object, for use in "pivotField.set({ ... })". */ + interface PivotFieldUpdateData { + /** + * + * Name of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Determines whether to show all items of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * + * Subtotals of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + subtotals?: Excel.Subtotals; + } + /** An interface for updating data on the PivotItemCollection object, for use in "pivotItemCollection.set({ ... })". */ + interface PivotItemCollectionUpdateData { + items?: Excel.Interfaces.PivotItemData[]; + } + /** An interface for updating data on the PivotItem object, for use in "pivotItem.set({ ... })". */ + interface PivotItemUpdateData { + /** + * + * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. + * + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * + * Name of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Determines whether the PivotItem is visible or not. + * + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". */ + interface DocumentPropertiesUpdateData { + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". */ + interface CustomPropertyUpdateData { + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: any; + } + /** An interface for updating data on the CustomPropertyCollection object, for use in "customPropertyCollection.set({ ... })". */ + interface CustomPropertyCollectionUpdateData { + items?: Excel.Interfaces.CustomPropertyData[]; + } + /** An interface for updating data on the ConditionalFormatCollection object, for use in "conditionalFormatCollection.set({ ... })". */ + interface ConditionalFormatCollectionUpdateData { + items?: Excel.Interfaces.ConditionalFormatData[]; + } + /** An interface for updating data on the ConditionalFormat object, for use in "conditionalFormat.set({ ... })". */ + interface ConditionalFormatUpdateData { + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatUpdateData; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatUpdateData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + priority?: number; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + } + /** An interface for updating data on the DataBarConditionalFormat object, for use in "dataBarConditionalFormat.set({ ... })". */ + interface DataBarConditionalFormatUpdateData { + /** + * + * Representation of all values to the left of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly?: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: Excel.ConditionalDataBarRule; + } + /** An interface for updating data on the ConditionalDataBarPositiveFormat object, for use in "conditionalDataBarPositiveFormat.set({ ... })". */ + interface ConditionalDataBarPositiveFormatUpdateData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** An interface for updating data on the ConditionalDataBarNegativeFormat object, for use in "conditionalDataBarNegativeFormat.set({ ... })". */ + interface ConditionalDataBarNegativeFormatUpdateData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** An interface for updating data on the CustomConditionalFormat object, for use in "customConditionalFormat.set({ ... })". */ + interface CustomConditionalFormatUpdateData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleUpdateData; + } + /** An interface for updating data on the ConditionalFormatRule object, for use in "conditionalFormatRule.set({ ... })". */ + interface ConditionalFormatRuleUpdateData { + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface for updating data on the IconSetConditionalFormat object, for use in "iconSetConditionalFormat.set({ ... })". */ + interface IconSetConditionalFormatUpdateData { + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + } + /** An interface for updating data on the ColorScaleConditionalFormat object, for use in "colorScaleConditionalFormat.set({ ... })". */ + interface ColorScaleConditionalFormatUpdateData { + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalColorScaleCriteria; + } + /** An interface for updating data on the TopBottomConditionalFormat object, for use in "topBottomConditionalFormat.set({ ... })". */ + interface TopBottomConditionalFormatUpdateData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTopBottomRule; + } + /** An interface for updating data on the PresetCriteriaConditionalFormat object, for use in "presetCriteriaConditionalFormat.set({ ... })". */ + interface PresetCriteriaConditionalFormatUpdateData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalPresetCriteriaRule; + } + /** An interface for updating data on the TextConditionalFormat object, for use in "textConditionalFormat.set({ ... })". */ + interface TextConditionalFormatUpdateData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTextComparisonRule; + } + /** An interface for updating data on the CellValueConditionalFormat object, for use in "cellValueConditionalFormat.set({ ... })". */ + interface CellValueConditionalFormatUpdateData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalCellValueRule; + } + /** An interface for updating data on the ConditionalRangeFormat object, for use in "conditionalRangeFormat.set({ ... })". */ + interface ConditionalRangeFormatUpdateData { + /** + * + * Collection of border objects that apply to the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontUpdateData; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface for updating data on the ConditionalRangeFont object, for use in "conditionalRangeFont.set({ ... })". */ + interface ConditionalRangeFontUpdateData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; + } + /** An interface for updating data on the ConditionalRangeFill object, for use in "conditionalRangeFill.set({ ... })". */ + interface ConditionalRangeFillUpdateData { + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + } + /** An interface for updating data on the ConditionalRangeBorder object, for use in "conditionalRangeBorder.set({ ... })". */ + interface ConditionalRangeBorderUpdateData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; + } + /** An interface for updating data on the ConditionalRangeBorderCollection object, for use in "conditionalRangeBorderCollection.set({ ... })". */ + interface ConditionalRangeBorderCollectionUpdateData { + /** + * + * Gets the bottom border. + * + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the left border. + * + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the right border. + * + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border. + * + * [Api set: ExcelApi 1.6] + */ + top?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + items?: Excel.Interfaces.ConditionalRangeBorderData[]; + } + /** An interface for updating data on the Style object, for use in "style.set({ ... })". */ + interface StyleUpdateData { + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillUpdateData; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontUpdateData; + /** + * + * Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * The text orientation for the style. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** An interface for updating data on the StyleCollection object, for use in "styleCollection.set({ ... })". */ + interface StyleCollectionUpdateData { + items?: Excel.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling "runtime.toJSON()". */ + interface RuntimeData { + /** + * + * Turn on/off JavaScript events in current taskpane or content add-in. + * + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** An interface describing the data returned by calling "application.toJSON()". */ + interface ApplicationData { + /** + * + * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + } + /** An interface describing the data returned by calling "workbook.toJSON()". */ + interface WorkbookData { + /** + * + * Represents the Excel application instance that contains this workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationData; + /** + * + * Represents a collection of bindings that are part of the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingData[]; + /** + * + * Represents the collection of custom XML parts contained by this workbook. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + customXmlParts?: Excel.Interfaces.CustomXmlPartData[]; + /** + * + * Represents a collection of workbook scoped named items (named ranges and constants). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * + * Represents a collection of PivotTables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * + * Gets the workbook properties. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesData; + /** + * + * Returns workbook protection object for a workbook. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionData; + /** + * + * Represents a collection of Settings associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + settings?: Excel.Interfaces.SettingData[]; + /** + * + * Represents a collection of styles associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + styles?: Excel.Interfaces.StyleData[]; + /** + * + * Represents a collection of tables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * + * Represents a collection of worksheets associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + worksheets?: Excel.Interfaces.WorksheetData[]; + /** + * + * Gets the workbook name. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * True if the workbook is open in Read-only mode. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + } + /** An interface describing the data returned by calling "workbookProtection.toJSON()". */ + interface WorkbookProtectionData { + /** + * + * Indicates if the workbook is protected. Read-Only. + * + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling "workbookCreated.toJSON()". */ + interface WorkbookCreatedData { + /** + * + * Returns a value that uniquely identifies the WorkbookCreated object. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + } + /** An interface describing the data returned by calling "worksheet.toJSON()". */ + interface WorksheetData { + /** + * + * Returns collection of charts that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartData[]; + /** + * + * Collection of names scoped to the current worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + names?: Excel.Interfaces.NamedItemData[]; + /** + * + * Collection of PivotTables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableData[]; + /** + * + * Returns sheet protection object for a worksheet. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionData; + /** + * + * Collection of tables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableData[]; + /** + * + * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * + * Gets or sets the worksheet's gridlines flag. + This flag determines whether gridlines are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * + * Gets or sets the worksheet's headings flag. + This flag determines whether headings are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: number; + /** + * + * Returns or sets the standard (default) width of all the columns in the worksheet. + One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: number; + /** + * + * Gets or sets the worksheet tab color. + When retrieving the tab color, if the worksheet is invisible, the value will be null. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: string; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: Excel.SheetVisibility | "Visible" | "Hidden" | "VeryHidden"; + } + /** An interface describing the data returned by calling "worksheetCollection.toJSON()". */ + interface WorksheetCollectionData { + items?: Excel.Interfaces.WorksheetData[]; + } + /** An interface describing the data returned by calling "worksheetProtection.toJSON()". */ + interface WorksheetProtectionData { + /** + * + * Sheet protection options. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + options?: Excel.WorksheetProtectionOptions; + /** + * + * Indicates if the worksheet is protected. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling "range.toJSON()". */ + interface RangeData { + /** + * + * Collection of ConditionalFormats that intersect the range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * + * Returns a data validation object. + * + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * + * The worksheet containing the current range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. "Sheet1!A1:B4"). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: string; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: string; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: number; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: number; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: number; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: any[][]; + /** + * + * Represents if all cells of the current range are hidden. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents if the current range is an entire column. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * + * Represents if the current range is an entire row. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: any[][]; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: any[][]; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: number; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: number; + /** + * + * Represents the style of the current range. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi 1.7] + */ + style?: string; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: Excel.RangeValueType[][]; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "rangeView.toJSON()". */ + interface RangeViewData { + /** + * + * Represents a collection of range views associated with the range. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rows?: Excel.Interfaces.RangeViewData[]; + /** + * + * Represents the cell addresses of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: any[][]; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: number; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: any[][]; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: any[][]; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: any[][]; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: number; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: any[][]; + /** + * + * Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: number; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: string[][]; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: Excel.RangeValueType[][]; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "rangeViewCollection.toJSON()". */ + interface RangeViewCollectionData { + items?: Excel.Interfaces.RangeViewData[]; + } + /** An interface describing the data returned by calling "settingCollection.toJSON()". */ + interface SettingCollectionData { + items?: Excel.Interfaces.SettingData[]; + } + /** An interface describing the data returned by calling "setting.toJSON()". */ + interface SettingData { + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: string; + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: any; + } + /** An interface describing the data returned by calling "namedItemCollection.toJSON()". */ + interface NamedItemCollectionData { + items?: Excel.Interfaces.NamedItemData[]; + } + /** An interface describing the data returned by calling "namedItem.toJSON()". */ + interface NamedItemData { + /** + * + * Returns an object containing values and types of the named item. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: any; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: Excel.NamedItemScope | "Worksheet" | "Workbook"; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: Excel.NamedItemType | "String" | "Integer" | "Double" | "Boolean" | "Range" | "Error" | "Array"; + /** + * + * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: any; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "namedItemArrayValues.toJSON()". */ + interface NamedItemArrayValuesData { + /** + * + * Represents the types for each item in the named item array + * + * [Api set: ExcelApi 1.7] + */ + types?: Excel.RangeValueType[][]; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "binding.toJSON()". */ + interface BindingData { + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: Excel.BindingType | "Range" | "Table" | "Text"; + } + /** An interface describing the data returned by calling "bindingCollection.toJSON()". */ + interface BindingCollectionData { + items?: Excel.Interfaces.BindingData[]; + } + /** An interface describing the data returned by calling "tableCollection.toJSON()". */ + interface TableCollectionData { + items?: Excel.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Represents a collection of all the columns in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnData[]; + /** + * + * Represents a collection of all the rows in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowData[]; + /** + * + * Represents the sorting for the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortData; + /** + * + * The worksheet containing the current table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Returns a numeric id. + * + * [Api set: ExcelApi 1.8] + */ + legacyId?: string; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: string; + } + /** An interface describing the data returned by calling "tableColumnCollection.toJSON()". */ + interface TableColumnCollectionData { + items?: Excel.Interfaces.TableColumnData[]; + } + /** An interface describing the data returned by calling "tableColumn.toJSON()". */ + interface TableColumnData { + /** + * + * Retrieve the filter applied to the column. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterData; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: number; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: string; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "tableRowCollection.toJSON()". */ + interface TableRowCollectionData { + items?: Excel.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling "tableRow.toJSON()". */ + interface TableRowData { + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: any[][]; + } + /** An interface describing the data returned by calling "dataValidation.toJSON()". */ + interface DataValidationData { + /** + * + * Error alert when user enters invalid data. + * + * [Api set: ExcelApi 1.8] + */ + errorAlert?: Excel.DataValidationErrorAlert; + /** + * + * Ignore blanks: no data validation will be performed on blank cells, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * + * Prompt when users select a cell. + * + * [Api set: ExcelApi 1.8] + */ + prompt?: Excel.DataValidationPrompt; + /** + * + * Data Validation rule that contains different type of data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + rule?: Excel.DataValidationRule; + /** + * + * Type of the data validation, see Excel.DataValidationType for details. + * + * [Api set: ExcelApi 1.8] + */ + type?: Excel.DataValidationType | "None" | "WholeNumber" | "Decimal" | "List" | "Date" | "Time" | "TextLength" | "Custom" | "Inconsistent" | "MixedCriteria"; + /** + * + * Represents if all cell values are valid according to the data validation rules. + Returns true if all cell values are valid, or false if all cell values are invalid. + Returns null if there are both valid and invalid cell values within the range. + * + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** An interface describing the data returned by calling "rangeFormat.toJSON()". */ + interface RangeFormatData { + /** + * + * Collection of border objects that apply to the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * + * Returns the fill object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * + * Returns the font object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * + * Returns the format protection object for a range. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionData; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * + * Gets or sets the text orientation of all the cells within the range. + The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. + If the orientation within a range are not uniform, then null will be returned. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Determines if the row height of the Range object equals the standard height of the sheet. + Returns True if the row height of the Range object equals the standard height of the sheet. + Returns Null if the range contains more than one row and the rows aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the column width of the Range object equals the standard width of the sheet. + Returns True if the column width of the Range object equals the standard width of the sheet. + Returns Null if the range contains more than one column and the columns aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling "formatProtection.toJSON()". */ + interface FormatProtectionData { + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** An interface describing the data returned by calling "rangeFill.toJSON()". */ + interface RangeFillData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + } + /** An interface describing the data returned by calling "rangeBorder.toJSON()". */ + interface RangeBorderData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: Excel.BorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; + } + /** An interface describing the data returned by calling "rangeBorderCollection.toJSON()". */ + interface RangeBorderCollectionData { + items?: Excel.Interfaces.RangeBorderData[]; + } + /** An interface describing the data returned by calling "rangeFont.toJSON()". */ + interface RangeFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; + } + /** An interface describing the data returned by calling "chartCollection.toJSON()". */ + interface ChartCollectionData { + items?: Excel.Interfaces.ChartData[]; + } + /** An interface describing the data returned by calling "chart.toJSON()". */ + interface ChartData { + /** + * + * Represents chart axes. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesData; + /** + * + * Represents the datalabels on the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * + * Encapsulates the format properties for the chart area. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatData; + /** + * + * Represents the legend for the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendData; + /** + * + * Represents the plotArea for the chart. + * + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaData; + /** + * + * Represents either a single series or collection of series in the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesData[]; + /** + * + * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleData; + /** + * + * The worksheet containing the current chart. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to + the level of where the category labels are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: number; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Returns or sets the way that blank cells are plotted on a chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: Excel.ChartDisplayBlanksAs | "NotPlotted" | "Zero" | "Interplotted"; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + id?: string; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Returns or sets the way columns or rows are used as data series on the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotBy?: Excel.ChartPlotBy | "Rows" | "Columns"; + /** + * + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * + * Returns or sets a ChartSeriesNameLevel enumeration constant referring to + the level of where the series names are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: number; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * + * Returns or sets the chart style for the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + style?: number; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartAreaFormat.toJSON()". */ + interface ChartAreaFormatData { + /** + * + * Represents the border format of chart area, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartSeriesCollection.toJSON()". */ + interface ChartSeriesCollectionData { + items?: Excel.Interfaces.ChartSeriesData[]; + } + /** An interface describing the data returned by calling "chartSeries.toJSON()". */ + interface ChartSeriesData { + /** + * + * Represents a collection of all dataLabels in the series. + * + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatData; + /** + * + * Represents a collection of all points in the series. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointData[]; + /** + * + * Represents a collection of trendlines in the series. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + trendlines?: Excel.Interfaces.ChartTrendlineData[]; + /** + * + * Returns or sets the group for the specified series. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel"; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: number; + /** + * + * Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + explosion?: number; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * + * Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + firstSliceAngle?: number; + /** + * + * Represents the gap width of a chart series. Only valid on bar and column charts, as well as + specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: number; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + overlap?: number; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: number; + /** + * + * Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: number; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable to line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * + * Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + splitType?: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** An interface describing the data returned by calling "chartSeriesFormat.toJSON()". */ + interface ChartSeriesFormatData { + /** + * + * Represents line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartPointsCollection.toJSON()". */ + interface ChartPointsCollectionData { + items?: Excel.Interfaces.ChartPointData[]; + } + /** An interface describing the data returned by calling "chartPoint.toJSON()". */ + interface ChartPointData { + /** + * + * Returns the data label of a chart point. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelData; + /** + * + * Encapsulates the format properties chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatData; + /** + * + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: string; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: string; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: number; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: any; + } + /** An interface describing the data returned by calling "chartPointFormat.toJSON()". */ + interface ChartPointFormatData { + /** + * + * Represents the border format of a chart data point, which includes color, style, and weight information. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + } + /** An interface describing the data returned by calling "chartAxes.toJSON()". */ + interface ChartAxesData { + /** + * + * Represents the category axis in a chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the series axis of a 3-dimensional chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the value axis in an axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisData; + } + /** An interface describing the data returned by calling "chartAxis.toJSON()". */ + interface ChartAxisData { + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatData; + /** + * + * Returns a Gridlines object that represents the major gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Represents the axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleData; + /** + * + * Represents the alignment for the specified axis tick label. See Excel.ChartTextHorizontalAlignment for detail. + * + * [Api set: ExcelApi 1.8] + */ + alignment?: Excel.ChartTickLabelAlignment | "Center" | "Left" | "Right"; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. + * Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. + * + * [Api set: ExcelApi 1.7] + */ + crossesAt?: number; + /** + * + * Represents the custom axis display unit value. Read-only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: number; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: Excel.ChartAxisDisplayUnit | "None" | "Hundreds" | "Thousands" | "TenThousands" | "HundredThousands" | "Millions" | "TenMillions" | "HundredMillions" | "Billions" | "Trillions" | "Custom"; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents whether value axis crosses the category axis between categories. + * + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: number; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + majorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit?: any; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum?: any; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: Excel.ChartAxisTickMark | "None" | "Cross" | "Inside" | "Outside"; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + minorTimeUnitScale?: Excel.ChartAxisTimeUnit | "Days" | "Months" | "Years"; + /** + * + * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + /** + * + * Represents whether an axis is multilevel or not. + * + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * + * Represents the format code for the axis tick label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * Represents the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. + * + * [Api set: ExcelApi 1.8] + */ + offset?: number; + /** + * + * Represents the specified axis position where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; + /** + * + * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. + * + * [Api set: ExcelApi 1.8] + */ + positionAt?: number; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: Excel.ChartAxisScaleType | "Linear" | "Logarithmic"; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the text orientation of the axis tick label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: any; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: Excel.ChartAxisTickLabelPosition | "NextToAxis" | "High" | "Low" | "None"; + /** + * + * Represents the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: any; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: number; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartAxisType | "Invalid" | "Category" | "Value" | "Series"; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartAxisFormat.toJSON()". */ + interface ChartAxisFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartAxisTitle.toJSON()". */ + interface ChartAxisTitleData { + /** + * + * Represents the formatting of chart axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartAxisTitleFormat.toJSON()". */ + interface ChartAxisTitleFormatData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartDataLabels.toJSON()". */ + interface ChartDataLabelsData { + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * + * Represents whether data labels automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the format code for data labels. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * + * Represents the text orientation of data labels. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + } + /** An interface describing the data returned by calling "chartDataLabel.toJSON()". */ + interface ChartDataLabelData { + /** + * + * Represents the format of chart data label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * + * Boolean value representing if data label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart data label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * + * Returns the height, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * String value that represents the format code for data label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"; + /** + * + * String representing the separator used for the data label on a chart. + * + * [Api set: ExcelApi 1.7] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * + * String representing the text of the data label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * + * Represents the text orientation of chart data label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * Returns the width, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartDataLabelFormat.toJSON()". */ + interface ChartDataLabelFormatData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartGridlines.toJSON()". */ + interface ChartGridlinesData { + /** + * + * Represents the formatting of chart gridlines. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatData; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartGridlinesFormat.toJSON()". */ + interface ChartGridlinesFormatData { + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartLegend.toJSON()". */ + interface ChartLegendData { + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatData; + /** + * + * Represents a collection of legendEntries in the legend. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + legendEntries?: Excel.Interfaces.ChartLegendEntryData[]; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: Excel.ChartLegendPosition | "Invalid" | "Top" | "Bottom" | "Left" | "Right" | "Corner" | "Custom"; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartLegendEntry.toJSON()". */ + interface ChartLegendEntryData { + /** + * + * Represents the height of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * + * Represents the index of the LegendEntry in the Chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + index?: number; + /** + * + * Represents the left of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * Represents the top of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartLegendEntryCollection.toJSON()". */ + interface ChartLegendEntryCollectionData { + items?: Excel.Interfaces.ChartLegendEntryData[]; + } + /** An interface describing the data returned by calling "chartLegendFormat.toJSON()". */ + interface ChartLegendFormatData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartTitle.toJSON()". */ + interface ChartTitleData { + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatData; + /** + * + * Returns the height, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + height?: number; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: number; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: Excel.ChartTitlePosition | "Automatic" | "Top" | "Bottom" | "Left" | "Right"; + /** + * + * Represents a boolean value that determines if the chart title has a shadow. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Returns the width, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartFormatString.toJSON()". */ + interface ChartFormatStringData { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartTitleFormat.toJSON()". */ + interface ChartTitleFormatData { + /** + * + * Represents the border format of chart title, which includes color, linestyle, and weight. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartBorder.toJSON()". */ + interface ChartBorderData { + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color?: string; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the border, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface describing the data returned by calling "chartLineFormat.toJSON()". */ + interface ChartLineFormatData { + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: Excel.ChartLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Grey25" | "Grey50" | "Grey75" | "Automatic" | "RoundDot"; + /** + * + * Represents weight of the line, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: number; + } + /** An interface describing the data returned by calling "chartFont.toJSON()". */ + interface ChartFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: Excel.ChartUnderlineStyle | "None" | "Single"; + } + /** An interface describing the data returned by calling "chartTrendline.toJSON()". */ + interface ChartTrendlineData { + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatData; + /** + * + * Represents the label of a chart trendline. + * + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelData; + /** + * + * Represents the number of periods that the trendline extends backward. + * + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: number; + /** + * + * Represents the number of periods that the trendline extends forward. + * + * [Api set: ExcelApi 1.8] + */ + forwardPeriod?: number; + /** + * + * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: any; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: number; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: number; + /** + * + * True if the equation for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * + * True if the R-squared for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.ChartTrendlineType | "Linear" | "Exponential" | "Logarithmic" | "MovingAverage" | "Polynomial" | "Power"; + } + /** An interface describing the data returned by calling "chartTrendlineCollection.toJSON()". */ + interface ChartTrendlineCollectionData { + items?: Excel.Interfaces.ChartTrendlineData[]; + } + /** An interface describing the data returned by calling "chartTrendlineFormat.toJSON()". */ + interface ChartTrendlineFormatData { + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartTrendlineLabel.toJSON()". */ + interface ChartTrendlineLabelData { + /** + * + * Represents the format of chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatData; + /** + * + * Boolean value representing if trendline label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart trendline label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: string; + /** + * + * Returns the height, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * + * Represents the horizontal alignment for chart trendline label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of trendline label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * String value that represents the format code for trendline label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * String representing the text of the trendline label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: string; + /** + * + * Represents the text orientation of chart trendline label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the vertical alignment of chart trendline label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of trendline label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"; + /** + * + * Returns the width, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartTrendlineLabelFormat.toJSON()". */ + interface ChartTrendlineLabelFormatData { + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartPlotArea.toJSON()". */ + interface ChartPlotAreaData { + /** + * + * Represents the formatting of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatData; + /** + * + * Represents the height value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + height?: number; + /** + * + * Represents the insideHeight value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideHeight?: number; + /** + * + * Represents the insideLeft value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideLeft?: number; + /** + * + * Represents the insideTop value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideTop?: number; + /** + * + * Represents the insideWidth value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideWidth?: number; + /** + * + * Represents the left value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + left?: number; + /** + * + * Represents the position of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + position?: Excel.ChartPlotAreaPosition | "Automatic" | "Custom"; + /** + * + * Represents the top value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + top?: number; + /** + * + * Represents the width value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartPlotAreaFormat.toJSON()". */ + interface ChartPlotAreaFormatData { + /** + * + * Represents the border attributes of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderData; + } + /** An interface describing the data returned by calling "tableSort.toJSON()". */ + interface TableSortData { + /** + * + * Represents the current conditions used to last sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + fields?: Excel.SortField[]; + /** + * + * Represents whether the casing impacted the last sort of the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + method?: Excel.SortMethod | "PinYin" | "StrokeCount"; + } + /** An interface describing the data returned by calling "filter.toJSON()". */ + interface FilterData { + /** + * + * The currently applied filter on the given column. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: Excel.FilterCriteria; + } + /** An interface describing the data returned by calling "customXmlPartScopedCollection.toJSON()". */ + interface CustomXmlPartScopedCollectionData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling "customXmlPartCollection.toJSON()". */ + interface CustomXmlPartCollectionData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling "customXmlPart.toJSON()". */ + interface CustomXmlPartData { + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling "pivotTableCollection.toJSON()". */ + interface PivotTableCollectionData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** An interface describing the data returned by calling "pivotTable.toJSON()". */ + interface PivotTableData { + /** + * + * The Column Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + columnHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * + * The Data Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + dataHierarchies?: Excel.Interfaces.DataPivotHierarchyData[]; + /** + * + * The Filter Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + filterHierarchies?: Excel.Interfaces.FilterPivotHierarchyData[]; + /** + * + * The Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + hierarchies?: Excel.Interfaces.PivotHierarchyData[]; + /** + * + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutData; + /** + * + * The Row Pivot Hierarchies of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + /** + * + * The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Id of the PivotTable. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling "pivotLayout.toJSON()". */ + interface PivotLayoutData { + /** + * + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + layoutType?: Excel.PivotLayoutType | "Compact" | "Tabular" | "Outline"; + /** + * + * True if the PivotTable report shows grand totals for columns. + * + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * + * True if the PivotTable report shows grand totals for rows. + * + * [Api set: ExcelApi 1.8] + */ + showRowGrandTotals?: boolean; + /** + * + * This property indicates the SubtotalLocationType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: Excel.SubtotalLocationType | "AtTop" | "AtBottom" | "Off"; + } + /** An interface describing the data returned by calling "pivotHierarchyCollection.toJSON()". */ + interface PivotHierarchyCollectionData { + items?: Excel.Interfaces.PivotHierarchyData[]; + } + /** An interface describing the data returned by calling "pivotHierarchy.toJSON()". */ + interface PivotHierarchyData { + /** + * + * Returns the PivotFields associated with the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * + * Id of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Name of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + } + /** An interface describing the data returned by calling "rowColumnPivotHierarchyCollection.toJSON()". */ + interface RowColumnPivotHierarchyCollectionData { + items?: Excel.Interfaces.RowColumnPivotHierarchyData[]; + } + /** An interface describing the data returned by calling "rowColumnPivotHierarchy.toJSON()". */ + interface RowColumnPivotHierarchyData { + /** + * + * Returns the PivotFields associated with the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * + * Id of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Name of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Position of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + } + /** An interface describing the data returned by calling "filterPivotHierarchyCollection.toJSON()". */ + interface FilterPivotHierarchyCollectionData { + items?: Excel.Interfaces.FilterPivotHierarchyData[]; + } + /** An interface describing the data returned by calling "filterPivotHierarchy.toJSON()". */ + interface FilterPivotHierarchyData { + /** + * + * Returns the PivotFields associated with the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + fields?: Excel.Interfaces.PivotFieldData[]; + /** + * + * Determines whether to allow multiple filter items. + * + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * + * Id of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Name of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Position of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + } + /** An interface describing the data returned by calling "dataPivotHierarchyCollection.toJSON()". */ + interface DataPivotHierarchyCollectionData { + items?: Excel.Interfaces.DataPivotHierarchyData[]; + } + /** An interface describing the data returned by calling "dataPivotHierarchy.toJSON()". */ + interface DataPivotHierarchyData { + /** + * + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldData; + /** + * + * Id of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Name of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Number format of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: string; + /** + * + * Position of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: number; + /** + * + * Determines whether the data should be sown as a specific summary calculation or not. + * + * [Api set: ExcelApi 1.8] + */ + showAs?: Excel.ShowAsRule; + /** + * + * Determines whether to show all items of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: Excel.AggregationFunction | "Unknown" | "Automatic" | "Sum" | "Count" | "Average" | "Max" | "Min" | "Product" | "CountNumbers" | "StandardDeviation" | "StandardDeviationP" | "Variance" | "VarianceP"; + } + /** An interface describing the data returned by calling "pivotFieldCollection.toJSON()". */ + interface PivotFieldCollectionData { + items?: Excel.Interfaces.PivotFieldData[]; + } + /** An interface describing the data returned by calling "pivotField.toJSON()". */ + interface PivotFieldData { + /** + * + * Returns the PivotFields associated with the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + items?: Excel.Interfaces.PivotItemData[]; + /** + * + * Id of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Name of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Determines whether to show all items of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * + * Subtotals of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + subtotals?: Excel.Subtotals; + } + /** An interface describing the data returned by calling "pivotItemCollection.toJSON()". */ + interface PivotItemCollectionData { + items?: Excel.Interfaces.PivotItemData[]; + } + /** An interface describing the data returned by calling "pivotItem.toJSON()". */ + interface PivotItemData { + /** + * + * Id of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + id?: string; + /** + * + * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. + * + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * + * Name of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + name?: string; + /** + * + * Determines whether the PivotItem is visible or not. + * + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "documentProperties.toJSON()". */ + interface DocumentPropertiesData { + /** + * + * Gets the collection of custom properties of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + custom?: Excel.Interfaces.CustomPropertyData[]; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: string; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: string; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: string; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: string; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + creationDate?: Date; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: string; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: string; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: string; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: number; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: string; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: string; + } + /** An interface describing the data returned by calling "customProperty.toJSON()". */ + interface CustomPropertyData { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: string; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: Excel.DocumentPropertyType | "Number" | "Boolean" | "Date" | "String" | "Float"; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: any; + } + /** An interface describing the data returned by calling "customPropertyCollection.toJSON()". */ + interface CustomPropertyCollectionData { + items?: Excel.Interfaces.CustomPropertyData[]; + } + /** An interface describing the data returned by calling "conditionalFormatCollection.toJSON()". */ + interface ConditionalFormatCollectionData { + items?: Excel.Interfaces.ConditionalFormatData[]; + } + /** An interface describing the data returned by calling "conditionalFormat.toJSON()". */ + interface ConditionalFormatData { + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". Read-only. + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". Read-only. + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + id?: string; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + priority?: number; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + type?: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"; + } + /** An interface describing the data returned by calling "dataBarConditionalFormat.toJSON()". */ + interface DataBarConditionalFormatData { + /** + * + * Representation of all values to the left of the axis in an Excel data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly?: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: Excel.ConditionalDataBarRule; + } + /** An interface describing the data returned by calling "conditionalDataBarPositiveFormat.toJSON()". */ + interface ConditionalDataBarPositiveFormatData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** An interface describing the data returned by calling "conditionalDataBarNegativeFormat.toJSON()". */ + interface ConditionalDataBarNegativeFormatData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** An interface describing the data returned by calling "customConditionalFormat.toJSON()". */ + interface CustomConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleData; + } + /** An interface describing the data returned by calling "conditionalFormatRule.toJSON()". */ + interface ConditionalFormatRuleData { + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface describing the data returned by calling "iconSetConditionalFormat.toJSON()". */ + interface IconSetConditionalFormatData { + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalIconCriterion[]; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + } + /** An interface describing the data returned by calling "colorScaleConditionalFormat.toJSON()". */ + interface ColorScaleConditionalFormatData { + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalColorScaleCriteria; + /** + * + * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). + * + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** An interface describing the data returned by calling "topBottomConditionalFormat.toJSON()". */ + interface TopBottomConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTopBottomRule; + } + /** An interface describing the data returned by calling "presetCriteriaConditionalFormat.toJSON()". */ + interface PresetCriteriaConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalPresetCriteriaRule; + } + /** An interface describing the data returned by calling "textConditionalFormat.toJSON()". */ + interface TextConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTextComparisonRule; + } + /** An interface describing the data returned by calling "cellValueConditionalFormat.toJSON()". */ + interface CellValueConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalCellValueRule; + } + /** An interface describing the data returned by calling "conditionalRangeFormat.toJSON()". */ + interface ConditionalRangeFormatData { + /** + * + * Collection of border objects that apply to the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderData[]; + /** + * + * Returns the fill object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillData; + /** + * + * Returns the font object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontData; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface describing the data returned by calling "conditionalRangeFont.toJSON()". */ + interface ConditionalRangeFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: Excel.ConditionalRangeFontUnderlineStyle | "None" | "Single" | "Double"; + } + /** An interface describing the data returned by calling "conditionalRangeFill.toJSON()". */ + interface ConditionalRangeFillData { + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + } + /** An interface describing the data returned by calling "conditionalRangeBorder.toJSON()". */ + interface ConditionalRangeBorderData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: Excel.ConditionalRangeBorderIndex | "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight"; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: Excel.ConditionalRangeBorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot"; + } + /** An interface describing the data returned by calling "conditionalRangeBorderCollection.toJSON()". */ + interface ConditionalRangeBorderCollectionData { + items?: Excel.Interfaces.ConditionalRangeBorderData[]; + } + /** An interface describing the data returned by calling "style.toJSON()". */ + interface StyleData { + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderData[]; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * + * Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: number; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: string; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: string; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: string; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * The text orientation for the style. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: number; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling "styleCollection.toJSON()". */ + interface StyleCollectionData { + items?: Excel.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling "functionResult.toJSON()". */ + interface FunctionResultData { + /** + * + * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. + * + * [Api set: ExcelApi 1.2] + */ + error?: string; + /** + * + * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). + * + * [Api set: ExcelApi 1.2] + */ + value?: T; + } + /** + * + * Represents the Excel Runtime class. + * + * [Api set: ExcelApi 1.5] + */ + interface RuntimeLoadOptions { + $all?: boolean; + /** + * + * Turn on/off JavaScript events in current taskpane or content add-in. + * + * [Api set: ExcelApi 1.8] + */ + enableEvents?: boolean; + } + /** + * + * Represents the Excel application that manages the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ApplicationLoadOptions { + $all?: boolean; + /** + * + * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. + * + * [Api set: ExcelApi 1.1 for get, 1.8 for set] + */ + calculationMode?: boolean; + } + /** + * + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorkbookLoadOptions { + $all?: boolean; + /** + * + * Represents the Excel application instance that contains this workbook. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationLoadOptions; + /** + * + * Represents a collection of bindings that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionLoadOptions; + /** + * + * Gets the workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + properties?: Excel.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Returns workbook protection object for a workbook. + * + * [Api set: ExcelApi 1.7] + */ + protection?: Excel.Interfaces.WorkbookProtectionLoadOptions; + /** + * + * Represents a collection of tables associated with the workbook. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * Gets the workbook name. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * True if the workbook is open in Read-only mode. Read-only. + * + * [Api set: ExcelApi 1.8] + */ + readOnly?: boolean; + } + /** + * + * Represents the protection of a workbook object. + * + * [Api set: ExcelApi 1.7] + */ + interface WorkbookProtectionLoadOptions { + $all?: boolean; + /** + * + * Indicates if the workbook is protected. Read-Only. + * + * [Api set: ExcelApi 1.7] + */ + protected?: boolean; + } + /** + * + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetLoadOptions { + $all?: boolean; + /** + * + * Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * Gets or sets the worksheet's gridlines flag. + This flag determines whether gridlines are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * + * Gets or sets the worksheet's headings flag. + This flag determines whether headings are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * + * Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * + * Returns or sets the standard (default) width of all the columns in the worksheet. + One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * + * Gets or sets the worksheet tab color. + When retrieving the tab color, if the worksheet is invisible, the value will be null. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * + * Represents a collection of worksheet objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the worksheet's gridlines flag. + This flag determines whether gridlines are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showGridlines?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the worksheet's headings flag. + This flag determines whether headings are visible to the user. + * + * [Api set: ExcelApi 1.8] + */ + showHeadings?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the standard (default) height of all the rows in the worksheet, in points. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + standardHeight?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the standard (default) width of all the columns in the worksheet. + One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. + * + * [Api set: ExcelApi 1.7] + */ + standardWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the worksheet tab color. + When retrieving the tab color, if the worksheet is invisible, the value will be null. If the worksheet is visible but the tab color is set to auto, an empty string will be returned. Otherwise, the property will be set to a color, in the form "#123456" + When setting the color, use an empty-string to set an "auto" color, or a real color otherwise. + * + * [Api set: ExcelApi 1.7] + */ + tabColor?: boolean; + /** + * + * For EACH ITEM in the collection: The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * + * Represents the protection of a sheet object. + * + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionLoadOptions { + $all?: boolean; + /** + * + * Sheet protection options. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + options?: boolean; + /** + * + * Indicates if the worksheet is protected. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** + * + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; + /** + * + * Returns a data validation object. + * + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * + * The worksheet containing the current range. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. "Sheet1!A1:B4"). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * + * Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: boolean; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: boolean; + /** + * + * Represents if all cells of the current range are hidden. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * + * Represents if the current range is an entire column. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * + * Represents if the current range is an entire row. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * + * Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * + * Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * + * Represents the style of the current range. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi 1.7] + */ + style?: boolean; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * RangeView represents a set of visible cells of the parent range. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewLoadOptions { + $all?: boolean; + /** + * + * Represents the cell addresses of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: boolean; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: boolean; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: boolean; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of RangeView objects. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the cell addresses of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of key-value pair setting objects that are part of the workbook. The scope is limited to per file and add-in (task-pane or content) combination. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: boolean; + } + /** + * + * Setting represents a key-value pair of a setting persisted to the document (per file per add-in). These custom key-value pair can be used to store state or lifecycle information needed by the content or task-pane add-in. Note that settings are persisted in the document and hence it is not a place to store any sensitive or protected information such as user information and password. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingLoadOptions { + $all?: boolean; + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: boolean; + } + /** + * + * A collection of all the NamedItem objects that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns an object containing values and types of the named item. + * + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * + * For EACH ITEM in the collection: The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents a defined name for a range of cells or value. Names can be primitive named objects (as seen in the type below), range object, or a reference to a range. This object can be used to obtain range object associated with names. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemLoadOptions { + $all?: boolean; + /** + * + * Returns an object containing values and types of the named item. + * + * [Api set: ExcelApi 1.7] + */ + arrayValues?: Excel.Interfaces.NamedItemArrayValuesLoadOptions; + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * Gets or sets the formula of the named item. Formula always starts with a '=' sign. + * + * [Api set: ExcelApi 1.7] + */ + formula?: boolean; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Possible values are: Worksheet, Workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: boolean; + /** + * + * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents an object containing values and types of a named item. + * + * [Api set: ExcelApi 1.7] + */ + interface NamedItemArrayValuesLoadOptions { + $all?: boolean; + /** + * + * Represents the types for each item in the named item array + * + * [Api set: ExcelApi 1.7] + */ + types?: boolean; + /** + * + * Represents the values of each item in the named item array. + * + * [Api set: ExcelApi 1.7] + */ + values?: boolean; + } + /** + * + * Represents an Office.js binding that is defined in the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingLoadOptions { + $all?: boolean; + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents the collection of all the binding objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + interface TableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a numeric id. + * + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents an Excel table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns a numeric id. + * + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents a collection of all the columns that are part of the table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a column in a table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnLoadOptions { + $all?: boolean; + /** + * + * Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a collection of all the rows that are part of the table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a row in a table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents the data validation applied to the current range. + * + * [Api set: ExcelApi 1.8] + */ + interface DataValidationLoadOptions { + $all?: boolean; + /** + * + * Error alert when user enters invalid data. + * + * [Api set: ExcelApi 1.8] + */ + errorAlert?: boolean; + /** + * + * Ignore blanks: no data validation will be performed on blank cells, it defaults to true. + * + * [Api set: ExcelApi 1.8] + */ + ignoreBlanks?: boolean; + /** + * + * Prompt when users select a cell. + * + * [Api set: ExcelApi 1.8] + */ + prompt?: boolean; + /** + * + * Data Validation rule that contains different type of data validation criteria. + * + * [Api set: ExcelApi 1.8] + */ + rule?: boolean; + /** + * + * Type of the data validation, see Excel.DataValidationType for details. + * + * [Api set: ExcelApi 1.8] + */ + type?: boolean; + /** + * + * Represents if all cell values are valid according to the data validation rules. + Returns true if all cell values are valid, or false if all cell values are invalid. + Returns null if there are both valid and invalid cell values within the range. + * + * [Api set: ExcelApi 1.8] + */ + valid?: boolean; + } + /** + * + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall range. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: boolean; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: boolean; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: boolean; + /** + * + * Gets or sets the text orientation of all the cells within the range. + The text orientation should be an integer either from -90 to 90, or 180 for vertically-oriented text. + If the orientation within a range are not uniform, then null will be returned. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: boolean; + /** + * + * Determines if the row height of the Range object equals the standard height of the sheet. + Returns True if the row height of the Range object equals the standard height of the sheet. + Returns Null if the range contains more than one row and the rows aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardHeight?: boolean; + /** + * + * Indicates whether the column width of the Range object equals the standard width of the sheet. + Returns True if the column width of the Range object equals the standard width of the sheet. + Returns Null if the range contains more than one column and the columns aren't all the same height. + Returns False otherwise. + * + * [Api set: ExcelApi 1.7] + */ + useStandardWidth?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: boolean; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** + * + * Represents the format protection of a range object. + * + * [Api set: ExcelApi 1.2] + */ + interface FormatProtectionLoadOptions { + $all?: boolean; + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** + * + * Represents the background of a range object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: boolean; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * Represents the border objects that make up the range border. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: boolean; + /** + * + * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * A collection of all the chart objects on a worksheet. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the plotArea for the chart. + * + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns or sets a ChartCategoryLabelLevel enumeration constant referring to + the level of where the category labels are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the way that blank cells are plotted on a chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the way columns or rows are used as data series on the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotBy?: boolean; + /** + * + * For EACH ITEM in the collection: True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets a ChartSeriesNameLevel enumeration constant referring to + the level of where the series names are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * For EACH ITEM in the collection: Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the chart style for the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Represents a chart object in a workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLoadOptions { + $all?: boolean; + /** + * + * Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * Represents the plotArea for the chart. + * + * [Api set: ExcelApi 1.8] + */ + plotArea?: Excel.Interfaces.ChartPlotAreaLoadOptions; + /** + * + * Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * + * Represents the title of the specified chart, including the text, visibility, position, and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to + the level of where the category labels are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + categoryLabelLevel?: boolean; + /** + * + * Represents the type of the chart. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * Returns or sets the way that blank cells are plotted on a chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + displayBlanksAs?: boolean; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * The unique id of chart. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + id?: boolean; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Returns or sets the way columns or rows are used as data series on the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotBy?: boolean; + /** + * + * True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + plotVisibleOnly?: boolean; + /** + * + * Returns or sets a ChartSeriesNameLevel enumeration constant referring to + the level of where the series names are being sourced from. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + seriesNameLevel?: boolean; + /** + * + * Represents whether to display all field buttons on a PivotChart. + * + * [Api set: ExcelApi 1.7] + */ + showAllFieldButtons?: boolean; + /** + * + * Represents whether to to show the data labels when the value is greater than the maximum value on the value axis. + If value axis became smaller than the size of data points, you can use this property to set whether to show the data labels. + This property applies to 2-D charts only. + * + * [Api set: ExcelApi 1.8] + */ + showDataLabelsOverMaximum?: boolean; + /** + * + * Returns or sets the chart style for the chart. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + style?: boolean; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the overall chart area. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAreaFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of chart area, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of chart series. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents a collection of all dataLabels in the series. + * + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns or sets the group for the specified series. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + firstSliceAngle?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the gap width of a chart series. Only valid on bar and column charts, as well as + specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * For EACH ITEM in the collection: True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * + * For EACH ITEM in the collection: Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * For EACH ITEM in the collection: Boolean value representing if the series is smooth or not. Only applicable to line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * + * For EACH ITEM in the collection: True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * + * Represents a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesLoadOptions { + $all?: boolean; + /** + * + * Represents a collection of all dataLabels in the series. + * + * [Api set: ExcelApi 1.8] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * Returns or sets the group for the specified series. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + axisGroup?: boolean; + /** + * + * Represents the chart type of a series. See Excel.ChartType for details. + * + * [Api set: ExcelApi 1.7] + */ + chartType?: boolean; + /** + * + * Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnutExploded charts. + Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + doughnutHoleSize?: boolean; + /** + * + * Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion (the tip of the slice is in the center of the pie). Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + explosion?: boolean; + /** + * + * Boolean value representing if the series is filtered or not. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + filtered?: boolean; + /** + * + * Returns or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360. Read/Write + * + * [Api set: ExcelApi 1.8] + */ + firstSliceAngle?: boolean; + /** + * + * Represents the gap width of a chart series. Only valid on bar and column charts, as well as + specific classes of line and pie charts. Throws an invalid argument exception on invalid charts. + * + * [Api set: ExcelApi 1.7] + */ + gapWidth?: boolean; + /** + * + * Boolean value representing if the series has data labels or not. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabels?: boolean; + /** + * + * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + invertIfNegative?: boolean; + /** + * + * Represents markers background color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * Represents markers foreground color of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * Represents marker size of a chart series. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * Represents marker style of a chart series. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Specifies how bars and columns are positioned. Can be a value between – 100 and 100. Applies only to 2-D bar and 2-D column charts. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + overlap?: boolean; + /** + * + * Represents the plot order of a chart series within the chart group. + * + * [Api set: ExcelApi 1.7] + */ + plotOrder?: boolean; + /** + * + * Returns or sets the size of the secondary section of either a pie of pie chart or a bar of pie chart, as a percentage of the size of the primary pie. Can be a value from 5 to 200. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + secondPlotSize?: boolean; + /** + * + * Boolean value representing if the series has a shadow or not. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Boolean value representing if the series is smooth or not. Only applicable to line and scatter charts. + * + * [Api set: ExcelApi 1.7] + */ + smooth?: boolean; + /** + * + * Returns or sets the way the two sections of either a pie of pie chart or a bar of pie chart are split. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + splitType?: boolean; + /** + * + * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. + * + * [Api set: ExcelApi 1.8] + */ + varyByCategories?: boolean; + } + /** + * + * Encapsulates the format properties for the chart series + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * A collection of all the chart points within a series inside a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointsCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents whether a data point has a data label. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * For EACH ITEM in the collection: Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents a point of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointLoadOptions { + $all?: boolean; + /** + * + * Returns the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + dataLabel?: Excel.Interfaces.ChartDataLabelLoadOptions; + /** + * + * Encapsulates the format properties chart point. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatLoadOptions; + /** + * + * Represents whether a data point has a data label. Not applicable for surface charts. + * + * [Api set: ExcelApi 1.7] + */ + hasDataLabel?: boolean; + /** + * + * HTML color code representation of the marker background color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerBackgroundColor?: boolean; + /** + * + * HTML color code representation of the marker foreground color of data point. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.7] + */ + markerForegroundColor?: boolean; + /** + * + * Represents marker size of data point. + * + * [Api set: ExcelApi 1.7] + */ + markerSize?: boolean; + /** + * + * Represents marker style of a chart data point. See Excel.ChartMarkerStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + markerStyle?: boolean; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents formatting object for chart points. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of a chart data point, which includes color, style, and weight information. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * + * Represents the chart axes. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxesLoadOptions { + $all?: boolean; + /** + * + * Represents the category axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the series axis of a 3-dimensional chart. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the value axis in an axis. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; + } + /** + * + * Represents a single axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatLoadOptions; + /** + * + * Returns a Gridlines object that represents the major gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleLoadOptions; + /** + * + * Represents the alignment for the specified axis tick label. See Excel.ChartTextHorizontalAlignment for detail. + * + * [Api set: ExcelApi 1.8] + */ + alignment?: boolean; + /** + * + * Represents the group for the specified axis. See Excel.ChartAxisGroup for details. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + axisGroup?: boolean; + /** + * + * Returns or sets the base unit for the specified category axis. + * + * [Api set: ExcelApi 1.7] + */ + baseTimeUnit?: boolean; + /** + * + * Returns or sets the category axis type. + * + * [Api set: ExcelApi 1.7] + */ + categoryType?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. + * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + crosses?: boolean; + /** + * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. + * Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. + * + * [Api set: ExcelApi 1.7] + */ + crossesAt?: boolean; + /** + * + * Represents the custom axis display unit value. Read-only. To set this property, please use the SetCustomDisplayUnit(double) method. + * + * [Api set: ExcelApi 1.7] + */ + customDisplayUnit?: boolean; + /** + * + * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. + * + * [Api set: ExcelApi 1.7] + */ + displayUnit?: boolean; + /** + * + * Represents the height, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents whether value axis crosses the category axis between categories. + * + * [Api set: ExcelApi 1.8] + */ + isBetweenCategories?: boolean; + /** + * + * Represents the distance, in points, from the left edge of the axis to the left of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Represents the base of the logarithm when using logarithmic scales. + * + * [Api set: ExcelApi 1.7] + */ + logBase?: boolean; + /** + * + * Represents the type of major tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + majorTickMark?: boolean; + /** + * + * Returns or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + majorTimeUnitScale?: boolean; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit?: boolean; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum?: boolean; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: boolean; + /** + * + * Represents the type of minor tick mark for the specified axis. See Excel.ChartAxisTickMark for details. + * + * [Api set: ExcelApi 1.7] + */ + minorTickMark?: boolean; + /** + * + * Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale. + * + * [Api set: ExcelApi 1.7] + */ + minorTimeUnitScale?: boolean; + /** + * + * Represents the interval between two minor tick marks. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: boolean; + /** + * + * Represents whether an axis is multilevel or not. + * + * [Api set: ExcelApi 1.8] + */ + multiLevel?: boolean; + /** + * + * Represents the format code for the axis tick label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * Represents the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000. + * + * [Api set: ExcelApi 1.8] + */ + offset?: boolean; + /** + * + * Represents the specified axis position where the other axis crosses. See Excel.ChartAxisPosition for details. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * + * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. + * + * [Api set: ExcelApi 1.8] + */ + positionAt?: boolean; + /** + * + * Represents whether Microsoft Excel plots data points from last to first. + * + * [Api set: ExcelApi 1.7] + */ + reversePlotOrder?: boolean; + /** + * + * Represents the value axis scale type. See Excel.ChartAxisScaleType for details. + * + * [Api set: ExcelApi 1.7] + */ + scaleType?: boolean; + /** + * + * Represents whether the axis display unit label is visible. + * + * [Api set: ExcelApi 1.7] + */ + showDisplayUnitLabel?: boolean; + /** + * + * Represents the text orientation of the axis tick label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * Represents the position of tick-mark labels on the specified axis. See Excel.ChartAxisTickLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelPosition?: boolean; + /** + * + * Represents the number of categories or series between tick-mark labels. Can be a value from 1 through 31999 or an empty string for automatic setting. The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + tickLabelSpacing?: boolean; + /** + * + * Represents the number of categories or series between tick marks. + * + * [Api set: ExcelApi 1.7] + */ + tickMarkSpacing?: boolean; + /** + * + * Represents the distance, in points, from the top edge of the axis to the top of chart area. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * Represents the axis type. See Excel.ChartAxisType for details. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * A boolean value represents the visibility of the axis. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the chart axis. Null if the axis is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the title of a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart axis title. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents the chart axis title formatting. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of all the data labels on a chart point. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelsLoadOptions { + $all?: boolean; + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * + * Represents whether data labels automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * + * Represents the format code for data labels. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: boolean; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + /** + * + * Represents the text orientation of data labels. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + } + /** + * + * Represents the data label of a chart point. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartDataLabelLoadOptions { + $all?: boolean; + /** + * + * Represents the format of chart data label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * + * Boolean value representing if data label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart data label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * + * Returns the height, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * + * Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * + * String value that represents the format code for data label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * + * String representing the separator used for the data label on a chart. + * + * [Api set: ExcelApi 1.7] + */ + separator?: boolean; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.7] + */ + showValue?: boolean; + /** + * + * String representing the text of the data label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * + * Represents the text orientation of chart data label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * Represents the distance, in points, from the top edge of chart data label to the top of chart area. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * + * Returns the width, in points, of the chart data label. Read-only. Null if chart data label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the chart data labels. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents major or minor gridlines on a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties for chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the legend in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatLoadOptions; + /** + * + * Represents the height, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents the left, in points, of a chart legend. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * Represents if the legend has a shadow on the chart. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the top of a chart legend. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the legend on the chart. Null if legend is not visible. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Represents the legendEntry in legendEntryCollection. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryLoadOptions { + $all?: boolean; + /** + * + * Represents the height of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * + * Represents the index of the LegendEntry in the Chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * + * Represents the left of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * + * Represents the top of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * + * Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * Represents the width of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * + * Represents a collection of legendEntries. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartLegendEntryCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the index of the LegendEntry in the Chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the left of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the top of a chart legendEntry. + * + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the visible of a chart legend entry. + * + * [Api set: ExcelApi 1.7] + */ + visible?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width of the legendEntry on the chart Legend. + * + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a chart title object of a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatLoadOptions; + /** + * + * Returns the height, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + height?: boolean; + /** + * + * Represents the horizontal alignment for chart title. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * Represents the distance, in points, from the left edge of chart title to the left edge of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + left?: boolean; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of chart title. See Excel.ChartTitlePosition for details. + * + * [Api set: ExcelApi 1.7] + */ + position?: boolean; + /** + * + * Represents a boolean value that determines if the chart title has a shadow. + * + * [Api set: ExcelApi 1.7] + */ + showShadow?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * Represents the text orientation of chart title. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.7] + */ + textOrientation?: boolean; + /** + * + * Represents the distance, in points, from the top edge of chart title to the top of chart area. Null if chart title is not visible. + * + * [Api set: ExcelApi 1.7] + */ + top?: boolean; + /** + * + * Represents the vertical alignment of chart title. See Excel.ChartTextVerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + /** + * + * Returns the width, in points, of the chart title. Null if chart title is not visible. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + width?: boolean; + } + /** + * + * Represents the substring in chart related objects that contains text, like ChartTitle object, ChartAxisTitle object, etc. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartFormatStringLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Provides access to the office art formatting for chart title. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format of chart title, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.7] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents the border formatting of a chart element. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of borders in the chart. + * + * [Api set: ExcelApi 1.7] + */ + color?: boolean; + /** + * + * Represents the line style of the border. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * + * Represents weight of the border, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * + * Encapsulates the formatting options for line elements. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLineFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the line style. See Excel.ChartLineStyle for details. + * + * [Api set: ExcelApi 1.7] + */ + lineStyle?: boolean; + /** + * + * Represents weight of the line, in points. + * + * [Api set: ExcelApi 1.7] + */ + weight?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a chart object. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * This object represents the attributes for a chart trendline object. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * + * Represents the label of a chart trendline. + * + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; + /** + * + * Represents the number of periods that the trendline extends backward. + * + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * + * Represents the number of periods that the trendline extends forward. + * + * [Api set: ExcelApi 1.8] + */ + forwardPeriod?: boolean; + /** + * + * Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * + * Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: boolean; + /** + * + * Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * + * True if the equation for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * + * True if the R-squared for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * + * Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * + * Represents a collection of Chart Trendlines. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formatting of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + format?: Excel.Interfaces.ChartTrendlineFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the label of a chart trendline. + * + * [Api set: ExcelApi 1.8] + */ + label?: Excel.Interfaces.ChartTrendlineLabelLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the number of periods that the trendline extends backward. + * + * [Api set: ExcelApi 1.8] + */ + backwardPeriod?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the number of periods that the trendline extends forward. + * + * [Api set: ExcelApi 1.8] + */ + forwardPeriod?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the intercept value of the trendline. Can be set to a numeric value or an empty string (for automatic values). The returned value is always a number. + * + * [Api set: ExcelApi 1.7] + */ + intercept?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the period of a chart trendline. Only applicable for trendline with MovingAverage type. + * + * [Api set: ExcelApi 1.7] + */ + movingAveragePeriod?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the trendline. Can be set to a string value, or can be set to null value represents automatic values. The returned value is always a string + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the order of a chart trendline. Only applicable for trendline with Polynomial type. + * + * [Api set: ExcelApi 1.7] + */ + polynomialOrder?: boolean; + /** + * + * For EACH ITEM in the collection: True if the equation for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showEquation?: boolean; + /** + * + * For EACH ITEM in the collection: True if the R-squared for the trendline is displayed on the chart. + * + * [Api set: ExcelApi 1.8] + */ + showRSquared?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of a chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + } + /** + * + * Represents the format properties for chart trendline. + * + * [Api set: ExcelApi 1.7] + */ + interface ChartTrendlineFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.7] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * This object represents the attributes for a chart trendline lable object. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelLoadOptions { + $all?: boolean; + /** + * + * Represents the format of chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartTrendlineLabelFormatLoadOptions; + /** + * + * Boolean value representing if trendline label automatically generates appropriate text based on context. + * + * [Api set: ExcelApi 1.8] + */ + autoText?: boolean; + /** + * + * String value that represents the formula of chart trendline label using A1-style notation. + * + * [Api set: ExcelApi 1.8] + */ + formula?: boolean; + /** + * + * Returns the height, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * + * Represents the horizontal alignment for chart trendline label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of trendline label is 90, -90 or 180. + * + * [Api set: ExcelApi 1.8] + */ + horizontalAlignment?: boolean; + /** + * + * Represents the distance, in points, from the left edge of chart trendline label to the left edge of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * + * String value that represents the format code for trendline label. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * String representing the text of the trendline label on a chart. + * + * [Api set: ExcelApi 1.8] + */ + text?: boolean; + /** + * + * Represents the text orientation of chart trendline label. The value should be an integer either from -90 to 90, or 180 for vertically-oriented text. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * Represents the distance, in points, from the top edge of chart trendline label to the top of chart area. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * + * Represents the vertical alignment of chart trendline label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of trendline label is 0. + * + * [Api set: ExcelApi 1.8] + */ + verticalAlignment?: boolean; + /** + * + * Returns the width, in points, of the chart trendline label. Read-only. Null if chart trendline label is not visible. + * + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartTrendlineLabelFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border format, which includes color, linestyle, and weight. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart trendline label. + * + * [Api set: ExcelApi 1.8] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * This object represents the attributes for a chart plotArea object. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + format?: Excel.Interfaces.ChartPlotAreaFormatLoadOptions; + /** + * + * Represents the height value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + height?: boolean; + /** + * + * Represents the insideHeight value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideHeight?: boolean; + /** + * + * Represents the insideLeft value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideLeft?: boolean; + /** + * + * Represents the insideTop value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideTop?: boolean; + /** + * + * Represents the insideWidth value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + insideWidth?: boolean; + /** + * + * Represents the left value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + left?: boolean; + /** + * + * Represents the position of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * + * Represents the top value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + top?: boolean; + /** + * + * Represents the width value of plotArea. + * + * [Api set: ExcelApi 1.8] + */ + width?: boolean; + } + /** + * + * Represents the format properties for chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + interface ChartPlotAreaFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the border attributes of a chart plotArea. + * + * [Api set: ExcelApi 1.8] + */ + border?: Excel.Interfaces.ChartBorderLoadOptions; + } + /** + * + * Manages sorting operations on Table objects. + * + * [Api set: ExcelApi 1.2] + */ + interface TableSortLoadOptions { + $all?: boolean; + /** + * + * Represents the current conditions used to last sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + fields?: boolean; + /** + * + * Represents whether the casing impacted the last sort of the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + method?: boolean; + } + /** + * + * Manages the filtering of a table's column. + * + * [Api set: ExcelApi 1.2] + */ + interface FilterLoadOptions { + $all?: boolean; + /** + * + * The currently applied filter on the given column. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: boolean; + } + /** + * + * A scoped collection of custom XML parts. + A scoped collection is the result of some operation, e.g. filtering by namespace. + A scoped collection cannot be scoped any further. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * A collection of custom XML parts. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a custom XML part object in a workbook. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartLoadOptions { + $all?: boolean; + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The PivotLayout describing the layout and visual structure of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Id of the PivotTable. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents an Excel PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableLoadOptions { + $all?: boolean; + /** + * + * The PivotLayout describing the layout and visual structure of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + layout?: Excel.Interfaces.PivotLayoutLoadOptions; + /** + * + * The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Id of the PivotTable. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents the visual layout of the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotLayoutLoadOptions { + $all?: boolean; + /** + * + * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + layoutType?: boolean; + /** + * + * True if the PivotTable report shows grand totals for columns. + * + * [Api set: ExcelApi 1.8] + */ + showColumnGrandTotals?: boolean; + /** + * + * True if the PivotTable report shows grand totals for rows. + * + * [Api set: ExcelApi 1.8] + */ + showRowGrandTotals?: boolean; + /** + * + * This property indicates the SubtotalLocationType of all fields on the PivotTable. If fields have different states, this will be null. + * + * [Api set: ExcelApi 1.8] + */ + subtotalLocation?: boolean; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Id of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * + * Represents the Excel PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotHierarchyLoadOptions { + $all?: boolean; + /** + * + * Id of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Name of the PivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + } + /** + * + * Represents a collection of RowColumnPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Id of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Position of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * + * Represents the Excel RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + interface RowColumnPivotHierarchyLoadOptions { + $all?: boolean; + /** + * + * Id of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Name of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * Position of the RowColumnPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * + * Represents a collection of FilterPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether to allow multiple filter items. + * + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * + * For EACH ITEM in the collection: Id of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Position of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * + * Represents the Excel FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + interface FilterPivotHierarchyLoadOptions { + $all?: boolean; + /** + * + * Determines whether to allow multiple filter items. + * + * [Api set: ExcelApi 1.8] + */ + enableMultipleFilterItems?: boolean; + /** + * + * Id of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Name of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * Position of the FilterPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + } + /** + * + * Represents a collection of DataPivotHierarchy items associated with the PivotTable. + * + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the PivotFields associated with the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * + * For EACH ITEM in the collection: Id of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Number format of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: Position of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether the data should be sown as a specific summary calculation or not. + * + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether to show all items of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * + * Represents the Excel DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + interface DataPivotHierarchyLoadOptions { + $all?: boolean; + /** + * + * Returns the PivotFields associated with the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + field?: Excel.Interfaces.PivotFieldLoadOptions; + /** + * + * Id of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Name of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * Number format of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + numberFormat?: boolean; + /** + * + * Position of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + position?: boolean; + /** + * + * Determines whether the data should be sown as a specific summary calculation or not. + * + * [Api set: ExcelApi 1.8] + */ + showAs?: boolean; + /** + * + * Determines whether to show all items of the DataPivotHierarchy. + * + * [Api set: ExcelApi 1.8] + */ + summarizeBy?: boolean; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Id of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether to show all items of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * + * For EACH ITEM in the collection: Subtotals of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * + * Represents the Excel PivotField. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotFieldLoadOptions { + $all?: boolean; + /** + * + * Id of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Name of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * Determines whether to show all items of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + showAllItems?: boolean; + /** + * + * Subtotals of the PivotField. + * + * [Api set: ExcelApi 1.8] + */ + subtotals?: boolean; + } + /** + * + * Represents a collection of all the Pivot Items related to their parent PivotField. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Id of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. + * + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Determines whether the PivotItem is visible or not. + * + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * + * Represents the Excel PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + interface PivotItemLoadOptions { + $all?: boolean; + /** + * + * Id of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + id?: boolean; + /** + * + * Determines whether the item is expanded to show child items or if it's collapsed and child items are hidden. + * + * [Api set: ExcelApi 1.8] + */ + isExpanded?: boolean; + /** + * + * Name of the PivotItem. + * + * [Api set: ExcelApi 1.8] + */ + name?: boolean; + /** + * + * Determines whether the PivotItem is visible or not. + * + * [Api set: ExcelApi 1.8] + */ + visible?: boolean; + } + /** + * + * Represents workbook properties. + * + * [Api set: ExcelApi 1.7] + */ + interface DocumentPropertiesLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the author of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + author?: boolean; + /** + * + * Gets or sets the category of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + category?: boolean; + /** + * + * Gets or sets the comments of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + comments?: boolean; + /** + * + * Gets or sets the company of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + company?: boolean; + /** + * + * Gets the creation date of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + creationDate?: boolean; + /** + * + * Gets or sets the keywords of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + keywords?: boolean; + /** + * + * Gets the last author of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + lastAuthor?: boolean; + /** + * + * Gets or sets the manager of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + manager?: boolean; + /** + * + * Gets the revision number of the workbook. Read only. + * + * [Api set: ExcelApi 1.7] + */ + revisionNumber?: boolean; + /** + * + * Gets or sets the subject of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + subject?: boolean; + /** + * + * Gets or sets the title of the workbook. + * + * [Api set: ExcelApi 1.7] + */ + title?: boolean; + } + /** + * + * Represents a custom property. + * + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * + * Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * + * Contains the collection of customProperty objects. + * + * [Api set: ExcelApi 1.7] + */ + interface CustomPropertyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the value type of the custom property. Read only. + * + * [Api set: ExcelApi 1.7] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the custom property. + * + * [Api set: ExcelApi 1.7] + */ + value?: boolean; + } + /** + * + * Represents a collection of all the conditional formats that are overlap the range. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: The Priority of the Conditional Format within the current ConditionalFormatCollection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + priority?: boolean; + /** + * + * For EACH ITEM in the collection: If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * For EACH ITEM in the collection: A type of conditional format. Only one can be set at a time. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * An object encapsulating a conditional format's range, format, rule, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format. See Excel.PresetCriteriaConditionalFormat for more details. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + id?: boolean; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + priority?: boolean; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * Represents an Excel Conditional Data Bar Type. + * + * [Api set: ExcelApi 1.6] + */ + interface DataBarConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Representation of all values to the left of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: boolean; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: boolean; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: boolean; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: boolean; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly?: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the positive side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarPositiveFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the negative side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarNegativeFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** + * + * Represents a custom conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + interface CustomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; + } + /** + * + * Represents a rule, for all traditional rule/format pairings. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatRuleLoadOptions { + $all?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface IconSetConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface ColorScaleConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * + * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). + * + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** + * + * Represents a Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TopBottomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents the the preset criteria conditional format such as above average, below average, unique values, contains blank, nonblank, error, and noerror. + * + * [Api set: ExcelApi 1.6] + */ + interface PresetCriteriaConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a specific text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TextConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a cell value conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface CellValueConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: boolean; + } + /** + * + * This object represents the font attributes (font style, color, etc.) for an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: boolean; + } + /** + * + * Represents the background of a conditional range object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: boolean; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents the border objects that make up range border. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: boolean; + /** + * + * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * An object encapsulating a style's format and other properties. + * + * [Api set: ExcelApi 1.7] + */ + interface StyleLoadOptions { + $all?: boolean; + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * + * Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * + * Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * + * The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * The text orientation for the style. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * + * Represents a collection of all the styles. + * + * [Api set: ExcelApi 1.7] + */ + interface StyleCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The Fill of the style. + * + * [Api set: ExcelApi 1.7] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * For EACH ITEM in the collection: A Font object that represents the font of the style. + * + * [Api set: ExcelApi 1.7] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates if text is automatically indented when the text alignment in a cell is set to equal distribution. + * + * [Api set: ExcelApi 1.8] + */ + autoIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style is a built-in style. + * + * [Api set: ExcelApi 1.7] + */ + builtIn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the formula will be hidden when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + formulaHidden?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the horizontal alignment for the style. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the AutoIndent, HorizontalAlignment, VerticalAlignment, WrapText, IndentLevel, and TextOrientation properties. + * + * [Api set: ExcelApi 1.7] + */ + includeAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Color, ColorIndex, LineStyle, and Weight border properties. + * + * [Api set: ExcelApi 1.7] + */ + includeBorder?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Background, Bold, Color, ColorIndex, FontStyle, Italic, Name, Size, Strikethrough, Subscript, Superscript, and Underline font properties. + * + * [Api set: ExcelApi 1.7] + */ + includeFont?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the NumberFormat property. + * + * [Api set: ExcelApi 1.7] + */ + includeNumber?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the Color, ColorIndex, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties. + * + * [Api set: ExcelApi 1.7] + */ + includePatterns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the style includes the FormulaHidden and Locked protection properties. + * + * [Api set: ExcelApi 1.7] + */ + includeProtection?: boolean; + /** + * + * For EACH ITEM in the collection: An integer from 0 to 250 that indicates the indent level for the style. + * + * [Api set: ExcelApi 1.7] + */ + indentLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if the object is locked when the worksheet is protected. + * + * [Api set: ExcelApi 1.7] + */ + locked?: boolean; + /** + * + * For EACH ITEM in the collection: The name of the style. + * + * [Api set: ExcelApi 1.7] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: The localized format code of the number format for the style. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * For EACH ITEM in the collection: The reading order for the style. + * + * [Api set: ExcelApi 1.7] + */ + readingOrder?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi 1.7] + */ + shrinkToFit?: boolean; + /** + * + * For EACH ITEM in the collection: The text orientation for the style. + * + * [Api set: ExcelApi 1.8] + */ + textOrientation?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the vertical alignment for the style. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.7] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates if Microsoft Excel wraps the text in the object. + * + * [Api set: ExcelApi 1.7] + */ + wrapText?: boolean; + } + /** + * + * An object containing the result of a function-evaluation operation + * + * [Api set: ExcelApi 1.2] + */ + interface FunctionResultLoadOptions { + $all?: boolean; + /** + * + * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. + * + * [Api set: ExcelApi 1.2] + */ + error?: boolean; + /** + * + * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). + * + * [Api set: ExcelApi 1.2] + */ + value?: boolean; + } + } +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Excel APIs //////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Word { + /** + * + * Represents the application object. + * + * [Api set: WordApi 1.3] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Creates a new document by using an optional base64 encoded .docx file. + * + * [Api set: WordApi 1.3] + * + * @param base64File Optional. The base64 encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Create a new instance of Word.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents the body of a document or a section. + * + * [Api set: WordApi 1.1] + */ + class Body extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of rich text content control objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * + * Gets the collection of InlinePicture objects in the body. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the collection of list objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Body): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Body): void; + /** + * + * Clears the contents of the body object. The user can perform the undo operation on the cleared content. + * + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * + * Gets the HTML representation of the body object. + * + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets the OOXML (Office Open XML) representation of the body object. + * + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; + /** + * + * Wraps the body object with a Rich Text content control. + * + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a document into the body at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the body at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the document. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the document. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a picture into the body at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture into the body at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the body. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start' or 'End'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Start' or 'End'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start' or 'End'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Inserts text into the body at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the body at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. + * + * [Api set: WordApi 1.1] + * + * @param searchText Required. The search text. Can be a maximum of 255 characters. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects the body and navigates the Word UI to it. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the body and navigates the Word UI to it. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Body` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Body` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Body` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.BodyLoadOptions): Word.Body; + load(option?: string | string[]): Word.Body; + load(option?: { + select?: string; + expand?: string; + }): Word.Body; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Body; + toJSON(): Word.Interfaces.BodyData; + } + /** + * + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * + * [Api set: WordApi 1.1] + */ + class ContentControl extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of content control objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * + * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the collection of list objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * + * Get the collection of paragraph objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * + * Gets the collection of table objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * + * Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color: string; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly id: number; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag: string; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title: string; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.ContentControl): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControl): void; + /** + * + * Clears the contents of the content control. The user can perform the undo operation on the cleared content. + * + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * + * Deletes the content control and its content. If keepContent is set to true, the content is not deleted. + * + * [Api set: WordApi 1.1] + * + * @param keepContent Required. Indicates whether the content should be deleted with the content control. If keepContent is set to true, the content is not deleted. + */ + delete(keepContent: boolean): void; + /** + * + * Gets the HTML representation of the content control object. + * + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets the Office Open XML (OOXML) representation of the content control object. + * + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * + * Gets the whole content control, or the starting or ending point of the content control, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Before', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole content control, or the starting or ending point of the content control, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Before', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + * + * [Api set: WordApi 1.3] + * + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. Type of break. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. Type of break. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; + /** + * + * Inserts a document into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts HTML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts an inline picture into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts an inline picture into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted in the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; + /** + * + * Inserts OOXML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns into, or next to, a content control. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns into, or next to, a content control. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Inserts text into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. The text to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the content control at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. The text to be inserted in to the content control. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. + * + * [Api set: WordApi 1.1] + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects the content control. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the content control. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * + * Splits the content control into child ranges by using delimiters. + * + * [Api set: WordApi 1.3] + * + * @param delimiters Required. The delimiters as an array of strings. + * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.ContentControl` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.ContentControl` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.ContentControl` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + load(option?: string | string[]): Word.ContentControl; + load(option?: { + select?: string; + expand?: string; + }): Word.ContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ContentControl; + toJSON(): Word.Interfaces.ContentControlData; + } + /** + * + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * + * [Api set: WordApi 1.1] + */ + class ContentControlCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControl[]; + /** + * + * Gets a content control by its identifier. Throws if there isn't a content control with the identifier in this collection. + * + * [Api set: WordApi 1.1] + * + * @param id Required. A content control identifier. + */ + getById(id: number): Word.ContentControl; + /** + * + * Gets a content control by its identifier. Returns a null object if there isn't a content control with the identifier in this collection. + * + * [Api set: WordApi 1.3] + * + * @param id Required. A content control identifier. + */ + getByIdOrNullObject(id: number): Word.ContentControl; + /** + * + * Gets the content controls that have the specified tag. + * + * [Api set: WordApi 1.1] + * + * @param tag Required. A tag set on a content control. + */ + getByTag(tag: string): Word.ContentControlCollection; + /** + * + * Gets the content controls that have the specified title. + * + * [Api set: WordApi 1.1] + * + * @param title Required. The title of a content control. + */ + getByTitle(title: string): Word.ContentControlCollection; + /** + * + * Gets the content controls that have the specified types and/or subtypes. + * + * [Api set: WordApi 1.3] + * + * @param types Required. An array of content control types and/or subtypes. + */ + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; + /** + * + * Gets the first content control in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; + /** + * + * Gets the first content control in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.ContentControl; + /** + * + * Gets a content control by its index in the collection. + * + * [Api set: WordApi 1.1] + * + * @param index The index. + */ + getItem(index: number): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.ContentControlCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.ContentControlCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.ContentControlCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + load(option?: string | string[]): Word.ContentControlCollection; + load(option?: OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ContentControlCollection; + toJSON(): Word.Interfaces.ContentControlCollectionData; + } + /** + * + * Represents a custom property. + * + * [Api set: WordApi 1.3] + */ + class CustomProperty extends OfficeExtension.ClientObject { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly key: string; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.CustomProperty): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CustomProperty): void; + /** + * + * Deletes the custom property. + * + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.CustomProperty` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.CustomProperty` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.CustomProperty` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + load(option?: string | string[]): Word.CustomProperty; + load(option?: { + select?: string; + expand?: string; + }): Word.CustomProperty; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomProperty; + toJSON(): Word.Interfaces.CustomPropertyData; + } + /** + * + * Contains the collection of {@link Word.CustomProperty} objects. + * + * [Api set: WordApi 1.3] + */ + class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomProperty[]; + /** + * + * Creates a new or sets an existing custom property. + * + * [Api set: WordApi 1.3] + * + * @param key Required. The custom property's key, which is case-insensitive. + * @param value Required. The custom property's value. + */ + add(key: string, value: any): Word.CustomProperty; + /** + * + * Deletes all custom properties in this collection. + * + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * + * Gets the count of custom properties. + * + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. + * + * [Api set: WordApi 1.3] + * + * @param key The key that identifies the custom property object. + */ + getItem(key: string): Word.CustomProperty; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. + * + * [Api set: WordApi 1.3] + * + * @param key Required. The key that identifies the custom property object. + */ + getItemOrNullObject(key: string): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.CustomPropertyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.CustomPropertyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.CustomPropertyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + load(option?: string | string[]): Word.CustomPropertyCollection; + load(option?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomPropertyCollection; + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + } + /** + * + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * [Api set: WordApi 1.1] + */ + class Document extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly saved: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Document): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Document): void; + /** + * + * Gets the current selection of the document. Multiple selections are not supported. + * + * [Api set: WordApi 1.1] + */ + getSelection(): Word.Range; + /** + * + * Saves the document. This will use the Word default file naming convention if the document has not been saved before. + * + * [Api set: WordApi 1.1] + */ + save(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Document` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Document` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Document` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.DocumentLoadOptions): Word.Document; + load(option?: string | string[]): Word.Document; + load(option?: { + select?: string; + expand?: string; + }): Word.Document; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Document; + toJSON(): Word.Interfaces.DocumentData; + } + /** + * + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * [Api set: WordApi 1.3] + */ + class DocumentCreated extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly body: Word.Body; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly sections: Word.SectionCollection; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly saved: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.DocumentCreated): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentCreated): void; + /** + * + * Opens the document. + * + * [Api set: WordApi 1.3] + */ + open(): void; + /** + * + * Saves the document. This will use the Word default file naming convention if the document has not been saved before. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + save(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.DocumentCreated` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.DocumentCreated` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.DocumentCreated` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + load(option?: string | string[]): Word.DocumentCreated; + load(option?: { + select?: string; + expand?: string; + }): Word.DocumentCreated; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.DocumentCreated; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.DocumentCreated; + toJSON(): Word.Interfaces.DocumentCreatedData; + } + /** + * + * Represents document properties. + * + * [Api set: WordApi 1.3] + */ + class DocumentProperties extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of custom properties of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly customProperties: Word.CustomPropertyCollection; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly applicationName: string; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company: string; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly creationDate: Date; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly lastAuthor: string; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly lastPrintDate: Date; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly lastSaveTime: Date; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly revisionNumber: string; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly security: number; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + readonly template: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.DocumentProperties): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentProperties): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.DocumentProperties` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.DocumentProperties` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.DocumentProperties` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + load(option?: string | string[]): Word.DocumentProperties; + load(option?: { + select?: string; + expand?: string; + }): Word.DocumentProperties; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.DocumentProperties; + toJSON(): Word.Interfaces.DocumentPropertiesData; + } + /** + * + * Represents a font. + * + * [Api set: WordApi 1.1] + */ + class Font extends OfficeExtension.ClientObject { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size: number; + /** + * + * Gets or sets a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Font): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Font): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Font` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Font` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Font` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.FontLoadOptions): Word.Font; + load(option?: string | string[]): Word.Font; + load(option?: { + select?: string; + expand?: string; + }): Word.Font; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Font; + toJSON(): Word.Interfaces.FontData; + } + /** + * + * Represents an inline picture. + * + * [Api set: WordApi 1.1] + */ + class InlinePicture extends OfficeExtension.ClientObject { + /** + * + * Gets the parent paragraph that contains the inline image. Read-only. + * + * [Api set: WordApi 1.2] + */ + readonly paragraph: Word.Paragraph; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextDescription: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.InlinePicture): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.InlinePicture): void; + /** + * + * Deletes the inline picture from the document. + * + * [Api set: WordApi 1.2] + */ + delete(): void; + /** + * + * Gets the base64 encoded string representation of the inline image. + * + * [Api set: WordApi 1.1] + */ + getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * + * Gets the next inline image. Throws if this inline image is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; + /** + * + * Gets the next inline image. Returns a null object if this inline image is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.InlinePicture; + /** + * + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; + /** + * + * Wraps the inline picture with a rich text content control. + * + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts an inline picture at the specified location. The insertLocation value can be 'Replace', 'Before', or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts an inline picture at the specified location. The insertLocation value can be 'Replace', 'Before', or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Selects the inline picture. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the inline picture. This causes Word to scroll to the selection. + * + * [Api set: WordApi 1.2] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.InlinePicture` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.InlinePicture` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.InlinePicture` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + load(option?: string | string[]): Word.InlinePicture; + load(option?: { + select?: string; + expand?: string; + }): Word.InlinePicture; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.InlinePicture; + toJSON(): Word.Interfaces.InlinePictureData; + } + /** + * + * Contains a collection of {@link Word.InlinePicture} objects. + * + * [Api set: WordApi 1.1] + */ + class InlinePictureCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.InlinePicture[]; + /** + * + * Gets the first inline image in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; + /** + * + * Gets the first inline image in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.InlinePictureCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.InlinePictureCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.InlinePictureCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + load(option?: string | string[]): Word.InlinePictureCollection; + load(option?: OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.InlinePictureCollection; + toJSON(): Word.Interfaces.InlinePictureCollectionData; + } + /** + * + * Contains a collection of {@link Word.Paragraph} objects. + * + * [Api set: WordApi 1.3] + */ + class List extends OfficeExtension.ClientObject { + /** + * + * Gets paragraphs in the list. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + readonly id: number; + /** + * + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly levelExistences: boolean[]; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly levelTypes: Word.ListLevelType[]; + /** + * + * Gets the paragraphs that occur at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + */ + getLevelParagraphs(level: number): Word.ParagraphCollection; + /** + * + * Gets the bullet, number or picture at the specified level as a string. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + */ + getLevelString(level: number): OfficeExtension.ClientResult; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Sets the alignment of the bullet, number or picture at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that can be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignment: Word.Alignment): void; + /** + * + * Sets the alignment of the bullet, number or picture at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param alignment Required. The level alignment that can be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; + /** + * + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param listBullet Required. The bullet. + * @param charCode Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; + /** + * + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param listBullet Required. The bullet. + * @param charCode Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; + /** + * + * Sets the two indents of the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param textIndent Required. The text indent in points. It is the same as paragraph left indent. + * @param bulletNumberPictureIndent Required. The relative indent, in points, of the bullet, number or picture. It is the same as paragraph first line indent. + */ + setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; + /** + * + * Sets the numbering format at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param listNumbering Required. The ordinal format. + * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: any[]): void; + /** + * + * Sets the numbering format at the specified level in the list. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param listNumbering Required. The ordinal format. + * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: any[]): void; + /** + * + * Sets the starting number at the specified level in the list. Default value is 1. + * + * [Api set: WordApi 1.3] + * + * @param level Required. The level in the list. + * @param startingNumber Required. The number to start with. + */ + setLevelStartingNumber(level: number, startingNumber: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.List` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.List` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.List` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ListLoadOptions): Word.List; + load(option?: string | string[]): Word.List; + load(option?: { + select?: string; + expand?: string; + }): Word.List; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.List; + toJSON(): Word.Interfaces.ListData; + } + /** + * + * Contains a collection of {@link Word.List} objects. + * + * [Api set: WordApi 1.3] + */ + class ListCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.List[]; + /** + * + * Gets a list by its identifier. Throws if there isn't a list with the identifier in this collection. + * + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getById(id: number): Word.List; + /** + * + * Gets a list by its identifier. Returns a null object if there isn't a list with the identifier in this collection. + * + * [Api set: WordApi 1.3] + * + * @param id Required. A list identifier. + */ + getByIdOrNullObject(id: number): Word.List; + /** + * + * Gets the first list in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * + * Gets the first list in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.List; + /** + * + * Gets a list object by its index in the collection. + * + * [Api set: WordApi 1.3] + * + * @param index A number that identifies the index location of a list object. + */ + getItem(index: number): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.ListCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.ListCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.ListCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + load(option?: string | string[]): Word.ListCollection; + load(option?: OfficeExtension.LoadOption): Word.ListCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ListCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ListCollection; + toJSON(): Word.Interfaces.ListCollectionData; + } + /** + * + * Represents the paragraph list item format. + * + * [Api set: WordApi 1.3] + */ + class ListItem extends OfficeExtension.ClientObject { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level: number; + /** + * + * Gets the list item bullet, number, or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly listString: string; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly siblingIndex: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.ListItem): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListItem): void; + /** + * + * Gets the list item parent, or the closest ancestor if the parent does not exist. Throws if the list item has no ancestor. + * + * [Api set: WordApi 1.3] + * + * @param parentOnly Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestor(parentOnly?: boolean): Word.Paragraph; + /** + * + * Gets the list item parent, or the closest ancestor if the parent does not exist. Returns a null object if the list item has no ancestor. + * + * [Api set: WordApi 1.3] + * + * @param parentOnly Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; + /** + * + * Gets all descendant list items of the list item. + * + * [Api set: WordApi 1.3] + * + * @param directChildrenOnly Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. + */ + getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.ListItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.ListItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.ListItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + load(option?: string | string[]): Word.ListItem; + load(option?: { + select?: string; + expand?: string; + }): Word.ListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ListItem; + toJSON(): Word.Interfaces.ListItemData; + } + /** + * + * Represents a single paragraph in a selection, range, content control, or document body. + * + * [Api set: WordApi 1.1] + */ + class Paragraph extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of content control objects in the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * + * Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly listOrNullObject: Word.List; + /** + * + * Gets the parent body of the paragraph. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent: number; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly isLastParagraph: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly isListItem: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore: number; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tableNestingLevel: number; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Paragraph): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Paragraph): void; + /** + * + * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. + * + * [Api set: WordApi 1.3] + * + * @param listId Required. The ID of an existing list. + * @param level Required. The level in the list. + */ + attachToList(listId: number, level: number): Word.List; + /** + * + * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. + * + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * + * Deletes the paragraph and its content from the document. + * + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * [Api set: WordApi 1.3] + */ + detachFromList(): void; + /** + * + * Gets the HTML representation of the paragraph object. + * + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets the next paragraph. Throws if the paragraph is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; + /** + * + * Gets the next paragraph. Returns a null object if the paragraph is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Paragraph; + /** + * + * Gets the Office Open XML (OOXML) representation of the paragraph object. + * + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * + * Gets the previous paragraph. Throws if the paragraph is the first one. + * + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; + /** + * + * Gets the previous paragraph. Returns a null object if the paragraph is the first one. + * + * [Api set: WordApi 1.3] + */ + getPreviousOrNullObject(): Word.Paragraph; + /** + * + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + * + * [Api set: WordApi 1.3] + * + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the document. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add to the document. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; + /** + * + * Wraps the paragraph object with a rich text content control. + * + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a document into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts HTML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a picture into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; + /** + * + * Inserts OOXML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted in the paragraph. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Inserts text into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text into the paragraph at the specified location. The insertLocation value can be 'Replace', 'Start', or 'End'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. + * + * [Api set: WordApi 1.1] + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects and navigates the Word UI to the paragraph. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects and navigates the Word UI to the paragraph. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * + * Splits the paragraph into child ranges by using delimiters. + * + * [Api set: WordApi 1.3] + * + * @param delimiters Required. The delimiters as an array of strings. + * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Starts a new list with this paragraph. Fails if the paragraph is already a list item. + * + * [Api set: WordApi 1.3] + */ + startNewList(): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Paragraph` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Paragraph` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Paragraph` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + load(option?: string | string[]): Word.Paragraph; + load(option?: { + select?: string; + expand?: string; + }): Word.Paragraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Paragraph; + toJSON(): Word.Interfaces.ParagraphData; + } + /** + * + * Contains a collection of {@link Word.Paragraph} objects. + * + * [Api set: WordApi 1.1] + */ + class ParagraphCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.Paragraph[]; + /** + * + * Gets the first paragraph in this collection. Throws if the collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * + * Gets the first paragraph in this collection. Returns a null object if the collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Paragraph; + /** + * + * Gets the last paragraph in this collection. Throws if the collection is empty. + * + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; + /** + * + * Gets the last paragraph in this collection. Returns a null object if the collection is empty. + * + * [Api set: WordApi 1.3] + */ + getLastOrNullObject(): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.ParagraphCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.ParagraphCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.ParagraphCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + load(option?: string | string[]): Word.ParagraphCollection; + load(option?: OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.ParagraphCollection; + toJSON(): Word.Interfaces.ParagraphCollectionData; + } + /** + * + * Represents a contiguous area in a document. + * + * [Api set: WordApi 1.1] + */ + class Range extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of content control objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * + * Gets the collection of inline picture objects in the range. Read-only. + * + * [Api set: WordApi 1.2] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the collection of list objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * + * Gets the collection of paragraph objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * + * Gets the collection of table objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink: string; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly isEmpty: boolean; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Range): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Range): void; + /** + * + * Clears the contents of the range object. The user can perform the undo operation on the cleared content. + * + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * + * Compares this range's location with another range's location. + * + * [Api set: WordApi 1.3] + * + * @param range Required. The range to compare with this range. + */ + compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; + /** + * + * Deletes the range and its content from the document. + * + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * + * Returns a new range that extends from this range in either direction to cover another range. This range is not changed. Throws if the two ranges do not have a union. + * + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + expandTo(range: Word.Range): Word.Range; + /** + * + * Returns a new range that extends from this range in either direction to cover another range. This range is not changed. Returns a null object if the two ranges do not have a union. + * + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + expandToOrNullObject(range: Word.Range): Word.Range; + /** + * + * Gets the HTML representation of the range object. + * + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * + * Gets hyperlink child ranges within the range. + * + * [Api set: WordApi 1.3] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * + * Gets the next text range by using punctuation marks and/or other ending marks. Throws if this text range is the last one. + * + * [Api set: WordApi 1.3] + * + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * + * Gets the next text range by using punctuation marks and/or other ending marks. Returns a null object if this text range is the last one. + * + * [Api set: WordApi 1.3] + * + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * + * Gets the OOXML representation of the range object. + * + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * + * Clones the range, or gets the starting or ending point of the range as a new range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Clones the range, or gets the starting or ending point of the range as a new range. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + * + * [Api set: WordApi 1.3] + * + * @param endingMarks Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType, insertLocation: Word.InsertLocation): void; + /** + * + * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param breakType Required. The break type to add. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertBreak(breakType: "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): void; + /** + * + * Wraps the range object with a rich text content control. + * + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts a document at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param base64File Required. The base64 encoded content of a .docx file. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts HTML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param html Required. The HTML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a picture at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation): Word.InlinePicture; + /** + * + * Inserts a picture at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage Required. The base64 encoded image to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.InlinePicture; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts OOXML at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param ooxml Required. The OOXML to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation): Word.Range; + /** + * + * Inserts text at the specified location. The insertLocation value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + * + * [Api set: WordApi 1.1] + * + * @param text Required. Text to be inserted. + * @param insertLocation Required. The value can be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Range; + /** + * + * Returns a new range as the intersection of this range with another range. This range is not changed. Throws if the two ranges are not overlapped or adjacent. + * + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + intersectWith(range: Word.Range): Word.Range; + /** + * + * Returns a new range as the intersection of this range with another range. This range is not changed. Returns a null object if the two ranges are not overlapped or adjacent. + * + * [Api set: WordApi 1.3] + * + * @param range Required. Another range. + */ + intersectWithOrNullObject(range: Word.Range): Word.Range; + /** + * + * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. + * + * [Api set: WordApi 1.1] + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects and navigates the Word UI to the range. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects and navigates the Word UI to the range. + * + * [Api set: WordApi 1.1] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * + * Splits the range into child ranges by using delimiters. + * + * [Api set: WordApi 1.3] + * + * @param delimiters Required. The delimiters as an array of strings. + * @param multiParagraphs Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Range` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Range` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Range` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.RangeLoadOptions): Word.Range; + load(option?: string | string[]): Word.Range; + load(option?: { + select?: string; + expand?: string; + }): Word.Range; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Range; + toJSON(): Word.Interfaces.RangeData; + } + /** + * + * Contains a collection of {@link Word.Range} objects. + * + * [Api set: WordApi 1.1] + */ + class RangeCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.Range[]; + /** + * + * Gets the first range in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; + /** + * + * Gets the first range in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.RangeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.RangeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.RangeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + load(option?: string | string[]): Word.RangeCollection; + load(option?: OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.RangeCollection; + toJSON(): Word.Interfaces.RangeCollectionData; + } + /** + * + * Specifies the options to be included in a search operation. + * + * [Api set: WordApi 1.1] + */ + class SearchOptions extends OfficeExtension.ClientObject { + matchWildCards: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchCase: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.SearchOptions): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.SearchOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.SearchOptions` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.SearchOptions` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.SearchOptions` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + load(option?: string | string[]): Word.SearchOptions; + load(option?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + /** + * Create a new instance of Word.SearchOptions object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + toJSON(): Word.Interfaces.SearchOptionsData; + } + /** + * + * Represents a section in a Word document. + * + * [Api set: WordApi 1.1] + */ + class Section extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Section): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Section): void; + /** + * + * Gets one of the section's footers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value can be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * + * Gets one of the section's footers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of footer to return. This value can be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * + * Gets one of the section's headers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value can be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * + * Gets one of the section's headers. + * + * [Api set: WordApi 1.1] + * + * @param type Required. The type of header to return. This value can be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * + * Gets the next section. Throws if this section is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; + /** + * + * Gets the next section. Returns a null object if this section is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Section` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Section` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Section` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.SectionLoadOptions): Word.Section; + load(option?: string | string[]): Word.Section; + load(option?: { + select?: string; + expand?: string; + }): Word.Section; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Section; + toJSON(): Word.Interfaces.SectionData; + } + /** + * + * Contains the collection of the document's {@link Word.Section} objects. + * + * [Api set: WordApi 1.1] + */ + class SectionCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.Section[]; + /** + * + * Gets the first section in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; + /** + * + * Gets the first section in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.SectionCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.SectionCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.SectionCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + load(option?: string | string[]): Word.SectionCollection; + load(option?: OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.SectionCollection; + toJSON(): Word.Interfaces.SectionCollectionData; + } + /** + * + * Represents a table in a Word document. + * + * [Api set: WordApi 1.3] + */ + class Table extends OfficeExtension.ClientObject { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * + * Gets the parent body of the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly rows: Word.TableRowCollection; + /** + * + * Gets the child tables nested one level deeper. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * [Api set: WordApi 1.3] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly isUniform: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly nestingLevel: number; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly rowCount: number; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Table): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Table): void; + /** + * + * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Start' or 'End', corresponding to the appropriate side of the table. + * @param columnCount Required. Number of columns to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addColumns(insertLocation: Word.InsertLocation, columnCount: number, values?: string[][]): void; + /** + * + * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Start' or 'End', corresponding to the appropriate side of the table. + * @param columnCount Required. Number of columns to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addColumns(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", columnCount: number, values?: string[][]): void; + /** + * + * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Start' or 'End'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Start' or 'End'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addRows(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Autofits the table columns to the width of the window. + * + * [Api set: WordApi 1.3] + */ + autoFitWindow(): void; + /** + * + * Clears the contents of the table. + * + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * + * Deletes the entire table. + * + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * + * Deletes specific columns. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + * + * @param columnIndex Required. The first column to delete. + * @param columnCount Optional. The number of columns to delete. Default 1. + */ + deleteColumns(columnIndex: number, columnCount?: number): void; + /** + * + * Deletes specific rows. + * + * [Api set: WordApi 1.3] + * + * @param rowIndex Required. The first row to delete. + * @param rowCount Optional. The number of rows to delete. Default 1. + */ + deleteRows(rowIndex: number, rowCount?: number): void; + /** + * + * Distributes the column widths evenly. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + distributeColumns(): void; + /** + * + * Gets the border style for the specified border. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style for the specified border. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * + * Gets the table cell at a specified row and column. Throws if the specified table cell does not exist. + * + * [Api set: WordApi 1.3] + * + * @param rowIndex Required. The index of the row. + * @param cellIndex Required. The index of the cell in the row. + */ + getCell(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * + * Gets the table cell at a specified row and column. Returns a null object if the specified table cell does not exist. + * + * [Api set: WordApi 1.3] + * + * @param rowIndex Required. The index of the row. + * @param cellIndex Required. The index of the cell in the row. + */ + getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * + * Gets the next table. Throws if this table is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; + /** + * + * Gets the next table. Returns a null object if this table is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Table; + /** + * + * Gets the paragraph after the table. Throws if there isn't a paragraph after the table. + * + * [Api set: WordApi 1.3] + */ + getParagraphAfter(): Word.Paragraph; + /** + * + * Gets the paragraph after the table. Returns a null object if there isn't a paragraph after the table. + * + * [Api set: WordApi 1.3] + */ + getParagraphAfterOrNullObject(): Word.Paragraph; + /** + * + * Gets the paragraph before the table. Throws if there isn't a paragraph before the table. + * + * [Api set: WordApi 1.3] + */ + getParagraphBefore(): Word.Paragraph; + /** + * + * Gets the paragraph before the table. Returns a null object if there isn't a paragraph before the table. + * + * [Api set: WordApi 1.3] + */ + getParagraphBeforeOrNullObject(): Word.Paragraph; + /** + * + * Gets the range that contains this table, or the range at the start or end of the table. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: Word.RangeLocation): Word.Range; + /** + * + * Gets the range that contains this table, or the range at the start or end of the table. + * + * [Api set: WordApi 1.3] + * + * @param rangeLocation Optional. The range location can be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * + * Inserts a content control on the table. + * + * [Api set: WordApi 1.3] + */ + insertContentControl(): Word.ContentControl; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation): Word.Paragraph; + /** + * + * Inserts a paragraph at the specified location. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param paragraphText Required. The paragraph text to be inserted. + * @param insertLocation Required. The value can be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation, values?: string[][]): Word.Table; + /** + * + * Inserts a table with the specified number of rows and columns. The insertLocation value can be 'Before' or 'After'. + * + * [Api set: WordApi 1.3] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param insertLocation Required. The value can be 'Before' or 'After'. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. + * + * [Api set: WordApi 1.3] + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Table` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Table` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Table` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableLoadOptions): Word.Table; + load(option?: string | string[]): Word.Table; + load(option?: { + select?: string; + expand?: string; + }): Word.Table; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Table; + toJSON(): Word.Interfaces.TableData; + } + /** + * + * Contains the collection of the document's Table objects. + * + * [Api set: WordApi 1.3] + */ + class TableCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.Table[]; + /** + * + * Gets the first table in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; + /** + * + * Gets the first table in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + load(option?: string | string[]): Word.TableCollection; + load(option?: OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCollection; + toJSON(): Word.Interfaces.TableCollectionData; + } + /** + * + * Represents a row in a Word document. + * + * [Api set: WordApi 1.3] + */ + class TableRow extends OfficeExtension.ClientObject { + /** + * + * Gets cells. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly cells: Word.TableCellCollection; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * + * Gets parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly cellCount: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + readonly isHeader: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight: number; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.TableRow): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableRow): void; + /** + * + * Clears the contents of the row. + * + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * + * Deletes the entire row. + * + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * + * Gets the border style of the cells in the row. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style of the cells in the row. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * + * Gets the next row. Throws if this row is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; + /** + * + * Gets the next row. Returns a null object if this row is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableRow; + /** + * + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It can be 'Before' or 'After'. + * @param rowCount Required. Number of rows to add + * @param values Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. + */ + insertRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. Where the new rows should be inserted, relative to the current row. It can be 'Before' or 'After'. + * @param rowCount Required. Number of rows to add + * @param values Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. + */ + insertRows(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. + * + * [Api set: WordApi 1.3] + * + * @param searchText Required. The search text. + * @param searchOptions Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * + * Selects the row and navigates the Word UI to it. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * + * Selects the row and navigates the Word UI to it. + * + * [Api set: WordApi 1.3] + * + * @param selectionMode Optional. The selection mode can be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: "Select" | "Start" | "End"): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableRow` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableRow` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableRow` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + load(option?: string | string[]): Word.TableRow; + load(option?: { + select?: string; + expand?: string; + }): Word.TableRow; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableRow; + toJSON(): Word.Interfaces.TableRowData; + } + /** + * + * Contains the collection of the document's TableRow objects. + * + * [Api set: WordApi 1.3] + */ + class TableRowCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableRow[]; + /** + * + * Gets the first row in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; + /** + * + * Gets the first row in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableRowCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableRowCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableRowCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + load(option?: string | string[]): Word.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableRowCollection; + toJSON(): Word.Interfaces.TableRowCollectionData; + } + /** + * + * Represents a table cell in a Word document. + * + * [Api set: WordApi 1.3] + */ + class TableCell extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly body: Word.Body; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentRow: Word.TableRow; + /** + * + * Gets the parent table of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly cellIndex: number; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.TableCell): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableCell): void; + /** + * + * Deletes the column containing this cell. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + deleteColumn(): void; + /** + * + * Deletes the row containing this cell. + * + * [Api set: WordApi 1.3] + */ + deleteRow(): void; + /** + * + * Gets the border style for the specified border. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * + * Gets the border style for the specified border. + * + * [Api set: WordApi 1.3] + * + * @param borderLocation Required. The border location. + */ + getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * + * Gets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * + * Gets the next cell. Throws if this cell is the last one. + * + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; + /** + * + * Gets the next cell. Returns a null object if this cell is the last one. + * + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableCell; + /** + * + * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param columnCount Required. Number of columns to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertColumns(insertLocation: Word.InsertLocation, columnCount: number, values?: string[][]): void; + /** + * + * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param columnCount Required. Number of columns to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertColumns(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", columnCount: number, values?: string[][]): void; + /** + * + * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertRows(insertLocation: Word.InsertLocation, rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. + * + * [Api set: WordApi 1.3] + * + * @param insertLocation Required. It can be 'Before' or 'After'. + * @param rowCount Required. Number of rows to add. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertRows(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * + * Sets cell padding in points. + * + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation Required. The cell padding location can be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableCell` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableCell` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableCell` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + load(option?: string | string[]): Word.TableCell; + load(option?: { + select?: string; + expand?: string; + }): Word.TableCell; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCell; + toJSON(): Word.Interfaces.TableCellData; + } + /** + * + * Contains the collection of the document's TableCell objects. + * + * [Api set: WordApi 1.3] + */ + class TableCellCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableCell[]; + /** + * + * Gets the first table cell in this collection. Throws if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; + /** + * + * Gets the first table cell in this collection. Returns a null object if this collection is empty. + * + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableCellCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableCellCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableCellCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + load(option?: string | string[]): Word.TableCellCollection; + load(option?: OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableCellCollection; + toJSON(): Word.Interfaces.TableCellCollectionData; + } + /** + * + * Specifies the border style. + * + * [Api set: WordApi 1.3] + */ + class TableBorder extends OfficeExtension.ClientObject { + /** + * + * Gets or sets the table border color. + * + * [Api set: WordApi 1.3] + */ + color: string; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.TableBorder): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.TableBorder` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.TableBorder` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.TableBorder` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + load(option?: string | string[]): Word.TableBorder; + load(option?: { + select?: string; + expand?: string; + }): Word.TableBorder; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.TableBorder; + toJSON(): Word.Interfaces.TableBorderData; + } + /** + * + * Specifies supported content control types and subtypes. + * + * [Api set: WordApi] + */ + enum ContentControlType { + unknown = "Unknown", + richTextInline = "RichTextInline", + richTextParagraphs = "RichTextParagraphs", + /** + * + * Contains a whole cell. + * + */ + richTextTableCell = "RichTextTableCell", + /** + * + * Contains a whole row. + * + */ + richTextTableRow = "RichTextTableRow", + /** + * + * Contains a whole table. + * + */ + richTextTable = "RichTextTable", + plainTextInline = "PlainTextInline", + plainTextParagraph = "PlainTextParagraph", + picture = "Picture", + buildingBlockGallery = "BuildingBlockGallery", + checkBox = "CheckBox", + comboBox = "ComboBox", + dropDownList = "DropDownList", + datePicker = "DatePicker", + repeatingSection = "RepeatingSection", + /** + * + * Identifies a rich text content control. + * + */ + richText = "RichText", + plainText = "PlainText", + } + /** + * + * ContentControl appearance + * + * [Api set: WordApi] + */ + enum ContentControlAppearance { + /** + * + * Represents a content control shown as a shaded rectangle or bounding box (with optional title). + * + */ + boundingBox = "BoundingBox", + /** + * + * Represents a content control shown as start and end markers. + * + */ + tags = "Tags", + /** + * + * Represents a content control that is not shown. + * + */ + hidden = "Hidden", + } + /** + * + * Underline types + * + * [Api set: WordApi] + */ + enum UnderlineType { + mixed = "Mixed", + /** + * + * No underline. + * + */ + none = "None", + /** + * + * @deprecated Hidden is no longer supported. + */ + hidden = "Hidden", + /** + * + * @deprecated DotLine is no longer supported. + */ + dotLine = "DotLine", + /** + * + * A single underline. This is the default value. + * + */ + single = "Single", + /** + * + * Only underline individual words. + * + */ + word = "Word", + /** + * + * A double underline. + * + */ + double = "Double", + /** + * + * A single thick underline. + * + */ + thick = "Thick", + /** + * + * A dotted underline. + * + */ + dotted = "Dotted", + dottedHeavy = "DottedHeavy", + /** + * + * A single dash underline. + * + */ + dashLine = "DashLine", + dashLineHeavy = "DashLineHeavy", + dashLineLong = "DashLineLong", + dashLineLongHeavy = "DashLineLongHeavy", + /** + * + * An alternating dot-dash underline. + * + */ + dotDashLine = "DotDashLine", + dotDashLineHeavy = "DotDashLineHeavy", + /** + * + * An alternating dot-dot-dash underline. + * + */ + twoDotDashLine = "TwoDotDashLine", + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + /** + * + * A single wavy underline. + * + */ + wave = "Wave", + waveHeavy = "WaveHeavy", + waveDouble = "WaveDouble", + } + /** + * + * Specifies the form of a break. + * + * [Api set: WordApi] + */ + enum BreakType { + /** + * + * Page break at the insertion point. + * + */ + page = "Page", + /** + * + * @deprecated Use sectionNext instead. + */ + next = "Next", + /** + * + * Section break on next page. + * + */ + sectionNext = "SectionNext", + /** + * + * New section without a corresponding page break. + * + */ + sectionContinuous = "SectionContinuous", + /** + * + * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. + * + */ + sectionEven = "SectionEven", + /** + * + * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. + * + */ + sectionOdd = "SectionOdd", + /** + * + * Line break. + * + */ + line = "Line", + } + /** + * + * The insertion location types + * + * [Api set: WordApi] + */ + enum InsertLocation { + /** + * + * Add content before the contents of the calling object. + * + */ + before = "Before", + /** + * + * Add content after the contents of the calling object. + * + */ + after = "After", + /** + * + * Prepend content to the contents of the calling object. + * + */ + start = "Start", + /** + * + * Append content to the contents of the calling object. + * + */ + end = "End", + /** + * + * Replace the contents of the current object. + * + */ + replace = "Replace", + } + /** + * [Api set: WordApi] + */ + enum Alignment { + mixed = "Mixed", + /** + * + * Unknown alignment. + * + */ + unknown = "Unknown", + /** + * + * Alignment to the left. + * + */ + left = "Left", + /** + * + * Alignment to the center. + * + */ + centered = "Centered", + /** + * + * Alignment to the right. + * + */ + right = "Right", + /** + * + * Fully justified alignment. + * + */ + justified = "Justified", + } + /** + * [Api set: WordApi] + */ + enum HeaderFooterType { + /** + * + * Returns the header or footer on all pages of a section, with the first page or odd pages excluded if they are different. + * + */ + primary = "Primary", + /** + * + * Returns the header or footer on the first page of a section. + * + */ + firstPage = "FirstPage", + /** + * + * Returns all headers or footers on even-numbered pages of a section. + * + */ + evenPages = "EvenPages", + } + /** + * [Api set: WordApi] + */ + enum BodyType { + unknown = "Unknown", + mainDoc = "MainDoc", + section = "Section", + header = "Header", + footer = "Footer", + tableCell = "TableCell", + } + /** + * [Api set: WordApi] + */ + enum SelectionMode { + select = "Select", + start = "Start", + end = "End", + } + /** + * [Api set: WordApi] + */ + enum ImageFormat { + unsupported = "Unsupported", + undefined = "Undefined", + bmp = "Bmp", + jpeg = "Jpeg", + gif = "Gif", + tiff = "Tiff", + png = "Png", + icon = "Icon", + exif = "Exif", + wmf = "Wmf", + emf = "Emf", + pict = "Pict", + pdf = "Pdf", + svg = "Svg", + } + /** + * [Api set: WordApi] + */ + enum RangeLocation { + /** + * + * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. + * + */ + whole = "Whole", + /** + * + * The starting point of the object. For content control, it is the point after the opening tag. + * + */ + start = "Start", + /** + * + * The ending point of the object. For paragraph, it is the point before the EOP. For content control, it is the point before the closing tag. + * + */ + end = "End", + /** + * + * For content control only. It is the point before the opening tag. + * + */ + before = "Before", + /** + * + * The point after the object. If the object is a paragraph content control or table content control, it is the point after the EOP or Table characters. + * + */ + after = "After", + /** + * + * The range between 'Start' and 'End'. + * + */ + content = "Content", + } + /** + * [Api set: WordApi] + */ + enum LocationRelation { + /** + * + * Indicates that this instance and the range are in different sub-documents. + * + */ + unrelated = "Unrelated", + /** + * + * Indicates that this instance and the range represent the same range. + * + */ + equal = "Equal", + /** + * + * Indicates that this instance contains the range and that it shares the same start character. The range does not share the same end character as this instance. + * + */ + containsStart = "ContainsStart", + /** + * + * Indicates that this instance contains the range and that it shares the same end character. The range does not share the same start character as this instance. + * + */ + containsEnd = "ContainsEnd", + /** + * + * Indicates that this instance contains the range, with the exception of the start and end character of this instance. + * + */ + contains = "Contains", + /** + * + * Indicates that this instance is inside the range and that it shares the same start character. The range does not share the same end character as this instance. + * + */ + insideStart = "InsideStart", + /** + * + * Indicates that this instance is inside the range and that it shares the same end character. The range does not share the same start character as this instance. + * + */ + insideEnd = "InsideEnd", + /** + * + * Indicates that this instance is inside the range. The range does not share the same start and end characters as this instance. + * + */ + inside = "Inside", + /** + * + * Indicates that this instance occurs before, and is adjacent to, the range. + * + */ + adjacentBefore = "AdjacentBefore", + /** + * + * Indicates that this instance starts before the range and overlaps the range’s first character. + * + */ + overlapsBefore = "OverlapsBefore", + /** + * + * Indicates that this instance occurs before the range. + * + */ + before = "Before", + /** + * + * Indicates that this instance occurs after, and is adjacent to, the range. + * + */ + adjacentAfter = "AdjacentAfter", + /** + * + * Indicates that this instance starts inside the range and overlaps the range’s last character. + * + */ + overlapsAfter = "OverlapsAfter", + /** + * + * Indicates that this instance occurs after the range. + * + */ + after = "After", + } + /** + * [Api set: WordApi] + */ + enum BorderLocation { + top = "Top", + left = "Left", + bottom = "Bottom", + right = "Right", + insideHorizontal = "InsideHorizontal", + insideVertical = "InsideVertical", + inside = "Inside", + outside = "Outside", + all = "All", + } + /** + * [Api set: WordApi] + */ + enum CellPaddingLocation { + top = "Top", + left = "Left", + bottom = "Bottom", + right = "Right", + } + /** + * [Api set: WordApi] + */ + enum BorderType { + mixed = "Mixed", + none = "None", + single = "Single", + double = "Double", + dotted = "Dotted", + dashed = "Dashed", + dotDashed = "DotDashed", + dot2Dashed = "Dot2Dashed", + triple = "Triple", + thinThickSmall = "ThinThickSmall", + thickThinSmall = "ThickThinSmall", + thinThickThinSmall = "ThinThickThinSmall", + thinThickMed = "ThinThickMed", + thickThinMed = "ThickThinMed", + thinThickThinMed = "ThinThickThinMed", + thinThickLarge = "ThinThickLarge", + thickThinLarge = "ThickThinLarge", + thinThickThinLarge = "ThinThickThinLarge", + wave = "Wave", + doubleWave = "DoubleWave", + dashedSmall = "DashedSmall", + dashDotStroked = "DashDotStroked", + threeDEmboss = "ThreeDEmboss", + threeDEngrave = "ThreeDEngrave", + } + /** + * [Api set: WordApi] + */ + enum VerticalAlignment { + mixed = "Mixed", + top = "Top", + center = "Center", + bottom = "Bottom", + } + /** + * [Api set: WordApi] + */ + enum ListLevelType { + bullet = "Bullet", + number = "Number", + picture = "Picture", + } + /** + * [Api set: WordApi] + */ + enum ListBullet { + custom = "Custom", + solid = "Solid", + hollow = "Hollow", + square = "Square", + diamonds = "Diamonds", + arrow = "Arrow", + checkmark = "Checkmark", + } + /** + * [Api set: WordApi] + */ + enum ListNumbering { + none = "None", + arabic = "Arabic", + upperRoman = "UpperRoman", + lowerRoman = "LowerRoman", + upperLetter = "UpperLetter", + lowerLetter = "LowerLetter", + } + /** + * [Api set: WordApi] + */ + enum Style { + /** + * + * Mixed styles or other style not in this list. + * + */ + other = "Other", + /** + * + * Reset character and paragraph style to default. + * + */ + normal = "Normal", + heading1 = "Heading1", + heading2 = "Heading2", + heading3 = "Heading3", + heading4 = "Heading4", + heading5 = "Heading5", + heading6 = "Heading6", + heading7 = "Heading7", + heading8 = "Heading8", + heading9 = "Heading9", + /** + * + * Table-of-content level 1. + * + */ + toc1 = "Toc1", + /** + * + * Table-of-content level 2. + * + */ + toc2 = "Toc2", + /** + * + * Table-of-content level 3. + * + */ + toc3 = "Toc3", + /** + * + * Table-of-content level 4. + * + */ + toc4 = "Toc4", + /** + * + * Table-of-content level 5. + * + */ + toc5 = "Toc5", + /** + * + * Table-of-content level 6. + * + */ + toc6 = "Toc6", + /** + * + * Table-of-content level 7. + * + */ + toc7 = "Toc7", + /** + * + * Table-of-content level 8. + * + */ + toc8 = "Toc8", + /** + * + * Table-of-content level 9. + * + */ + toc9 = "Toc9", + footnoteText = "FootnoteText", + header = "Header", + footer = "Footer", + caption = "Caption", + footnoteReference = "FootnoteReference", + endnoteReference = "EndnoteReference", + endnoteText = "EndnoteText", + title = "Title", + subtitle = "Subtitle", + hyperlink = "Hyperlink", + strong = "Strong", + emphasis = "Emphasis", + noSpacing = "NoSpacing", + listParagraph = "ListParagraph", + quote = "Quote", + intenseQuote = "IntenseQuote", + subtleEmphasis = "SubtleEmphasis", + intenseEmphasis = "IntenseEmphasis", + subtleReference = "SubtleReference", + intenseReference = "IntenseReference", + bookTitle = "BookTitle", + bibliography = "Bibliography", + /** + * + * Table-of-content heading. + * + */ + tocHeading = "TocHeading", + tableGrid = "TableGrid", + plainTable1 = "PlainTable1", + plainTable2 = "PlainTable2", + plainTable3 = "PlainTable3", + plainTable4 = "PlainTable4", + plainTable5 = "PlainTable5", + tableGridLight = "TableGridLight", + gridTable1Light = "GridTable1Light", + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + gridTable2 = "GridTable2", + gridTable2_Accent1 = "GridTable2_Accent1", + gridTable2_Accent2 = "GridTable2_Accent2", + gridTable2_Accent3 = "GridTable2_Accent3", + gridTable2_Accent4 = "GridTable2_Accent4", + gridTable2_Accent5 = "GridTable2_Accent5", + gridTable2_Accent6 = "GridTable2_Accent6", + gridTable3 = "GridTable3", + gridTable3_Accent1 = "GridTable3_Accent1", + gridTable3_Accent2 = "GridTable3_Accent2", + gridTable3_Accent3 = "GridTable3_Accent3", + gridTable3_Accent4 = "GridTable3_Accent4", + gridTable3_Accent5 = "GridTable3_Accent5", + gridTable3_Accent6 = "GridTable3_Accent6", + gridTable4 = "GridTable4", + gridTable4_Accent1 = "GridTable4_Accent1", + gridTable4_Accent2 = "GridTable4_Accent2", + gridTable4_Accent3 = "GridTable4_Accent3", + gridTable4_Accent4 = "GridTable4_Accent4", + gridTable4_Accent5 = "GridTable4_Accent5", + gridTable4_Accent6 = "GridTable4_Accent6", + gridTable5Dark = "GridTable5Dark", + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + gridTable6Colorful = "GridTable6Colorful", + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + gridTable7Colorful = "GridTable7Colorful", + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + listTable1Light = "ListTable1Light", + listTable1Light_Accent1 = "ListTable1Light_Accent1", + listTable1Light_Accent2 = "ListTable1Light_Accent2", + listTable1Light_Accent3 = "ListTable1Light_Accent3", + listTable1Light_Accent4 = "ListTable1Light_Accent4", + listTable1Light_Accent5 = "ListTable1Light_Accent5", + listTable1Light_Accent6 = "ListTable1Light_Accent6", + listTable2 = "ListTable2", + listTable2_Accent1 = "ListTable2_Accent1", + listTable2_Accent2 = "ListTable2_Accent2", + listTable2_Accent3 = "ListTable2_Accent3", + listTable2_Accent4 = "ListTable2_Accent4", + listTable2_Accent5 = "ListTable2_Accent5", + listTable2_Accent6 = "ListTable2_Accent6", + listTable3 = "ListTable3", + listTable3_Accent1 = "ListTable3_Accent1", + listTable3_Accent2 = "ListTable3_Accent2", + listTable3_Accent3 = "ListTable3_Accent3", + listTable3_Accent4 = "ListTable3_Accent4", + listTable3_Accent5 = "ListTable3_Accent5", + listTable3_Accent6 = "ListTable3_Accent6", + listTable4 = "ListTable4", + listTable4_Accent1 = "ListTable4_Accent1", + listTable4_Accent2 = "ListTable4_Accent2", + listTable4_Accent3 = "ListTable4_Accent3", + listTable4_Accent4 = "ListTable4_Accent4", + listTable4_Accent5 = "ListTable4_Accent5", + listTable4_Accent6 = "ListTable4_Accent6", + listTable5Dark = "ListTable5Dark", + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + listTable6Colorful = "ListTable6Colorful", + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + listTable7Colorful = "ListTable7Colorful", + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", + } + /** + * [Api set: WordApi] + */ + enum DocumentPropertyType { + string = "String", + number = "Number", + date = "Date", + boolean = "Boolean", + } + /** + * [Api set: WordApi] + */ + enum TapObjectType { + chart = "Chart", + smartArt = "SmartArt", + table = "Table", + image = "Image", + slide = "Slide", + ole = "OLE", + text = "Text", + } + /** + * [Api set: WordApi] + */ + enum FileContentFormat { + base64 = "Base64", + html = "Html", + ooxml = "Ooxml", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + } + module Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the Body object, for use in "body.set({ ... })". */ + interface BodyUpdateData { + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the ContentControl object, for use in "contentControl.set({ ... })". */ + interface ContentControlUpdateData { + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: string; + } + /** An interface for updating data on the ContentControlCollection object, for use in "contentControlCollection.set({ ... })". */ + interface ContentControlCollectionUpdateData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". */ + interface CustomPropertyUpdateData { + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface for updating data on the CustomPropertyCollection object, for use in "customPropertyCollection.set({ ... })". */ + interface CustomPropertyCollectionUpdateData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface for updating data on the Document object, for use in "document.set({ ... })". */ + interface DocumentUpdateData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: boolean; + } + /** An interface for updating data on the DocumentCreated object, for use in "documentCreated.set({ ... })". */ + interface DocumentCreatedUpdateData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + } + /** An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". */ + interface DocumentPropertiesUpdateData { + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the Font object, for use in "font.set({ ... })". */ + interface FontUpdateData { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * + * Gets or sets a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface for updating data on the InlinePicture object, for use in "inlinePicture.set({ ... })". */ + interface InlinePictureUpdateData { + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the InlinePictureCollection object, for use in "inlinePictureCollection.set({ ... })". */ + interface InlinePictureCollectionUpdateData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface for updating data on the ListCollection object, for use in "listCollection.set({ ... })". */ + interface ListCollectionUpdateData { + items?: Word.Interfaces.ListData[]; + } + /** An interface for updating data on the ListItem object, for use in "listItem.set({ ... })". */ + interface ListItemUpdateData { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the Paragraph object, for use in "paragraph.set({ ... })". */ + interface ParagraphUpdateData { + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the ParagraphCollection object, for use in "paragraphCollection.set({ ... })". */ + interface ParagraphCollectionUpdateData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface for updating data on the Range object, for use in "range.set({ ... })". */ + interface RangeUpdateData { + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the RangeCollection object, for use in "rangeCollection.set({ ... })". */ + interface RangeCollectionUpdateData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface for updating data on the SearchOptions object, for use in "searchOptions.set({ ... })". */ + interface SearchOptionsUpdateData { + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface for updating data on the Section object, for use in "section.set({ ... })". */ + interface SectionUpdateData { + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + } + /** An interface for updating data on the SectionCollection object, for use in "sectionCollection.set({ ... })". */ + interface SectionCollectionUpdateData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ + interface TableUpdateData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the TableCollection object, for use in "tableCollection.set({ ... })". */ + interface TableCollectionUpdateData { + items?: Word.Interfaces.TableData[]; + } + /** An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". */ + interface TableRowUpdateData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the TableRowCollection object, for use in "tableRowCollection.set({ ... })". */ + interface TableRowCollectionUpdateData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface for updating data on the TableCell object, for use in "tableCell.set({ ... })". */ + interface TableCellUpdateData { + /** + * + * Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the TableCellCollection object, for use in "tableCellCollection.set({ ... })". */ + interface TableCellCollectionUpdateData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface for updating data on the TableBorder object, for use in "tableBorder.set({ ... })". */ + interface TableBorderUpdateData { + /** + * + * Gets or sets the table border color. + * + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "body.toJSON()". */ + interface BodyData { + /** + * + * Gets the collection of rich text content control objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of InlinePicture objects in the body. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionData; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionData; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell"; + } + /** An interface describing the data returned by calling "contentControl.toJSON()". */ + interface ContentControlData { + /** + * + * Gets the collection of content control objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Get the collection of paragraph objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + } + /** An interface describing the data returned by calling "contentControlCollection.toJSON()". */ + interface ContentControlCollectionData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface describing the data returned by calling "customProperty.toJSON()". */ + interface CustomPropertyData { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface describing the data returned by calling "customPropertyCollection.toJSON()". */ + interface CustomPropertyCollectionData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface describing the data returned by calling "document.toJSON()". */ + interface DocumentData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: boolean; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling "documentCreated.toJSON()". */ + interface DocumentCreatedData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling "documentProperties.toJSON()". */ + interface DocumentPropertiesData { + /** + * + * Gets the collection of custom properties of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling "font.toJSON()". */ + interface FontData { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * + * Gets or sets a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface describing the data returned by calling "inlinePicture.toJSON()". */ + interface InlinePictureData { + /** + * + * Gets the parent paragraph that contains the inline image. Read-only. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphData; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "inlinePictureCollection.toJSON()". */ + interface InlinePictureCollectionData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface describing the data returned by calling "list.toJSON()". */ + interface ListData { + /** + * + * Gets paragraphs in the list. Read-only. + * + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: number; + /** + * + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: Word.ListLevelType[]; + } + /** An interface describing the data returned by calling "listCollection.toJSON()". */ + interface ListCollectionData { + items?: Word.Interfaces.ListData[]; + } + /** An interface describing the data returned by calling "listItem.toJSON()". */ + interface ListItemData { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * + * Gets the list item bullet, number, or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling "paragraph.toJSON()". */ + interface ParagraphData { + /** + * + * Gets the collection of content control objects in the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListData; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListData; + /** + * + * Gets the parent body of the paragraph. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "paragraphCollection.toJSON()". */ + interface ParagraphCollectionData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface describing the data returned by calling "range.toJSON()". */ + interface RangeData { + /** + * + * Gets the collection of content control objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inline picture objects in the range. Read-only. + * + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * + * Gets the collection of list objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * + * Gets the collection of paragraph objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * + * Gets the parent body of the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "rangeCollection.toJSON()". */ + interface RangeCollectionData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface describing the data returned by calling "searchOptions.toJSON()". */ + interface SearchOptionsData { + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface describing the data returned by calling "section.toJSON()". */ + interface SectionData { + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + } + /** An interface describing the data returned by calling "sectionCollection.toJSON()". */ + interface SectionCollectionData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the parent body of the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * + * Gets the child tables nested one level deeper. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "tableCollection.toJSON()". */ + interface TableCollectionData { + items?: Word.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling "tableRow.toJSON()". */ + interface TableRowData { + /** + * + * Gets cells. Read-only. + * + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface describing the data returned by calling "tableRowCollection.toJSON()". */ + interface TableRowCollectionData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling "tableCell.toJSON()". */ + interface TableCellData { + /** + * + * Gets the body object of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowData; + /** + * + * Gets the parent table of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "tableCellCollection.toJSON()". */ + interface TableCellCollectionData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling "tableBorder.toJSON()". */ + interface TableBorderData { + /** + * + * Gets or sets the table border color. + * + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** + * + * Represents the body of a document or a section. + * + * [Api set: WordApi 1.1] + */ + interface BodyLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + /** + * + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * + * [Api set: WordApi 1.1] + */ + interface ContentControlLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the content control. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * + * [Api set: WordApi 1.1] + */ + interface ContentControlCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a custom property. + * + * [Api set: WordApi 1.3] + */ + interface CustomPropertyLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * + * Contains the collection of {@link Word.CustomProperty} objects. + * + * [Api set: WordApi 1.3] + */ + interface CustomPropertyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * [Api set: WordApi 1.1] + */ + interface DocumentLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. + * + * [Api set: WordApi] + */ + allowCloseOnUntitled?: boolean; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** + * + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * [Api set: WordApi 1.3] + */ + interface DocumentCreatedLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * + * Represents document properties. + * + * [Api set: WordApi 1.3] + */ + interface DocumentPropertiesLoadOptions { + $all?: boolean; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * + * Represents a font. + * + * [Api set: WordApi 1.1] + */ + interface FontLoadOptions { + $all?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * + * Represents an inline picture. + * + * [Api set: WordApi 1.1] + */ + interface InlinePictureLoadOptions { + $all?: boolean; + /** + * + * Gets the parent paragraph that contains the inline image. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * + * Contains a collection of {@link Word.InlinePicture} objects. + * + * [Api set: WordApi 1.1] + */ + interface InlinePictureCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that represents the alternative text associated with the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * + * Contains a collection of {@link Word.Paragraph} objects. + * + * [Api set: WordApi 1.3] + */ + interface ListLoadOptions { + $all?: boolean; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * + * Contains a collection of {@link Word.List} objects. + * + * [Api set: WordApi 1.3] + */ + interface ListCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * + * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * + * Represents the paragraph list item format. + * + * [Api set: WordApi 1.3] + */ + interface ListItemLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * + * Gets the list item bullet, number, or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + /** + * + * Represents a single paragraph in a selection, range, content control, or document body. + * + * [Api set: WordApi 1.1] + */ + interface ParagraphLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Contains a collection of {@link Word.Paragraph} objects. + * + * [Api set: WordApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Represents a contiguous area in a document. + * + * [Api set: WordApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Contains a collection of {@link Word.Range} objects. + * + * [Api set: WordApi 1.1] + */ + interface RangeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Specifies the options to be included in a search operation. + * + * [Api set: WordApi 1.1] + */ + interface SearchOptionsLoadOptions { + $all?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * + * Represents a section in a Word document. + * + * [Api set: WordApi 1.1] + */ + interface SectionLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Contains the collection of the document's {@link Word.Section} objects. + * + * [Api set: WordApi 1.1] + */ + interface SectionCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Represents a table in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Contains the collection of the document's Table objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains this table. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Represents a row in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets parent table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * + * Contains the collection of the document's TableRow objects. + * + * [Api set: WordApi 1.3] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets parent table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * + * Represents a table cell in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableCellLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Contains the collection of the document's TableCell objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCellCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * + * Specifies the border style. + * + * [Api set: WordApi 1.3] + */ + interface TableBorderLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the table border color. + * + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + } +} +declare namespace Word { + /** + * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. + */ + class RequestContext extends OfficeCore.RequestContext { + constructor(url?: string); + readonly document: Document; + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + function run(batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously-created API objects. + * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Word APIs ///////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +////////////////////// Begin OneNote APIs ////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace OneNote { + /** + * + * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. + * + * [Api set: OneNoteApi 1.1] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly notebooks: OneNote.NotebookCollection; + /** + * + * Gets the active notebook if one exists. If no notebook is active, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebook(): OneNote.Notebook; + /** + * + * Gets the active notebook if one exists. If no notebook is active, returns null. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveNotebookOrNull(): OneNote.Notebook; + /** + * + * Gets the active outline if one exists, If no outline is active, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveOutline(): OneNote.Outline; + /** + * + * Gets the active outline if one exists, otherwise returns null. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveOutlineOrNull(): OneNote.Outline; + /** + * + * Gets the active page if one exists. If no page is active, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + getActivePage(): OneNote.Page; + /** + * + * Gets the active page if one exists. If no page is active, returns null. + * + * [Api set: OneNoteApi 1.1] + */ + getActivePageOrNull(): OneNote.Page; + /** + * + * Gets the active Paragraph if one exists, If no Paragraph is active, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraph(): OneNote.Paragraph; + /** + * + * Gets the active Paragraph if one exists, otherwise returns null. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveParagraphOrNull(): OneNote.Paragraph; + /** + * + * Gets the active section if one exists. If no section is active, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveSection(): OneNote.Section; + /** + * + * Gets the active section if one exists. If no section is active, returns null. + * + * [Api set: OneNoteApi 1.1] + */ + getActiveSectionOrNull(): OneNote.Section; + getWindowSize(): OfficeExtension.ClientResult; + insertHtmlAtCurrentPosition(html: string): void; + isViewingDeletedNotes(): OfficeExtension.ClientResult; + /** + * + * Opens the specified page in the application instance. + * + * [Api set: OneNoteApi 1.1] + * + * @param page The page to open. + */ + navigateToPage(page: OneNote.Page): void; + /** + * + * Gets the specified page, and opens it in the application instance. + * + * [Api set: OneNoteApi 1.1] + * + * @param url The client url of the page to open. + */ + navigateToPageWithClientUrl(url: string): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Application` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Application` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Application` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.ApplicationLoadOptions): OneNote.Application; + load(option?: string | string[]): OneNote.Application; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Application; + toJSON(): OneNote.Interfaces.ApplicationData; + } + /** + * + * Represents ink analysis data for a given set of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysis extends OfficeExtension.ClientObject { + /** + * + * Gets the parent page object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly page: OneNote.Page; + /** + * + * Gets the ID of the InkAnalysis object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.InkAnalysis): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InkAnalysisUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.InkAnalysis): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysis` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysis` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysis` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisLoadOptions): OneNote.InkAnalysis; + load(option?: string | string[]): OneNote.InkAnalysis; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkAnalysis; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysis; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysis; + toJSON(): OneNote.Interfaces.InkAnalysisData; + } + /** + * + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisParagraph extends OfficeExtension.ClientObject { + /** + * + * Reference to the parent InkAnalysisPage. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysis: OneNote.InkAnalysis; + /** + * + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly lines: OneNote.InkAnalysisLineCollection; + /** + * + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.InkAnalysisParagraph): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InkAnalysisParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.InkAnalysisParagraph): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisParagraph` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisParagraph` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisParagraph` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions): OneNote.InkAnalysisParagraph; + load(option?: string | string[]): OneNote.InkAnalysisParagraph; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkAnalysisParagraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisParagraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisParagraph; + toJSON(): OneNote.Interfaces.InkAnalysisParagraphData; + } + /** + * + * Represents a collection of InkAnalysisParagraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisParagraphCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.InkAnalysisParagraph[]; + /** + * + * Returns the number of InkAnalysisParagraphs in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a InkAnalysisParagraph object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the InkAnalysisParagraph object, or the index location of the InkAnalysisParagraph object in the collection. + */ + getItem(index: number | string): OneNote.InkAnalysisParagraph; + /** + * + * Gets a InkAnalysisParagraph on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.InkAnalysisParagraph; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisParagraphCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisParagraphCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisParagraphCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisParagraphCollection; + load(option?: string | string[]): OneNote.InkAnalysisParagraphCollection; + load(option?: OfficeExtension.LoadOption): OneNote.InkAnalysisParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisParagraphCollection; + toJSON(): OneNote.Interfaces.InkAnalysisParagraphCollectionData; + } + /** + * + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisLine extends OfficeExtension.ClientObject { + /** + * + * Reference to the parent InkAnalysisParagraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.InkAnalysisParagraph; + /** + * + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly words: OneNote.InkAnalysisWordCollection; + /** + * + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.InkAnalysisLine): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InkAnalysisLineUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.InkAnalysisLine): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisLine` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisLine` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisLine` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisLineLoadOptions): OneNote.InkAnalysisLine; + load(option?: string | string[]): OneNote.InkAnalysisLine; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkAnalysisLine; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisLine; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisLine; + toJSON(): OneNote.Interfaces.InkAnalysisLineData; + } + /** + * + * Represents a collection of InkAnalysisLine objects. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisLineCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.InkAnalysisLine[]; + /** + * + * Returns the number of InkAnalysisLines in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a InkAnalysisLine object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the InkAnalysisLine object, or the index location of the InkAnalysisLine object in the collection. + */ + getItem(index: number | string): OneNote.InkAnalysisLine; + /** + * + * Gets a InkAnalysisLine on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.InkAnalysisLine; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisLineCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisLineCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisLineCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisLineCollection; + load(option?: string | string[]): OneNote.InkAnalysisLineCollection; + load(option?: OfficeExtension.LoadOption): OneNote.InkAnalysisLineCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisLineCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisLineCollection; + toJSON(): OneNote.Interfaces.InkAnalysisLineCollectionData; + } + /** + * + * Represents ink analysis data for an identified word formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisWord extends OfficeExtension.ClientObject { + /** + * + * Reference to the parent InkAnalysisLine. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly line: OneNote.InkAnalysisLine; + /** + * + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * + * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly strokePointers: OneNote.InkStrokePointer[]; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly wordAlternates: string[]; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.InkAnalysisWord): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InkAnalysisWordUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.InkAnalysisWord): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisWord` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisWord` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisWord` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisWordLoadOptions): OneNote.InkAnalysisWord; + load(option?: string | string[]): OneNote.InkAnalysisWord; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkAnalysisWord; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisWord; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisWord; + toJSON(): OneNote.Interfaces.InkAnalysisWordData; + } + /** + * + * Represents a collection of InkAnalysisWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + class InkAnalysisWordCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.InkAnalysisWord[]; + /** + * + * Returns the number of InkAnalysisWords in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a InkAnalysisWord object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the InkAnalysisWord object, or the index location of the InkAnalysisWord object in the collection. + */ + getItem(index: number | string): OneNote.InkAnalysisWord; + /** + * + * Gets a InkAnalysisWord on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.InkAnalysisWord; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkAnalysisWordCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkAnalysisWordCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkAnalysisWordCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkAnalysisWordCollection; + load(option?: string | string[]): OneNote.InkAnalysisWordCollection; + load(option?: OfficeExtension.LoadOption): OneNote.InkAnalysisWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkAnalysisWordCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkAnalysisWordCollection; + toJSON(): OneNote.Interfaces.InkAnalysisWordCollectionData; + } + /** + * + * Represents a group of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + class FloatingInk extends OfficeExtension.ClientObject { + /** + * + * Gets the strokes of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly inkStrokes: OneNote.InkStrokeCollection; + /** + * + * Gets the PageContent parent of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * + * Gets the ID of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.FloatingInk` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.FloatingInk` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.FloatingInk` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.FloatingInkLoadOptions): OneNote.FloatingInk; + load(option?: string | string[]): OneNote.FloatingInk; + load(option?: { + select?: string; + expand?: string; + }): OneNote.FloatingInk; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.FloatingInk; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.FloatingInk; + toJSON(): OneNote.Interfaces.FloatingInkData; + } + /** + * + * Represents a single stroke of ink. + * + * [Api set: OneNoteApi 1.1] + */ + class InkStroke extends OfficeExtension.ClientObject { + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly floatingInk: OneNote.FloatingInk; + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkStroke` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkStroke` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkStroke` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkStrokeLoadOptions): OneNote.InkStroke; + load(option?: string | string[]): OneNote.InkStroke; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkStroke; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkStroke; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkStroke; + toJSON(): OneNote.Interfaces.InkStrokeData; + } + /** + * + * Represents a collection of InkStroke objects. + * + * [Api set: OneNoteApi 1.1] + */ + class InkStrokeCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.InkStroke[]; + /** + * + * Returns the number of InkStrokes in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a InkStroke object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the InkStroke object, or the index location of the InkStroke object in the collection. + */ + getItem(index: number | string): OneNote.InkStroke; + /** + * + * Gets a InkStroke on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.InkStroke; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkStrokeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkStrokeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkStrokeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkStrokeCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkStrokeCollection; + load(option?: string | string[]): OneNote.InkStrokeCollection; + load(option?: OfficeExtension.LoadOption): OneNote.InkStrokeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkStrokeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkStrokeCollection; + toJSON(): OneNote.Interfaces.InkStrokeCollectionData; + } + /** + * + * A container for the ink in a word in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + class InkWord extends OfficeExtension.ClientObject { + /** + * + * The parent paragraph containing the ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * + * Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly wordAlternates: string[]; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkWord` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkWord` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkWord` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkWordLoadOptions): OneNote.InkWord; + load(option?: string | string[]): OneNote.InkWord; + load(option?: { + select?: string; + expand?: string; + }): OneNote.InkWord; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkWord; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkWord; + toJSON(): OneNote.Interfaces.InkWordData; + } + /** + * + * Represents a collection of InkWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + class InkWordCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.InkWord[]; + /** + * + * Returns the number of InkWords in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a InkWord object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the InkWord object, or the index location of the InkWord object in the collection. + */ + getItem(index: number | string): OneNote.InkWord; + /** + * + * Gets a InkWord on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.InkWord; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.InkWordCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.InkWordCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.InkWordCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.InkWordCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.InkWordCollection; + load(option?: string | string[]): OneNote.InkWordCollection; + load(option?: OfficeExtension.LoadOption): OneNote.InkWordCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.InkWordCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.InkWordCollection; + toJSON(): OneNote.Interfaces.InkWordCollectionData; + } + /** + * + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * [Api set: OneNoteApi 1.1] + */ + class Notebook extends OfficeExtension.ClientObject { + /** + * + * The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * + * The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly baseUrl: string; + /** + * + * The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * + * Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * [Api set: OneNoteApi 1.2] + */ + readonly isVirtual: boolean; + /** + * + * Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * + * Adds a new section to the end of the notebook. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSection(name: string): OneNote.Section; + /** + * + * Adds a new section group to the end of the notebook. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Notebook` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Notebook` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Notebook` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.NotebookLoadOptions): OneNote.Notebook; + load(option?: string | string[]): OneNote.Notebook; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Notebook; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Notebook; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Notebook; + toJSON(): OneNote.Interfaces.NotebookData; + } + /** + * + * Represents a collection of notebooks. + * + * [Api set: OneNoteApi 1.1] + */ + class NotebookCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.Notebook[]; + /** + * + * Returns the number of notebooks in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets the collection of notebooks with the specified name that are open in the application instance. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the notebook. + */ + getByName(name: string): OneNote.NotebookCollection; + /** + * + * Gets a notebook by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the notebook, or the index location of the notebook in the collection. + */ + getItem(index: number | string): OneNote.Notebook; + /** + * + * Gets a notebook on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Notebook; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.NotebookCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.NotebookCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.NotebookCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.NotebookCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.NotebookCollection; + load(option?: string | string[]): OneNote.NotebookCollection; + load(option?: OfficeExtension.LoadOption): OneNote.NotebookCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.NotebookCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.NotebookCollection; + toJSON(): OneNote.Interfaces.NotebookCollectionData; + } + /** + * + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * [Api set: OneNoteApi 1.1] + */ + class SectionGroup extends OfficeExtension.ClientObject { + /** + * + * Gets the notebook that contains the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly notebook: OneNote.Notebook; + /** + * + * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroup: OneNote.SectionGroup; + /** + * + * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * + * The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly sectionGroups: OneNote.SectionGroupCollection; + /** + * + * The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly sections: OneNote.SectionCollection; + /** + * + * The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * + * Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * + * Adds a new section to the end of the section group. + * + * [Api set: OneNoteApi 1.1] + * + * @param title The name of the new section. + */ + addSection(title: string): OneNote.Section; + /** + * + * Adds a new section group to the end of this sectionGroup. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the new section. + */ + addSectionGroup(name: string): OneNote.SectionGroup; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.SectionGroup` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.SectionGroup` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.SectionGroup` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.SectionGroupLoadOptions): OneNote.SectionGroup; + load(option?: string | string[]): OneNote.SectionGroup; + load(option?: { + select?: string; + expand?: string; + }): OneNote.SectionGroup; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.SectionGroup; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.SectionGroup; + toJSON(): OneNote.Interfaces.SectionGroupData; + } + /** + * + * Represents a collection of section groups. + * + * [Api set: OneNoteApi 1.1] + */ + class SectionGroupCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.SectionGroup[]; + /** + * + * Returns the number of section groups in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets the collection of section groups with the specified name. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the section group. + */ + getByName(name: string): OneNote.SectionGroupCollection; + /** + * + * Gets a section group by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the section group, or the index location of the section group in the collection. + */ + getItem(index: number | string): OneNote.SectionGroup; + /** + * + * Gets a section group on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.SectionGroup; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.SectionGroupCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.SectionGroupCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.SectionGroupCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.SectionGroupCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionGroupCollection; + load(option?: string | string[]): OneNote.SectionGroupCollection; + load(option?: OfficeExtension.LoadOption): OneNote.SectionGroupCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.SectionGroupCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.SectionGroupCollection; + toJSON(): OneNote.Interfaces.SectionGroupCollectionData; + } + /** + * + * Represents a OneNote section. Sections can contain pages. + * + * [Api set: OneNoteApi 1.1] + */ + class Section extends OfficeExtension.ClientObject { + /** + * + * Gets the notebook that contains the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly notebook: OneNote.Notebook; + /** + * + * The collection of pages in the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly pages: OneNote.PageCollection; + /** + * + * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroup: OneNote.SectionGroup; + /** + * + * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentSectionGroupOrNull: OneNote.SectionGroup; + /** + * + * The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * + * Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * True if this section is encrypted with a password. Read only + * + * [Api set: OneNoteApi 1.2] + */ + readonly isEncrypted: boolean; + /** + * + * True if this section is locked. Read only + * + * [Api set: OneNoteApi 1.2] + */ + readonly isLocked: boolean; + /** + * + * Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly name: string; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly webUrl: string; + /** + * + * Adds a new page to the end of the section. + * + * [Api set: OneNoteApi 1.1] + * + * @param title The title of the new page. + */ + addPage(title: string): OneNote.Page; + /** + * + * Copies this section to specified notebook. + * + * [Api set: OneNoteApi 1.1] + * + * @param destinationNotebook The notebook to copy this section to. + */ + copyToNotebook(destinationNotebook: OneNote.Notebook): OneNote.Section; + /** + * + * Copies this section to specified section group. + * + * [Api set: OneNoteApi 1.1] + * + * @param destinationSectionGroup The section group to copy this section to. + */ + copyToSectionGroup(destinationSectionGroup: OneNote.SectionGroup): OneNote.Section; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * + * Inserts a new section before or after the current section. + * + * [Api set: OneNoteApi 1.1] + * + * @param location The location of the new section relative to the current section. + * @param title The name of the new section. + */ + insertSectionAsSibling(location: OneNote.InsertLocation, title: string): OneNote.Section; + /** + * + * Inserts a new section before or after the current section. + * + * [Api set: OneNoteApi 1.1] + * + * @param location The location of the new section relative to the current section. + * @param title The name of the new section. + */ + insertSectionAsSibling(location: "Before" | "After", title: string): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Section` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Section` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Section` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.SectionLoadOptions): OneNote.Section; + load(option?: string | string[]): OneNote.Section; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Section; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Section; + toJSON(): OneNote.Interfaces.SectionData; + } + /** + * + * Represents a collection of sections. + * + * [Api set: OneNoteApi 1.1] + */ + class SectionCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.Section[]; + /** + * + * Returns the number of sections in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets the collection of sections with the specified name. + * + * [Api set: OneNoteApi 1.1] + * + * @param name The name of the section. + */ + getByName(name: string): OneNote.SectionCollection; + /** + * + * Gets a section by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the section, or the index location of the section in the collection. + */ + getItem(index: number | string): OneNote.Section; + /** + * + * Gets a section on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Section; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.SectionCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.SectionCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.SectionCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.SectionCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.SectionCollection; + load(option?: string | string[]): OneNote.SectionCollection; + load(option?: OfficeExtension.LoadOption): OneNote.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.SectionCollection; + toJSON(): OneNote.Interfaces.SectionCollectionData; + } + /** + * + * Represents a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + class Page extends OfficeExtension.ClientObject { + /** + * + * The collection of PageContent objects on the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly contents: OneNote.PageContentCollection; + /** + * + * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly inkAnalysisOrNull: OneNote.InkAnalysis; + /** + * + * Gets the section that contains the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentSection: OneNote.Section; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + readonly classNotebookPageSource: string; + /** + * + * The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly clientUrl: string; + /** + * + * Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel: number; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title: string; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly webUrl: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.Page): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PageUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.Page): void; + /** + * + * Adds an Outline to the page at the specified position. + * + * [Api set: OneNoteApi 1.1] + * + * @param left The left position of the top, left corner of the Outline. + * @param top The top position of the top, left corner of the Outline. + * @param html An HTML string that describes the visual presentation of the Outline. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + */ + addOutline(left: number, top: number, html: string): OneNote.Outline; + /** + * + * Return a json string with node id and content in html format. + * + * [Api set: OneNoteApi 1.1] + */ + analyzePage(): OfficeExtension.ClientResult; + /** + * + * Inserts a new page with translated content. + * + * [Api set: OneNoteApi 1.1] + * + * @param translatedContent Translated content of the page + */ + applyTranslation(translatedContent: string): void; + /** + * + * Copies this page to specified section. + * + * [Api set: OneNoteApi 1.1] + * + * @param destinationSection The section to copy this page to. + */ + copyToSection(destinationSection: OneNote.Section): OneNote.Page; + /** + * + * Copies this page to specified section and sets ClassNotebookPageSource. + * + * [Api set: OneNoteApi 1.1] + */ + copyToSectionAndSetClassNotebookPageSource(destinationSection: OneNote.Section): OneNote.Page; + /** + * + * Gets the REST API ID. + * + * [Api set: OneNoteApi 1.1] + */ + getRestApiId(): OfficeExtension.ClientResult; + /** + * + * Does the page has content title. + * + * [Api set: OneNoteApi 1.1] + */ + hasTitleContent(): OfficeExtension.ClientResult; + /** + * + * Inserts a new page before or after the current page. + * + * [Api set: OneNoteApi 1.1] + * + * @param location The location of the new page relative to the current page. + * @param title The title of the new page. + */ + insertPageAsSibling(location: OneNote.InsertLocation, title: string): OneNote.Page; + /** + * + * Inserts a new page before or after the current page. + * + * [Api set: OneNoteApi 1.1] + * + * @param location The location of the new page relative to the current page. + * @param title The title of the new page. + */ + insertPageAsSibling(location: "Before" | "After", title: string): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Page` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Page` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Page` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.PageLoadOptions): OneNote.Page; + load(option?: string | string[]): OneNote.Page; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Page; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Page; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Page; + toJSON(): OneNote.Interfaces.PageData; + } + /** + * + * Represents a collection of pages. + * + * [Api set: OneNoteApi 1.1] + */ + class PageCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.Page[]; + /** + * + * Returns the number of pages in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets the collection of pages with the specified title. + * + * [Api set: OneNoteApi 1.1] + * + * @param title The title of the page. + */ + getByTitle(title: string): OneNote.PageCollection; + /** + * + * Gets a page by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the page, or the index location of the page in the collection. + */ + getItem(index: number | string): OneNote.Page; + /** + * + * Gets a page on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Page; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.PageCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.PageCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.PageCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.PageCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageCollection; + load(option?: string | string[]): OneNote.PageCollection; + load(option?: OfficeExtension.LoadOption): OneNote.PageCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.PageCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.PageCollection; + toJSON(): OneNote.Interfaces.PageCollectionData; + } + /** + * + * Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position. + * + * [Api set: OneNoteApi 1.1] + */ + class PageContent extends OfficeExtension.ClientObject { + /** + * + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + readonly image: OneNote.Image; + /** + * + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + readonly ink: OneNote.FloatingInk; + /** + * + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * + * Gets the page that contains the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentPage: OneNote.Page; + /** + * + * Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left: number; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top: number; + /** + * + * Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly type: OneNote.PageContentType | "Outline" | "Image" | "Ink" | "Other"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.PageContent): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PageContentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.PageContent): void; + /** + * + * Deletes the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.PageContent` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.PageContent` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.PageContent` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.PageContentLoadOptions): OneNote.PageContent; + load(option?: string | string[]): OneNote.PageContent; + load(option?: { + select?: string; + expand?: string; + }): OneNote.PageContent; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.PageContent; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.PageContent; + toJSON(): OneNote.Interfaces.PageContentData; + } + /** + * + * Represents the contents of a page, as a collection of PageContent objects. + * + * [Api set: OneNoteApi 1.1] + */ + class PageContentCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.PageContent[]; + /** + * + * Returns the number of page contents in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a PageContent object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the PageContent object, or the index location of the PageContent object in the collection. + */ + getItem(index: number | string): OneNote.PageContent; + /** + * + * Gets a page content on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.PageContent; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.PageContentCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.PageContentCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.PageContentCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.PageContentCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.PageContentCollection; + load(option?: string | string[]): OneNote.PageContentCollection; + load(option?: OfficeExtension.LoadOption): OneNote.PageContentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.PageContentCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.PageContentCollection; + toJSON(): OneNote.Interfaces.PageContentCollectionData; + } + /** + * + * Represents a container for Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + class Outline extends OfficeExtension.ClientObject { + /** + * + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * + * Gets the collection of Paragraph objects in the Outline. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * + * Gets the ID of the Outline object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Adds the specified HTML to the bottom of the Outline. + * + * [Api set: OneNoteApi 1.1] + * + * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + */ + appendHtml(html: string): void; + /** + * + * Adds the specified image to the bottom of the Outline. + * + * [Api set: OneNoteApi 1.1] + * + * @param base64EncodedImage HTML string to append. + * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. + * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. + */ + appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; + /** + * + * Adds the specified text to the bottom of the Outline. + * + * [Api set: OneNoteApi 1.1] + * + * @param paragraphText HTML string to append. + */ + appendRichText(paragraphText: string): OneNote.RichText; + /** + * + * Adds a table with the specified number of rows and columns to the bottom of the outline. + * + * [Api set: OneNoteApi 1.1] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + appendTable(rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; + /** + * + * Check if the outline is title outline. + * + * [Api set: OneNoteApi 1.1] + */ + isTitle(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Outline` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Outline` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Outline` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.OutlineLoadOptions): OneNote.Outline; + load(option?: string | string[]): OneNote.Outline; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Outline; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Outline; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Outline; + toJSON(): OneNote.Interfaces.OutlineData; + } + /** + * + * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. + * + * [Api set: OneNoteApi 1.1] + */ + class Paragraph extends OfficeExtension.ClientObject { + /** + * + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly image: OneNote.Image; + /** + * + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly inkWords: OneNote.InkWordCollection; + /** + * + * Gets the Outline object that contains the Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly outline: OneNote.Outline; + /** + * + * The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentParagraph: OneNote.Paragraph; + /** + * + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentParagraphOrNull: OneNote.Paragraph; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentTableCell: OneNote.TableCell; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentTableCellOrNull: OneNote.TableCell; + /** + * + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only + * + * [Api set: OneNoteApi 1.1] + */ + readonly richText: OneNote.RichText; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly table: OneNote.Table; + /** + * + * Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly type: OneNote.ParagraphType | "RichText" | "Image" | "Table" | "Ink" | "Other"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.Paragraph): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.Paragraph): void; + /** + * + * Add NoteTag to the paragraph. + * + * [Api set: OneNoteApi 1.1] + * + * @param type The type of the NoteTag. + * @param status The status of the NoteTag. + */ + addNoteTag(type: OneNote.NoteTagType, status: OneNote.NoteTagStatus): OneNote.NoteTag; + /** + * + * Add NoteTag to the paragraph. + * + * [Api set: OneNoteApi 1.1] + * + * @param type The type of the NoteTag. + * @param status The status of the NoteTag. + */ + addNoteTag(type: "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2", status: "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"): OneNote.NoteTag; + /** + * + * Deletes the paragraph + * + * [Api set: OneNoteApi 1.1] + */ + delete(): void; + /** + * + * Get list information of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + getParagraphInfo(): OfficeExtension.ClientResult; + /** + * + * Inserts the specified HTML content + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of new contents relative to the current Paragraph. + * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + */ + insertHtmlAsSibling(insertLocation: OneNote.InsertLocation, html: string): void; + /** + * + * Inserts the specified HTML content + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of new contents relative to the current Paragraph. + * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + */ + insertHtmlAsSibling(insertLocation: "Before" | "After", html: string): void; + /** + * + * Inserts the image at the specified insert location.. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param base64EncodedImage HTML string to append. + * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. + * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. + */ + insertImageAsSibling(insertLocation: OneNote.InsertLocation, base64EncodedImage: string, width: number, height: number): OneNote.Image; + /** + * + * Inserts the image at the specified insert location.. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param base64EncodedImage HTML string to append. + * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. + * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. + */ + insertImageAsSibling(insertLocation: "Before" | "After", base64EncodedImage: string, width: number, height: number): OneNote.Image; + /** + * + * Inserts the paragraph text at the specifiec insert location. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param paragraphText HTML string to append. + */ + insertRichTextAsSibling(insertLocation: OneNote.InsertLocation, paragraphText: string): OneNote.RichText; + /** + * + * Inserts the paragraph text at the specifiec insert location. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param paragraphText HTML string to append. + */ + insertRichTextAsSibling(insertLocation: "Before" | "After", paragraphText: string): OneNote.RichText; + /** + * + * Adds a table with the specified number of rows and columns before or after the current paragraph. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param rowCount The number of rows in the table. + * @param columnCount The number of columns in the table. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTableAsSibling(insertLocation: OneNote.InsertLocation, rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; + /** + * + * Adds a table with the specified number of rows and columns before or after the current paragraph. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation The location of the table relative to the current Paragraph. + * @param rowCount The number of rows in the table. + * @param columnCount The number of columns in the table. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTableAsSibling(insertLocation: "Before" | "After", rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Paragraph` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Paragraph` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Paragraph` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.ParagraphLoadOptions): OneNote.Paragraph; + load(option?: string | string[]): OneNote.Paragraph; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Paragraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Paragraph; + toJSON(): OneNote.Interfaces.ParagraphData; + } + /** + * + * Represents a collection of Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + class ParagraphCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.Paragraph[]; + /** + * + * Returns the number of paragraphs in the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a Paragraph object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index The ID of the Paragraph object, or the index location of the Paragraph object in the collection. + */ + getItem(index: number | string): OneNote.Paragraph; + /** + * + * Gets a paragraph on its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.ParagraphCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.ParagraphCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.ParagraphCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.ParagraphCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.ParagraphCollection; + load(option?: string | string[]): OneNote.ParagraphCollection; + load(option?: OfficeExtension.LoadOption): OneNote.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.ParagraphCollection; + toJSON(): OneNote.Interfaces.ParagraphCollectionData; + } + /** + * + * A container for the NoteTag in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + class NoteTag extends OfficeExtension.ClientObject { + /** + * + * Gets the Id of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly status: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly type: OneNote.NoteTagType | "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2"; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.NoteTag` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.NoteTag` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.NoteTag` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.NoteTagLoadOptions): OneNote.NoteTag; + load(option?: string | string[]): OneNote.NoteTag; + load(option?: { + select?: string; + expand?: string; + }): OneNote.NoteTag; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.NoteTag; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.NoteTag; + toJSON(): OneNote.Interfaces.NoteTagData; + } + /** + * + * Represents a RichText object in a Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + class RichText extends OfficeExtension.ClientObject { + /** + * + * Gets the Paragraph object that contains the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * + * Gets the ID of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly languageId: string; + /** + * + * Gets the text content of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly text: string; + /** + * + * Get the HTML of the rich text + * + * [Api set: OneNoteApi 1.1] + * @returns The html of the rich text + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.RichText` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.RichText` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.RichText` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.RichTextLoadOptions): OneNote.RichText; + load(option?: string | string[]): OneNote.RichText; + load(option?: { + select?: string; + expand?: string; + }): OneNote.RichText; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.RichText; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.RichText; + toJSON(): OneNote.Interfaces.RichTextData; + } + /** + * + * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. + * + * [Api set: OneNoteApi 1.1] + */ + class Image extends OfficeExtension.ClientObject { + /** + * + * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly pageContent: OneNote.PageContent; + /** + * + * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description: string; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height: number; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink: string; + /** + * + * Gets the ID of the Image object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. + * + * [Api set: OneNoteApi 1.1] + */ + readonly ocrData: OneNote.ImageOcrData; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.Image): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ImageUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.Image): void; + /** + * + * Gets the base64-encoded binary representation of the Image. + Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA... + * + * [Api set: OneNoteApi 1.1] + */ + getBase64Image(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Image` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Image` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Image` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.ImageLoadOptions): OneNote.Image; + load(option?: string | string[]): OneNote.Image; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Image; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Image; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Image; + toJSON(): OneNote.Interfaces.ImageData; + } + /** + * + * Represents a table in a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + class Table extends OfficeExtension.ClientObject { + /** + * + * Gets the Paragraph object that contains the Table object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraph: OneNote.Paragraph; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly rows: OneNote.TableRowCollection; + /** + * + * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible: boolean; + /** + * + * Gets the number of columns in the table. + * + * [Api set: OneNoteApi 1.1] + */ + readonly columnCount: number; + /** + * + * Gets the ID of the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the number of rows in the table. + * + * [Api set: OneNoteApi 1.1] + */ + readonly rowCount: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.Table): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.Table): void; + /** + * + * Adds a column to the end of the table. Values, if specified, are set in the new column. Otherwise the column is empty. + * + * [Api set: OneNoteApi 1.1] + * + * @param values Optional. Strings to insert in the new column, specified as an array. Must not have more values than rows in the table. + */ + appendColumn(values?: string[]): void; + /** + * + * Adds a row to the end of the table. Values, if specified, are set in the new row. Otherwise the row is empty. + * + * [Api set: OneNoteApi 1.1] + * + * @param values Optional. Strings to insert in the new row, specified as an array. Must not have more values than columns in the table. + */ + appendRow(values?: string[]): OneNote.TableRow; + /** + * + * Clears the contents of the table. + * + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * + * Gets the table cell at a specified row and column. + * + * [Api set: OneNoteApi 1.1] + * + * @param rowIndex The index of the row. + * @param cellIndex The index of the cell in the row. + */ + getCell(rowIndex: number, cellIndex: number): OneNote.TableCell; + /** + * + * Inserts a column at the given index in the table. Values, if specified, are set in the new column. Otherwise the column is empty. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index where the column will be inserted in the table. + * @param values Optional. Strings to insert in the new column, specified as an array. Must not have more values than rows in the table. + */ + insertColumn(index: number, values?: string[]): void; + /** + * + * Inserts a row at the given index in the table. Values, if specified, are set in the new row. Otherwise the row is empty. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index where the row will be inserted in the table. + * @param values Optional. Strings to insert in the new row, specified as an array. Must not have more values than columns in the table. + */ + insertRow(index: number, values?: string[]): OneNote.TableRow; + /** + * + * Sets the shading color of all cells in the table. + The color code to set the cells to. + * + * [Api set: OneNoteApi 1.1] + */ + setShadingColor(colorCode: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.Table` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.Table` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.Table` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.TableLoadOptions): OneNote.Table; + load(option?: string | string[]): OneNote.Table; + load(option?: { + select?: string; + expand?: string; + }): OneNote.Table; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.Table; + toJSON(): OneNote.Interfaces.TableData; + } + /** + * + * Represents a row in a table. + * + * [Api set: OneNoteApi 1.1] + */ + class TableRow extends OfficeExtension.ClientObject { + /** + * + * Gets the cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly cells: OneNote.TableCellCollection; + /** + * + * Gets the parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentTable: OneNote.Table; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly cellCount: number; + /** + * + * Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * + * Clears the contents of the row. + * + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * + * Inserts a row before or after the current row. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation Where the new rows should be inserted relative to the current row. + * @param values Strings to insert in the new row, specified as an array. Must not have more cells than in the current row. Optional. + */ + insertRowAsSibling(insertLocation: OneNote.InsertLocation, values?: string[]): OneNote.TableRow; + /** + * + * Inserts a row before or after the current row. + * + * [Api set: OneNoteApi 1.1] + * + * @param insertLocation Where the new rows should be inserted relative to the current row. + * @param values Strings to insert in the new row, specified as an array. Must not have more cells than in the current row. Optional. + */ + insertRowAsSibling(insertLocation: "Before" | "After", values?: string[]): OneNote.TableRow; + /** + * + * Sets the shading color of all cells in the row. + The color code to set the cells to. + * + * [Api set: OneNoteApi 1.1] + */ + setShadingColor(colorCode: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.TableRow` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.TableRow` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.TableRow` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.TableRowLoadOptions): OneNote.TableRow; + load(option?: string | string[]): OneNote.TableRow; + load(option?: { + select?: string; + expand?: string; + }): OneNote.TableRow; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.TableRow; + toJSON(): OneNote.Interfaces.TableRowData; + } + /** + * + * Contains a collection of TableRow objects. + * + * [Api set: OneNoteApi 1.1] + */ + class TableRowCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.TableRow[]; + /** + * + * Returns the number of table rows in this collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a table row object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index A number that identifies the index location of a table row object. + */ + getItem(index: number | string): OneNote.TableRow; + /** + * + * Gets a table row at its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.TableRowCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.TableRowCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.TableRowCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.TableRowCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableRowCollection; + load(option?: string | string[]): OneNote.TableRowCollection; + load(option?: OfficeExtension.LoadOption): OneNote.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.TableRowCollection; + toJSON(): OneNote.Interfaces.TableRowCollectionData; + } + /** + * + * Represents a cell in a OneNote table. + * + * [Api set: OneNoteApi 1.1] + */ + class TableCell extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of Paragraph objects in the TableCell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly paragraphs: OneNote.ParagraphCollection; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly parentRow: OneNote.TableRow; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly cellIndex: number; + /** + * + * Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly id: string; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly rowIndex: number; + /** + * + * Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: OneNote.TableCell): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: OneNote.TableCell): void; + /** + * + * Adds the specified HTML to the bottom of the TableCell. + * + * [Api set: OneNoteApi 1.1] + * + * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + */ + appendHtml(html: string): void; + /** + * + * Adds the specified image to table cell. + * + * [Api set: OneNoteApi 1.1] + * + * @param base64EncodedImage HTML string to append. + * @param width Optional. Width in the unit of Points. The default value is null and image width will be respected. + * @param height Optional. Height in the unit of Points. The default value is null and image height will be respected. + */ + appendImage(base64EncodedImage: string, width: number, height: number): OneNote.Image; + /** + * + * Adds the specified text to table cell. + * + * [Api set: OneNoteApi 1.1] + * + * @param paragraphText HTML string to append. + */ + appendRichText(paragraphText: string): OneNote.RichText; + /** + * + * Adds a table with the specified number of rows and columns to table cell. + * + * [Api set: OneNoteApi 1.1] + * + * @param rowCount Required. The number of rows in the table. + * @param columnCount Required. The number of columns in the table. + * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + appendTable(rowCount: number, columnCount: number, values?: string[][]): OneNote.Table; + /** + * + * Clears the contents of the cell. + * + * [Api set: OneNoteApi 1.1] + */ + clear(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.TableCell` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.TableCell` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.TableCell` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.TableCellLoadOptions): OneNote.TableCell; + load(option?: string | string[]): OneNote.TableCell; + load(option?: { + select?: string; + expand?: string; + }): OneNote.TableCell; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.TableCell; + toJSON(): OneNote.Interfaces.TableCellData; + } + /** + * + * Contains a collection of TableCell objects. + * + * [Api set: OneNoteApi 1.1] + */ + class TableCellCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: OneNote.TableCell[]; + /** + * + * Returns the number of tablecells in this collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + readonly count: number; + /** + * + * Gets a table cell object by ID or by its index in the collection. Read-only. + * + * [Api set: OneNoteApi 1.1] + * + * @param index A number that identifies the index location of a table cell object. + */ + getItem(index: number | string): OneNote.TableCell; + /** + * + * Gets a tablecell at its position in the collection. + * + * [Api set: OneNoteApi 1.1] + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): OneNote.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): OneNote.TableCellCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): OneNote.TableCellCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): OneNote.TableCellCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: OneNote.Interfaces.TableCellCollectionLoadOptions & OneNote.Interfaces.CollectionLoadOptions): OneNote.TableCellCollection; + load(option?: string | string[]): OneNote.TableCellCollection; + load(option?: OfficeExtension.LoadOption): OneNote.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): OneNote.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): OneNote.TableCellCollection; + toJSON(): OneNote.Interfaces.TableCellCollectionData; + } + /** + * + * Represents data obtained by OCR (optical character recognition) of an image. + * + * [Api set: OneNoteApi 1.1] + */ + interface ImageOcrData { + /** + * + * Represents the OCR language, with values such as EN-US + * + * [Api set: OneNoteApi 1.1] + */ + ocrLanguageId: string; + /** + * + * Represents the text obtained by OCR of the image + * + * [Api set: OneNoteApi 1.1] + */ + ocrText: string; + } + /** + * + * Weak reference to an ink stroke object and its content parent. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokePointer { + /** + * + * Represents the id of the page content object corresponding to this stroke + * + * [Api set: OneNoteApi 1.1] + */ + contentId: string; + /** + * + * Represents the id of the ink stroke + * + * [Api set: OneNoteApi 1.1] + */ + inkStrokeId: string; + } + /** + * + * List information for paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphInfo { + /** + * + * // + Bullet list type of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + bulletType: string; + /** + * + * // + Index of paragraph in list + * + * [Api set: OneNoteApi 1.1] + */ + index: number; + /** + * + * // + Type of list in paragraph + * + * [Api set: OneNoteApi 1.1] + */ + listType: OneNote.ListType | "None" | "Number" | "Bullet"; + /** + * + * // + number list type of paragraph + * + * [Api set: OneNoteApi 1.1] + */ + numberType: OneNote.NumberType | "None" | "Arabic" | "UCRoman" | "LCRoman" | "UCLetter" | "LCLetter" | "Ordinal" | "Cardtext" | "Ordtext" | "Hex" | "ChiManSty" | "DbNum1" | "DbNum2" | "Aiueo" | "Iroha" | "DbChar" | "SbChar" | "DbNum3" | "DbNum4" | "Circlenum" | "DArabic" | "DAiueo" | "DIroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GB1" | "GB2" | "GB3" | "GB4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TpeDbNum1" | "TpeDbNum2" | "TpeDbNum3" | "TpeDbNum4" | "ChnDbNum1" | "ChnDbNum2" | "ChnDbNum3" | "ChnDbNum4" | "KorDbNum1" | "KorDbNum2" | "KorDbNum3" | "KorDbNum4" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "Hindi1" | "Hindi2" | "Hindi3" | "Thai1" | "Thai2" | "NumInDash" | "LCRus" | "UCRus" | "LCGreek" | "UCGreek" | "Lim" | "Custom"; + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum InsertLocation { + before = "Before", + after = "After", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum PageContentType { + outline = "Outline", + image = "Image", + ink = "Ink", + other = "Other", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum ParagraphType { + richText = "RichText", + image = "Image", + table = "Table", + ink = "Ink", + other = "Other", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagType { + unknown = "Unknown", + toDo = "ToDo", + important = "Important", + question = "Question", + contact = "Contact", + address = "Address", + phoneNumber = "PhoneNumber", + website = "Website", + idea = "Idea", + critical = "Critical", + toDoPriority1 = "ToDoPriority1", + toDoPriority2 = "ToDoPriority2", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum NoteTagStatus { + unknown = "Unknown", + normal = "Normal", + completed = "Completed", + disabled = "Disabled", + outlookTask = "OutlookTask", + taskNotSyncedYet = "TaskNotSyncedYet", + taskRemoved = "TaskRemoved", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum ListType { + none = "None", + number = "Number", + bullet = "Bullet", + } + /** + * [Api set: OneNoteApi 1.1] + */ + enum NumberType { + none = "None", + arabic = "Arabic", + ucroman = "UCRoman", + lcroman = "LCRoman", + ucletter = "UCLetter", + lcletter = "LCLetter", + ordinal = "Ordinal", + cardtext = "Cardtext", + ordtext = "Ordtext", + hex = "Hex", + chiManSty = "ChiManSty", + dbNum1 = "DbNum1", + dbNum2 = "DbNum2", + aiueo = "Aiueo", + iroha = "Iroha", + dbChar = "DbChar", + sbChar = "SbChar", + dbNum3 = "DbNum3", + dbNum4 = "DbNum4", + circlenum = "Circlenum", + darabic = "DArabic", + daiueo = "DAiueo", + diroha = "DIroha", + arabicLZ = "ArabicLZ", + bullet = "Bullet", + ganada = "Ganada", + chosung = "Chosung", + gb1 = "GB1", + gb2 = "GB2", + gb3 = "GB3", + gb4 = "GB4", + zodiac1 = "Zodiac1", + zodiac2 = "Zodiac2", + zodiac3 = "Zodiac3", + tpeDbNum1 = "TpeDbNum1", + tpeDbNum2 = "TpeDbNum2", + tpeDbNum3 = "TpeDbNum3", + tpeDbNum4 = "TpeDbNum4", + chnDbNum1 = "ChnDbNum1", + chnDbNum2 = "ChnDbNum2", + chnDbNum3 = "ChnDbNum3", + chnDbNum4 = "ChnDbNum4", + korDbNum1 = "KorDbNum1", + korDbNum2 = "KorDbNum2", + korDbNum3 = "KorDbNum3", + korDbNum4 = "KorDbNum4", + hebrew1 = "Hebrew1", + arabic1 = "Arabic1", + hebrew2 = "Hebrew2", + arabic2 = "Arabic2", + hindi1 = "Hindi1", + hindi2 = "Hindi2", + hindi3 = "Hindi3", + thai1 = "Thai1", + thai2 = "Thai2", + numInDash = "NumInDash", + lcrus = "LCRus", + ucrus = "UCRus", + lcgreek = "LCGreek", + ucgreek = "UCGreek", + lim = "Lim", + custom = "Custom", + } + enum ErrorCodes { + generalException = "GeneralException", + } + module Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the InkAnalysis object, for use in "inkAnalysis.set({ ... })". */ + interface InkAnalysisUpdateData { + /** + * + * Gets the parent page object. + * + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageUpdateData; + } + /** An interface for updating data on the InkAnalysisParagraph object, for use in "inkAnalysisParagraph.set({ ... })". */ + interface InkAnalysisParagraphUpdateData { + /** + * + * Reference to the parent InkAnalysisPage. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisUpdateData; + } + /** An interface for updating data on the InkAnalysisParagraphCollection object, for use in "inkAnalysisParagraphCollection.set({ ... })". */ + interface InkAnalysisParagraphCollectionUpdateData { + items?: OneNote.Interfaces.InkAnalysisParagraphData[]; + } + /** An interface for updating data on the InkAnalysisLine object, for use in "inkAnalysisLine.set({ ... })". */ + interface InkAnalysisLineUpdateData { + /** + * + * Reference to the parent InkAnalysisParagraph. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphUpdateData; + } + /** An interface for updating data on the InkAnalysisLineCollection object, for use in "inkAnalysisLineCollection.set({ ... })". */ + interface InkAnalysisLineCollectionUpdateData { + items?: OneNote.Interfaces.InkAnalysisLineData[]; + } + /** An interface for updating data on the InkAnalysisWord object, for use in "inkAnalysisWord.set({ ... })". */ + interface InkAnalysisWordUpdateData { + /** + * + * Reference to the parent InkAnalysisLine. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineUpdateData; + } + /** An interface for updating data on the InkAnalysisWordCollection object, for use in "inkAnalysisWordCollection.set({ ... })". */ + interface InkAnalysisWordCollectionUpdateData { + items?: OneNote.Interfaces.InkAnalysisWordData[]; + } + /** An interface for updating data on the InkStrokeCollection object, for use in "inkStrokeCollection.set({ ... })". */ + interface InkStrokeCollectionUpdateData { + items?: OneNote.Interfaces.InkStrokeData[]; + } + /** An interface for updating data on the InkWordCollection object, for use in "inkWordCollection.set({ ... })". */ + interface InkWordCollectionUpdateData { + items?: OneNote.Interfaces.InkWordData[]; + } + /** An interface for updating data on the NotebookCollection object, for use in "notebookCollection.set({ ... })". */ + interface NotebookCollectionUpdateData { + items?: OneNote.Interfaces.NotebookData[]; + } + /** An interface for updating data on the SectionGroupCollection object, for use in "sectionGroupCollection.set({ ... })". */ + interface SectionGroupCollectionUpdateData { + items?: OneNote.Interfaces.SectionGroupData[]; + } + /** An interface for updating data on the SectionCollection object, for use in "sectionCollection.set({ ... })". */ + interface SectionCollectionUpdateData { + items?: OneNote.Interfaces.SectionData[]; + } + /** An interface for updating data on the Page object, for use in "page.set({ ... })". */ + interface PageUpdateData { + /** + * + * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisUpdateData; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: string; + } + /** An interface for updating data on the PageCollection object, for use in "pageCollection.set({ ... })". */ + interface PageCollectionUpdateData { + items?: OneNote.Interfaces.PageData[]; + } + /** An interface for updating data on the PageContent object, for use in "pageContent.set({ ... })". */ + interface PageContentUpdateData { + /** + * + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: number; + } + /** An interface for updating data on the PageContentCollection object, for use in "pageContentCollection.set({ ... })". */ + interface PageContentCollectionUpdateData { + items?: OneNote.Interfaces.PageContentData[]; + } + /** An interface for updating data on the Paragraph object, for use in "paragraph.set({ ... })". */ + interface ParagraphUpdateData { + /** + * + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageUpdateData; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableUpdateData; + } + /** An interface for updating data on the ParagraphCollection object, for use in "paragraphCollection.set({ ... })". */ + interface ParagraphCollectionUpdateData { + items?: OneNote.Interfaces.ParagraphData[]; + } + /** An interface for updating data on the Image object, for use in "image.set({ ... })". */ + interface ImageUpdateData { + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ + interface TableUpdateData { + /** + * + * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + } + /** An interface for updating data on the TableRowCollection object, for use in "tableRowCollection.set({ ... })". */ + interface TableRowCollectionUpdateData { + items?: OneNote.Interfaces.TableRowData[]; + } + /** An interface for updating data on the TableCell object, for use in "tableCell.set({ ... })". */ + interface TableCellUpdateData { + /** + * + * Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: string; + } + /** An interface for updating data on the TableCellCollection object, for use in "tableCellCollection.set({ ... })". */ + interface TableCellCollectionUpdateData { + items?: OneNote.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling "application.toJSON()". */ + interface ApplicationData { + /** + * + * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + notebooks?: OneNote.Interfaces.NotebookData[]; + } + /** An interface describing the data returned by calling "inkAnalysis.toJSON()". */ + interface InkAnalysisData { + /** + * + * Gets the parent page object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageData; + /** + * + * Gets the ink analysis paragraphs in this page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphData[]; + /** + * + * Gets the ID of the InkAnalysis object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "inkAnalysisParagraph.toJSON()". */ + interface InkAnalysisParagraphData { + /** + * + * Reference to the parent InkAnalysisPage. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisData; + /** + * + * Gets the ink analysis lines in this ink analysis paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineData[]; + /** + * + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "inkAnalysisParagraphCollection.toJSON()". */ + interface InkAnalysisParagraphCollectionData { + items?: OneNote.Interfaces.InkAnalysisParagraphData[]; + } + /** An interface describing the data returned by calling "inkAnalysisLine.toJSON()". */ + interface InkAnalysisLineData { + /** + * + * Reference to the parent InkAnalysisParagraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphData; + /** + * + * Gets the ink analysis words in this ink analysis line. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordData[]; + /** + * + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "inkAnalysisLineCollection.toJSON()". */ + interface InkAnalysisLineCollectionData { + items?: OneNote.Interfaces.InkAnalysisLineData[]; + } + /** An interface describing the data returned by calling "inkAnalysisWord.toJSON()". */ + interface InkAnalysisWordData { + /** + * + * Reference to the parent InkAnalysisLine. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineData; + /** + * + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * + * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: OneNote.InkStrokePointer[]; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: string[]; + } + /** An interface describing the data returned by calling "inkAnalysisWordCollection.toJSON()". */ + interface InkAnalysisWordCollectionData { + items?: OneNote.Interfaces.InkAnalysisWordData[]; + } + /** An interface describing the data returned by calling "floatingInk.toJSON()". */ + interface FloatingInkData { + /** + * + * Gets the strokes of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeData[]; + /** + * + * Gets the PageContent parent of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the ID of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "inkStroke.toJSON()". */ + interface InkStrokeData { + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkData; + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "inkStrokeCollection.toJSON()". */ + interface InkStrokeCollectionData { + items?: OneNote.Interfaces.InkStrokeData[]; + } + /** An interface describing the data returned by calling "inkWord.toJSON()". */ + interface InkWordData { + /** + * + * The parent paragraph containing the ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: string[]; + } + /** An interface describing the data returned by calling "inkWordCollection.toJSON()". */ + interface InkWordCollectionData { + items?: OneNote.Interfaces.InkWordData[]; + } + /** An interface describing the data returned by calling "notebook.toJSON()". */ + interface NotebookData { + /** + * + * The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * + * The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: string; + /** + * + * The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * + * Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: string; + } + /** An interface describing the data returned by calling "notebookCollection.toJSON()". */ + interface NotebookCollectionData { + items?: OneNote.Interfaces.NotebookData[]; + } + /** An interface describing the data returned by calling "sectionGroup.toJSON()". */ + interface SectionGroupData { + /** + * + * Gets the notebook that contains the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookData; + /** + * + * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupData; + /** + * + * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupData; + /** + * + * The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupData[]; + /** + * + * The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionData[]; + /** + * + * The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: string; + } + /** An interface describing the data returned by calling "sectionGroupCollection.toJSON()". */ + interface SectionGroupCollectionData { + items?: OneNote.Interfaces.SectionGroupData[]; + } + /** An interface describing the data returned by calling "section.toJSON()". */ + interface SectionData { + /** + * + * Gets the notebook that contains the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookData; + /** + * + * The collection of pages in the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageData[]; + /** + * + * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupData; + /** + * + * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupData; + /** + * + * The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * True if this section is encrypted with a password. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * + * True if this section is locked. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * + * Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: string; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: string; + } + /** An interface describing the data returned by calling "sectionCollection.toJSON()". */ + interface SectionCollectionData { + items?: OneNote.Interfaces.SectionData[]; + } + /** An interface describing the data returned by calling "page.toJSON()". */ + interface PageData { + /** + * + * The collection of PageContent objects on the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + contents?: OneNote.Interfaces.PageContentData[]; + /** + * + * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisData; + /** + * + * Gets the section that contains the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionData; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: string; + /** + * + * The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: string; + /** + * + * Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: number; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: string; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: string; + } + /** An interface describing the data returned by calling "pageCollection.toJSON()". */ + interface PageCollectionData { + items?: OneNote.Interfaces.PageData[]; + } + /** An interface describing the data returned by calling "pageContent.toJSON()". */ + interface PageContentData { + /** + * + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageData; + /** + * + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkData; + /** + * + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * + * Gets the page that contains the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageData; + /** + * + * Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: number; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: number; + /** + * + * Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: OneNote.PageContentType | "Outline" | "Image" | "Ink" | "Other"; + } + /** An interface describing the data returned by calling "pageContentCollection.toJSON()". */ + interface PageContentCollectionData { + items?: OneNote.Interfaces.PageContentData[]; + } + /** An interface describing the data returned by calling "outline.toJSON()". */ + interface OutlineData { + /** + * + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the collection of Paragraph objects in the Outline. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the ID of the Outline object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + } + /** An interface describing the data returned by calling "paragraph.toJSON()". */ + interface ParagraphData { + /** + * + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageData; + /** + * + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordData[]; + /** + * + * Gets the Outline object that contains the Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineData; + /** + * + * The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraphOrNull?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCell?: OneNote.Interfaces.TableCellData; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellData; + /** + * + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. Read-only + * + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextData; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableData; + /** + * + * Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: OneNote.ParagraphType | "RichText" | "Image" | "Table" | "Ink" | "Other"; + } + /** An interface describing the data returned by calling "paragraphCollection.toJSON()". */ + interface ParagraphCollectionData { + items?: OneNote.Interfaces.ParagraphData[]; + } + /** An interface describing the data returned by calling "noteTag.toJSON()". */ + interface NoteTagData { + /** + * + * Gets the Id of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + status?: OneNote.NoteTagStatus | "Unknown" | "Normal" | "Completed" | "Disabled" | "OutlookTask" | "TaskNotSyncedYet" | "TaskRemoved"; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: OneNote.NoteTagType | "Unknown" | "ToDo" | "Important" | "Question" | "Contact" | "Address" | "PhoneNumber" | "Website" | "Idea" | "Critical" | "ToDoPriority1" | "ToDoPriority2"; + } + /** An interface describing the data returned by calling "richText.toJSON()". */ + interface RichTextData { + /** + * + * Gets the Paragraph object that contains the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets the ID of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: string; + /** + * + * Gets the text content of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "image.toJSON()". */ + interface ImageData { + /** + * + * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentData; + /** + * + * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description?: string; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: number; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets the ID of the Image object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. + * + * [Api set: OneNoteApi 1.1] + */ + ocrData?: OneNote.ImageOcrData; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Gets the Paragraph object that contains the Table object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphData; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rows?: OneNote.Interfaces.TableRowData[]; + /** + * + * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * + * Gets the number of columns in the table. + * + * [Api set: OneNoteApi 1.1] + */ + columnCount?: number; + /** + * + * Gets the ID of the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the number of rows in the table. + * + * [Api set: OneNoteApi 1.1] + */ + rowCount?: number; + } + /** An interface describing the data returned by calling "tableRow.toJSON()". */ + interface TableRowData { + /** + * + * Gets the cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellData[]; + /** + * + * Gets the parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableData; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: number; + /** + * + * Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: number; + } + /** An interface describing the data returned by calling "tableRowCollection.toJSON()". */ + interface TableRowCollectionData { + items?: OneNote.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling "tableCell.toJSON()". */ + interface TableCellData { + /** + * + * Gets the collection of Paragraph objects in the TableCell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphData[]; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowData; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: number; + /** + * + * Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: string; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: number; + /** + * + * Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: string; + } + /** An interface describing the data returned by calling "tableCellCollection.toJSON()". */ + interface TableCellCollectionData { + items?: OneNote.Interfaces.TableCellData[]; + } + + /** + * + * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. + * + * [Api set: OneNoteApi 1.1] + */ + interface ApplicationLoadOptions { + $all?: boolean; + /** + * + * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. + * + * [Api set: OneNoteApi 1.1] + */ + notebooks?: OneNote.Interfaces.NotebookCollectionLoadOptions; + } + /** + * + * Represents ink analysis data for a given set of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLoadOptions { + $all?: boolean; + /** + * + * Gets the parent page object. + * + * [Api set: OneNoteApi 1.1] + */ + page?: OneNote.Interfaces.PageLoadOptions; + /** + * + * Gets the ink analysis paragraphs in this page. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysis object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified paragraph formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisPage. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * Gets the ink analysis lines in this ink analysis paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkAnalysisParagraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisPage. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysis?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ink analysis lines in this ink analysis paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + lines?: OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisParagraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified text line formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisParagraph. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; + /** + * + * Gets the ink analysis words in this ink analysis line. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * + * Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkAnalysisLine objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisLineCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisParagraph. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.InkAnalysisParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ink analysis words in this ink analysis line. + * + * [Api set: OneNoteApi 1.1] + */ + words?: OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisLine object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents ink analysis data for an identified word formed by ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordLoadOptions { + $all?: boolean; + /** + * + * Reference to the parent InkAnalysisLine. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * + * Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: boolean; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a collection of InkAnalysisWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkAnalysisWordCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Reference to the parent InkAnalysisLine. + * + * [Api set: OneNoteApi 1.1] + */ + line?: OneNote.Interfaces.InkAnalysisLineLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkAnalysisWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The id of the recognized language in this inkAnalysisWord. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * For EACH ITEM in the collection: Weak references to the ink strokes that were recognized as part of this ink analysis word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + strokePointers?: boolean; + /** + * + * For EACH ITEM in the collection: The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a group of ink strokes. + * + * [Api set: OneNoteApi 1.1] + */ + interface FloatingInkLoadOptions { + $all?: boolean; + /** + * + * Gets the strokes of the FloatingInk object. + * + * [Api set: OneNoteApi 1.1] + */ + inkStrokes?: OneNote.Interfaces.InkStrokeCollectionLoadOptions; + /** + * + * Gets the PageContent parent of the FloatingInk object. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * + * Gets the ID of the FloatingInk object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a single stroke of ink. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeLoadOptions { + $all?: boolean; + /** + * + * Gets the ID of the InkStroke object. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * Represents a collection of InkStroke objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkStrokeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. + * + * [Api set: OneNoteApi 1.1] + */ + floatingInk?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkStroke object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * A container for the ink in a word in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkWordLoadOptions { + $all?: boolean; + /** + * + * The parent paragraph containing the ink word. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a collection of InkWord objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface InkWordCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The parent paragraph containing the ink word. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the InkWord object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The id of the recognized language in this ink word. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * For EACH ITEM in the collection: The words that were recognized in this ink word, in order of likelihood. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + wordAlternates?: boolean; + } + /** + * + * Represents a OneNote notebook. Notebooks contain section groups and sections. + * + * [Api set: OneNoteApi 1.1] + */ + interface NotebookLoadOptions { + $all?: boolean; + /** + * + * The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * + * The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * + * Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a collection of notebooks. + * + * [Api set: OneNoteApi 1.1] + */ + interface NotebookCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The section groups in the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The the sections of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The url of the site that this notebook is located. Read only + * + * [Api set: OneNoteApi 1.1] + */ + baseUrl?: boolean; + /** + * + * For EACH ITEM in the collection: The client url of the notebook. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: True if the Notebook is not created by the user (i.e. 'Misplaced Sections'). Read only + * + * [Api set: OneNoteApi 1.2] + */ + isVirtual?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the notebook. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a OneNote section group. Section groups can contain sections and other section groups. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupLoadOptions { + $all?: boolean; + /** + * + * Gets the notebook that contains the section group. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a collection of section groups. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionGroupCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the notebook that contains the section group. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section group that contains the section group. Throws ItemNotFound if the section group is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section group that contains the section group. Returns null if the section group is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of section groups in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sectionGroups?: OneNote.Interfaces.SectionGroupCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of sections in the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + sections?: OneNote.Interfaces.SectionCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: The client url of the section group. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the section group. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a OneNote section. Sections can contain pages. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionLoadOptions { + $all?: boolean; + /** + * + * Gets the notebook that contains the section. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * The collection of pages in the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageCollectionLoadOptions; + /** + * + * Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * True if this section is encrypted with a password. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * + * True if this section is locked. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * + * Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a collection of sections. + * + * [Api set: OneNoteApi 1.1] + */ + interface SectionCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the notebook that contains the section. + * + * [Api set: OneNoteApi 1.1] + */ + notebook?: OneNote.Interfaces.NotebookLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of pages in the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + pages?: OneNote.Interfaces.PageCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section group that contains the section. Throws ItemNotFound if the section is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroup?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section group that contains the section. Returns null if the section is a direct child of the notebook. + * + * [Api set: OneNoteApi 1.1] + */ + parentSectionGroupOrNull?: OneNote.Interfaces.SectionGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: The client url of the section. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: True if this section is encrypted with a password. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isEncrypted?: boolean; + /** + * + * For EACH ITEM in the collection: True if this section is locked. Read only + * + * [Api set: OneNoteApi 1.2] + */ + isLocked?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the name of the section. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageLoadOptions { + $all?: boolean; + /** + * + * The collection of PageContent objects on the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + contents?: OneNote.Interfaces.PageContentCollectionLoadOptions; + /** + * + * Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * Gets the section that contains the page. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * + * Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * + * The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * + * Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * + * The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a collection of pages. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The collection of PageContent objects on the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + contents?: OneNote.Interfaces.PageContentCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Text interpretation for the ink on the page. Returns null if there is no ink analysis information. Read only. + * + * [Api set: OneNoteApi 1.1] + */ + inkAnalysisOrNull?: OneNote.Interfaces.InkAnalysisLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the section that contains the page. + * + * [Api set: OneNoteApi 1.1] + */ + parentSection?: OneNote.Interfaces.SectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ClassNotebookPageSource to the page. + * + * [Api set: OneNoteApi 1.1] + */ + classNotebookPageSource?: boolean; + /** + * + * For EACH ITEM in the collection: The client url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + clientUrl?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the page. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the indentation level of the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the title of the page. + * + * [Api set: OneNoteApi 1.1] + */ + title?: boolean; + /** + * + * For EACH ITEM in the collection: The web url of the page. Read only + * + * [Api set: OneNoteApi 1.1] + */ + webUrl?: boolean; + } + /** + * + * Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageContentLoadOptions { + $all?: boolean; + /** + * + * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * Gets the page that contains the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * + * Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: boolean; + /** + * + * Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * + * Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents the contents of a page, as a collection of PageContent objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface PageContentCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ink in the PageContent object. Throws an exception if PageContentType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + ink?: OneNote.Interfaces.FloatingInkLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the Outline in the PageContent object. Throws an exception if PageContentType is not Outline. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the page that contains the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + parentPage?: OneNote.Interfaces.PageLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the left (X-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the top (Y-axis) position of the PageContent object. + * + * [Api set: OneNoteApi 1.1] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the type of the PageContent object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a container for Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface OutlineLoadOptions { + $all?: boolean; + /** + * + * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * + * Gets the collection of Paragraph objects in the Outline. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the ID of the Outline object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + } + /** + * + * A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphLoadOptions { + $all?: boolean; + /** + * + * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * + * Gets the Outline object that contains the Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the parent paragraph object. Throws if a parent paragraph does not exist. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the parent paragraph object. Returns null if a parent paragraph does not exist. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraphOrNull?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCell?: OneNote.Interfaces.TableCellLoadOptions; + /** + * + * Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; + /** + * + * Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. + * + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextLoadOptions; + /** + * + * Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * + * Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a collection of Paragraph objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface ParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. + * + * [Api set: OneNoteApi 1.1] + */ + image?: OneNote.Interfaces.ImageLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the Ink collection in the Paragraph. Throws an exception if ParagraphType is not Ink. + * + * [Api set: OneNoteApi 1.1] + */ + inkWords?: OneNote.Interfaces.InkWordCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the Outline object that contains the Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + outline?: OneNote.Interfaces.OutlineLoadOptions; + /** + * + * For EACH ITEM in the collection: The collection of paragraphs under this paragraph. Read only + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent paragraph object. Throws if a parent paragraph does not exist. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent paragraph object. Returns null if a parent paragraph does not exist. + * + * [Api set: OneNoteApi 1.1] + */ + parentParagraphOrNull?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, throws ItemNotFound. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCell?: OneNote.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the TableCell object that contains the Paragraph if one exists. If parent is not a TableCell, returns null. + * + * [Api set: OneNoteApi 1.1] + */ + parentTableCellOrNull?: OneNote.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the RichText object in the Paragraph. Throws an exception if ParagraphType is not RichText. + * + * [Api set: OneNoteApi 1.1] + */ + richText?: OneNote.Interfaces.RichTextLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the Table object in the Paragraph. Throws an exception if ParagraphType is not Table. + * + * [Api set: OneNoteApi 1.1] + */ + table?: OneNote.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ID of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the type of the Paragraph object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * A container for the NoteTag in a paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface NoteTagLoadOptions { + $all?: boolean; + /** + * + * Gets the Id of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the status of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + status?: boolean; + /** + * + * Gets the type of the NoteTag object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a RichText object in a Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + interface RichTextLoadOptions { + $all?: boolean; + /** + * + * Gets the Paragraph object that contains the RichText object. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the ID of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * The language id of the text. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + languageId?: boolean; + /** + * + * Gets the text content of the RichText object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + text?: boolean; + } + /** + * + * Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object. + * + * [Api set: OneNoteApi 1.1] + */ + interface ImageLoadOptions { + $all?: boolean; + /** + * + * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. + * + * [Api set: OneNoteApi 1.1] + */ + pageContent?: OneNote.Interfaces.PageContentLoadOptions; + /** + * + * Gets the Paragraph object that contains the Image. Throws if the Image is not a direct child of a Paragraph. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets or sets the description of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + description?: boolean; + /** + * + * Gets or sets the height of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + height?: boolean; + /** + * + * Gets or sets the hyperlink of the Image. + * + * [Api set: OneNoteApi 1.1] + */ + hyperlink?: boolean; + /** + * + * Gets the ID of the Image object. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the data obtained by OCR (Optical Character Recognition) of this Image, such as OCR text and language. + * + * [Api set: OneNoteApi 1.1] + */ + ocrData?: boolean; + /** + * + * Gets or sets the width of the Image layout. + * + * [Api set: OneNoteApi 1.1] + */ + width?: boolean; + } + /** + * + * Represents a table in a OneNote page. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Gets the Paragraph object that contains the Table object. + * + * [Api set: OneNoteApi 1.1] + */ + paragraph?: OneNote.Interfaces.ParagraphLoadOptions; + /** + * + * Gets all of the table rows. + * + * [Api set: OneNoteApi 1.1] + */ + rows?: OneNote.Interfaces.TableRowCollectionLoadOptions; + /** + * + * Gets or sets whether the borders are visible or not. True if they are visible, false if they are hidden. + * + * [Api set: OneNoteApi 1.1] + */ + borderVisible?: boolean; + /** + * + * Gets the number of columns in the table. + * + * [Api set: OneNoteApi 1.1] + */ + columnCount?: boolean; + /** + * + * Gets the ID of the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the number of rows in the table. + * + * [Api set: OneNoteApi 1.1] + */ + rowCount?: boolean; + } + /** + * + * Represents a row in a table. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Gets the cells in the row. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * + * Gets the parent table. + * + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableLoadOptions; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * + * Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * + * Contains a collection of TableRow objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the cells in the row. + * + * [Api set: OneNoteApi 1.1] + */ + cells?: OneNote.Interfaces.TableCellCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent table. + * + * [Api set: OneNoteApi 1.1] + */ + parentTable?: OneNote.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the number of cells in the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellCount?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the row in its parent table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + } + /** + * + * Represents a cell in a OneNote table. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableCellLoadOptions { + $all?: boolean; + /** + * + * Gets the collection of Paragraph objects in the TableCell. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * Gets the parent row of the cell. + * + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowLoadOptions; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * + * Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * + * Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + /** + * + * Contains a collection of TableCell objects. + * + * [Api set: OneNoteApi 1.1] + */ + interface TableCellCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the collection of Paragraph objects in the TableCell. + * + * [Api set: OneNoteApi 1.1] + */ + paragraphs?: OneNote.Interfaces.ParagraphCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * [Api set: OneNoteApi 1.1] + */ + parentRow?: OneNote.Interfaces.TableRowLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell in its row. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + cellIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the cell. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. Read-only. + * + * [Api set: OneNoteApi 1.1] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Gets and sets the shading color of the cell + * + * [Api set: OneNoteApi 1.1] + */ + shadingColor?: boolean; + } + } +} +declare namespace OneNote { + class RequestContext extends OfficeCore.RequestContext { + constructor(url?: string); + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the OneNote object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the OneNote application. Since the Office add-in and the OneNote application run in two different processes, the request context is required to get access to the OneNote object model from the add-in. + */ + function run(batch: (context: OneNote.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects. + * @param object - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()". + * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object. + * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * + * @remarks + * In addition to this signature, the method also has the following signatures: + * + * `run(batch: (context: OneNote.RequestContext) => Promise): Promise;` + * + * `run(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise): Promise;` + */ + function run(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End OneNote APIs /////////////////////// +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Visio APIs /////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Visio { + /** + * + * Provides information about the shape that raised the ShapeMouseEnter event. + * + * [Api set: 1.1] + */ + interface ShapeMouseEnterEventArgs { + /** + * + * Gets the name of the page which has the shape object that raised the ShapeMouseEnter event. + * + * [Api set: 1.1] + */ + pageName: string; + /** + * + * Gets the name of the shape object that raised the ShapeMouseEnter event. + * + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * + * Provides information about the shape that raised the ShapeMouseLeave event. + * + * [Api set: 1.1] + */ + interface ShapeMouseLeaveEventArgs { + /** + * + * Gets the name of the page which has the shape object that raised the ShapeMouseLeave event. + * + * [Api set: 1.1] + */ + pageName: string; + /** + * + * Gets the name of the shape object that raised the ShapeMouseLeave event. + * + * [Api set: 1.1] + */ + shapeName: string; + } + /** + * + * Provides information about the page that raised the PageLoadComplete event. + * + * [Api set: 1.1] + */ + interface PageLoadCompleteEventArgs { + /** + * + * Gets the name of the page that raised the PageLoad event. + * + * [Api set: 1.1] + */ + pageName: string; + /** + * + * Gets the success or failure of the PageLoadComplete event. + * + * [Api set: 1.1] + */ + success: boolean; + } + /** + * + * Provides information about the document that raised the DataRefreshComplete event. + * + * [Api set: 1.1] + */ + interface DataRefreshCompleteEventArgs { + /** + * + * Gets the document object that raised the DataRefreshComplete event. + * + * [Api set: 1.1] + */ + document: Visio.Document; + /** + * + * Gets the success or failure of the DataRefreshComplete event. + * + * [Api set: 1.1] + */ + success: boolean; + } + /** + * + * Provides information about the shape collection that raised the SelectionChanged event. + * + * [Api set: 1.1] + */ + interface SelectionChangedEventArgs { + /** + * + * Gets the name of the page which has the ShapeCollection object that raised the SelectionChanged event. + * + * [Api set: 1.1] + */ + pageName: string; + /** + * + * Gets the array of shape names that raised the SelectionChanged event. + * + * [Api set: 1.1] + */ + shapeNames: string[]; + } + /** + * + * Provides information about the success or failure of the DocumentLoadComplete event. + * + * [Api set: 1.1] + */ + interface DocumentLoadCompleteEventArgs { + /** + * + * Gets the success or failure of the DocumentLoadComplete event. + * + * [Api set: 1.1] + */ + success: boolean; + } + /** + * + * Provides information about the page that raised the PageRenderComplete event. + * + * [Api set: 1.1] + */ + interface PageRenderCompleteEventArgs { + /** + * + * Gets the name of the page that raised the PageLoad event. + * + * [Api set: 1.1] + */ + pageName: string; + /** + * + * Gets the success/failure of the PageRender event. + * + * [Api set: 1.1] + */ + success: boolean; + } + /** + * + * Represents the Application. + * + * [Api set: 1.1] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Show or hide the iFrame application borders. + * + * [Api set: 1.1] + */ + showBorders: boolean; + /** + * + * Show or hide the standard toolbars. + * + * [Api set: 1.1] + */ + showToolbars: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.Application): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.Application): void; + /** + * + * Sets the visibility of a specific toolbar in the application. + * + * [Api set: 1.1] + * + * @param id The type of the Toolbar + * @param show Whether the toolbar is visibile or not. + */ + showToolbar(id: Visio.ToolBarType, show: boolean): void; + /** + * + * Sets the visibility of a specific toolbar in the application. + * + * [Api set: 1.1] + * + * @param id The type of the Toolbar + * @param show Whether the toolbar is visibile or not. + */ + showToolbar(id: "CommandBar" | "PageNavigationBar" | "StatusBar", show: boolean): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Application` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Application` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Application` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ApplicationLoadOptions): Visio.Application; + load(option?: string | string[]): Visio.Application; + load(option?: { + select?: string; + expand?: string; + }): Visio.Application; + toJSON(): Visio.Interfaces.ApplicationData; + } + /** + * + * Represents the Document class. + * + * [Api set: 1.1] + */ + class Document extends OfficeExtension.ClientObject { + /** + * + * Represents a Visio application instance that contains this document. Read-only. + * + * [Api set: 1.1] + */ + readonly application: Visio.Application; + /** + * + * Represents a collection of pages associated with the document. Read-only. + * + * [Api set: 1.1] + */ + readonly pages: Visio.PageCollection; + /** + * + * Returns the DocumentView object. Read-only. + * + * [Api set: 1.1] + */ + readonly view: Visio.DocumentView; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.Document): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.Document): void; + /** + * + * Returns the Active Page of the document. + * + * [Api set: 1.1] + */ + getActivePage(): Visio.Page; + /** + * + * Set the Active Page of the document. + * + * [Api set: 1.1] + * + * @param PageName Name of the page + */ + setActivePage(PageName: string): void; + /** + * + * Triggers the refresh of the data in the Diagram, for all pages. + * + * [Api set: 1.1] + */ + startDataRefresh(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Document` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Document` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Document` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.DocumentLoadOptions): Visio.Document; + load(option?: string | string[]): Visio.Document; + load(option?: { + select?: string; + expand?: string; + }): Visio.Document; + /** + * + * Occurs when the data is refreshed in the diagram. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDataRefreshComplete: OfficeExtension.EventHandlers; + /** + * + * Occurs when the Document is loaded, refreshed, or changed. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onDocumentLoadComplete: OfficeExtension.EventHandlers; + /** + * + * Occurs when the page is finished loading. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onPageLoadComplete: OfficeExtension.EventHandlers; + /** + * + * Occurs when the current selection of shapes changes. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the user moves the mouse pointer into the bounding box of a shape. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseEnter: OfficeExtension.EventHandlers; + /** + * + * Occurs when the user moves the mouse out of the bounding box of a shape. + * + * [Api set: 1.1] + * + * @eventproperty + */ + readonly onShapeMouseLeave: OfficeExtension.EventHandlers; + toJSON(): Visio.Interfaces.DocumentData; + } + /** + * + * Represents the DocumentView class. + * + * [Api set: 1.1] + */ + class DocumentView extends OfficeExtension.ClientObject { + /** + * + * Disable Hyperlinks. + * + * [Api set: 1.1] + */ + disableHyperlinks: boolean; + /** + * + * Disable Pan. + * + * [Api set: 1.1] + */ + disablePan: boolean; + /** + * + * Disable Zoom. + * + * [Api set: 1.1] + */ + disableZoom: boolean; + /** + * + * Hide Diagram Boundary. + * + * [Api set: 1.1] + */ + hideDiagramBoundary: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.DocumentView): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentViewUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.DocumentView): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.DocumentView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.DocumentView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.DocumentView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.DocumentViewLoadOptions): Visio.DocumentView; + load(option?: string | string[]): Visio.DocumentView; + load(option?: { + select?: string; + expand?: string; + }): Visio.DocumentView; + toJSON(): Visio.Interfaces.DocumentViewData; + } + /** + * + * Represents the Page class. + * + * [Api set: 1.1] + */ + class Page extends OfficeExtension.ClientObject { + /** + * + * All shapes in the Page, including subshapes. Read-only. + * + * [Api set: 1.1] + */ + readonly allShapes: Visio.ShapeCollection; + /** + * + * Returns the Comments Collection. Read-only. + * + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * + * All top-level shapes in the Page.Read-only. + * + * [Api set: 1.1] + */ + readonly shapes: Visio.ShapeCollection; + /** + * + * Returns the view of the page. Read-only. + * + * [Api set: 1.1] + */ + readonly view: Visio.PageView; + /** + * + * Returns the height of the page. Read-only. + * + * [Api set: 1.1] + */ + readonly height: number; + /** + * + * Index of the Page. Read-only. + * + * [Api set: 1.1] + */ + readonly index: number; + /** + * + * Whether the page is a background page or not. Read-only. + * + * [Api set: 1.1] + */ + readonly isBackground: boolean; + /** + * + * Page name. Read-only. + * + * [Api set: 1.1] + */ + readonly name: string; + /** + * + * Returns the width of the page. Read-only. + * + * [Api set: 1.1] + */ + readonly width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.Page): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PageUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.Page): void; + /** + * + * Set the page as Active Page of the document. + * + * [Api set: 1.1] + */ + activate(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Page` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Page` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Page` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.PageLoadOptions): Visio.Page; + load(option?: string | string[]): Visio.Page; + load(option?: { + select?: string; + expand?: string; + }): Visio.Page; + toJSON(): Visio.Interfaces.PageData; + } + /** + * + * Represents the PageView class. + * + * [Api set: 1.1] + */ + class PageView extends OfficeExtension.ClientObject { + /** + * + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * [Api set: 1.1] + */ + zoom: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.PageView): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PageViewUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.PageView): void; + /** + * + * Pans the Visio drawing to place the specified shape in the center of the view. + * + * [Api set: 1.1] + * + * @param ShapeId ShapeId to be seen in the center. + */ + centerViewportOnShape(ShapeId: number): void; + /** + * + * Fit Page to current window. + * + * [Api set: 1.1] + */ + fitToWindow(): void; + /** + * + * Returns the position object that specifies the position of the page in the view. + * + * [Api set: 1.1] + */ + getPosition(): OfficeExtension.ClientResult; + /** + * + * Represents the Selection in the page. + * + * [Api set: 1.1] + */ + getSelection(): Visio.Selection; + /** + * + * To check if the shape is in view of the page or not. + * + * [Api set: 1.1] + * + * @param Shape Shape to be checked. + */ + isShapeInViewport(Shape: Visio.Shape): OfficeExtension.ClientResult; + /** + * + * Sets the position of the page in the view. + * + * [Api set: 1.1] + * + * @param Position Position object that specifies the new position of the page in the view. + */ + setPosition(Position: Visio.Position): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.PageView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.PageView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.PageView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.PageViewLoadOptions): Visio.PageView; + load(option?: string | string[]): Visio.PageView; + load(option?: { + select?: string; + expand?: string; + }): Visio.PageView; + toJSON(): Visio.Interfaces.PageViewData; + } + /** + * + * Represents a collection of Page objects that are part of the document. + * + * [Api set: 1.1] + */ + class PageCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Visio.Page[]; + /** + * + * Gets the number of pages in the collection. + * + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a page using its key (name or Id). + * + * [Api set: 1.1] + * + * @param key Key is the name or Id of the page to be retrieved. + */ + getItem(key: number | string): Visio.Page; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.PageCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.PageCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.PageCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; + load(option?: string | string[]): Visio.PageCollection; + load(option?: OfficeExtension.LoadOption): Visio.PageCollection; + toJSON(): Visio.Interfaces.PageCollectionData; + } + /** + * + * Represents the Shape Collection. + * + * [Api set: 1.1] + */ + class ShapeCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Visio.Shape[]; + /** + * + * Gets the number of Shapes in the collection. + * + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a Shape using its key (name or Index). + * + * [Api set: 1.1] + * + * @param key Key is the Name or Index of the shape to be retrieved. + */ + getItem(key: number | string): Visio.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.ShapeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; + load(option?: string | string[]): Visio.ShapeCollection; + load(option?: OfficeExtension.LoadOption): Visio.ShapeCollection; + toJSON(): Visio.Interfaces.ShapeCollectionData; + } + /** + * + * Represents the Shape class. + * + * [Api set: 1.1] + */ + class Shape extends OfficeExtension.ClientObject { + /** + * + * Returns the Comments Collection. Read-only. + * + * [Api set: 1.1] + */ + readonly comments: Visio.CommentCollection; + /** + * + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * [Api set: 1.1] + */ + readonly hyperlinks: Visio.HyperlinkCollection; + /** + * + * Returns the Shape's Data Section. Read-only. + * + * [Api set: 1.1] + */ + readonly shapeDataItems: Visio.ShapeDataItemCollection; + /** + * + * Gets SubShape Collection. Read-only. + * + * [Api set: 1.1] + */ + readonly subShapes: Visio.ShapeCollection; + /** + * + * Returns the view of the shape. Read-only. + * + * [Api set: 1.1] + */ + readonly view: Visio.ShapeView; + /** + * + * Shape's identifier. Read-only. + * + * [Api set: 1.1] + */ + readonly id: number; + /** + * + * Shape's name. Read-only. + * + * [Api set: 1.1] + */ + readonly name: string; + /** + * + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * [Api set: 1.1] + */ + select: boolean; + /** + * + * Shape's text. Read-only. + * + * [Api set: 1.1] + */ + readonly text: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.Shape): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.Shape): void; + /** + * + * Returns the BoundingBox object that specifies bounding box of the shape. + * + * [Api set: 1.1] + */ + getBounds(): OfficeExtension.ClientResult; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Shape` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Shape` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Shape` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ShapeLoadOptions): Visio.Shape; + load(option?: string | string[]): Visio.Shape; + load(option?: { + select?: string; + expand?: string; + }): Visio.Shape; + toJSON(): Visio.Interfaces.ShapeData; + } + /** + * + * Represents the ShapeView class. + * + * [Api set: 1.1] + */ + class ShapeView extends OfficeExtension.ClientObject { + /** + * + * Represents the highlight around the shape. + * + * [Api set: 1.1] + */ + highlight: Visio.Highlight; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.ShapeView): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeViewUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.ShapeView): void; + /** + * + * Adds an overlay on top of the shape. + * + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text' or 'Image'. + * @param Content Content of Overlay. + * @param OverlayHorizontalAlignment Horizontal Alignment of Overlay. Can be 'Left', 'Center', or 'Right'. + * @param OverlayVerticalAlignment Vertical Alignment of Overlay. Can be 'Top', 'Middle', 'Bottom'. + * @param Width Overlay Width. + * @param Height Overlay Height. + */ + addOverlay(OverlayType: Visio.OverlayType, Content: string, OverlayHorizontalAlignment: Visio.OverlayHorizontalAlignment, OverlayVerticalAlignment: Visio.OverlayVerticalAlignment, Width: number, Height: number): OfficeExtension.ClientResult; + /** + * + * Adds an overlay on top of the shape. + * + * [Api set: 1.1] + * + * @param OverlayType An Overlay Type. Can be 'Text' or 'Image'. + * @param Content Content of Overlay. + * @param OverlayHorizontalAlignment Horizontal Alignment of Overlay. Can be 'Left', 'Center', or 'Right'. + * @param OverlayVerticalAlignment Vertical Alignment of Overlay. Can be 'Top', 'Middle', 'Bottom'. + * @param Width Overlay Width. + * @param Height Overlay Height. + */ + addOverlay(OverlayType: "Text" | "Image", Content: string, OverlayHorizontalAlignment: "Left" | "Center" | "Right", OverlayVerticalAlignment: "Top" | "Middle" | "Bottom", Width: number, Height: number): OfficeExtension.ClientResult; + /** + * + * Removes particular overlay or all overlays on the Shape. + * + * [Api set: 1.1] + * + * @param OverlayId An Overlay Id. Removes the specific overlay id from the shape. + */ + removeOverlay(OverlayId: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.ShapeView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ShapeViewLoadOptions): Visio.ShapeView; + load(option?: string | string[]): Visio.ShapeView; + load(option?: { + select?: string; + expand?: string; + }): Visio.ShapeView; + toJSON(): Visio.Interfaces.ShapeViewData; + } + /** + * + * Represents the Position of the object in the view. + * + * [Api set: 1.1] + */ + interface Position { + /** + * + * An integer that specifies the x-coordinate of the object, which is the signed value of the distance in pixels from the viewport's center to the left boundary of the page. + * + * [Api set: 1.1] + */ + x: number; + /** + * + * An integer that specifies the y-coordinate of the object, which is the signed value of the distance in pixels from the viewport's center to the top boundary of the page. + * + * [Api set: 1.1] + */ + y: number; + } + /** + * + * Represents the BoundingBox of the shape. + * + * [Api set: 1.1] + */ + interface BoundingBox { + /** + * + * The distance between the top and bottom edges of the bounding box of the shape, excluding any data graphics associated with the shape. + * + * [Api set: 1.1] + */ + height: number; + /** + * + * The distance between the left and right edges of the bounding box of the shape, excluding any data graphics associated with the shape. + * + * [Api set: 1.1] + */ + width: number; + /** + * + * An integer that specifies the x-coordinate of the bounding box. + * + * [Api set: 1.1] + */ + x: number; + /** + * + * An integer that specifies the y-coordinate of the bounding box. + * + * [Api set: 1.1] + */ + y: number; + } + /** + * + * Represents the highlight data added to the shape. + * + * [Api set: 1.1] + */ + interface Highlight { + /** + * + * A string that specifies the color of the highlight. It must have the form "#RRGGBB", where each letter represents a hexadecimal digit between 0 and F, and where RR is the red value between 0 and 0xFF (255), GG the green value between 0 and 0xFF (255), and BB is the blue value between 0 and 0xFF (255). + * + * [Api set: 1.1] + */ + color: string; + /** + * + * A positive integer that specifies the width of the highlight's stroke in pixels. + * + * [Api set: 1.1] + */ + width: number; + } + /** + * + * Represents the ShapeDataItemCollection for a given Shape. + * + * [Api set: 1.1] + */ + class ShapeDataItemCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Visio.ShapeDataItem[]; + /** + * + * Gets the number of Shape Data Items. + * + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets the ShapeDataItem using its name. + * + * [Api set: 1.1] + * + * @param key Key is the name of the ShapeDataItem to be retrieved. + */ + getItem(key: string): Visio.ShapeDataItem; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.ShapeDataItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItemCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeDataItemCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; + load(option?: string | string[]): Visio.ShapeDataItemCollection; + load(option?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; + toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; + } + /** + * + * Represents the ShapeDataItem. + * + * [Api set: 1.1] + */ + class ShapeDataItem extends OfficeExtension.ClientObject { + /** + * + * A string that specifies the format of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + readonly format: string; + /** + * + * A string that specifies the formatted value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + readonly formattedValue: string; + /** + * + * A string that specifies the label of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + readonly label: string; + /** + * + * A string that specifies the value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + readonly value: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.ShapeDataItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeDataItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.ShapeDataItemLoadOptions): Visio.ShapeDataItem; + load(option?: string | string[]): Visio.ShapeDataItem; + load(option?: { + select?: string; + expand?: string; + }): Visio.ShapeDataItem; + toJSON(): Visio.Interfaces.ShapeDataItemData; + } + /** + * + * Represents the Hyperlink Collection. + * + * [Api set: 1.1] + */ + class HyperlinkCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Visio.Hyperlink[]; + /** + * + * Gets the number of hyperlinks. + * + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a Hyperlink using its key (name or Id). + * + * [Api set: 1.1] + * + * @param Key Key is the name or index of the Hyperlink to be retrieved. + */ + getItem(Key: number | string): Visio.Hyperlink; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.HyperlinkCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.HyperlinkCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.HyperlinkCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; + load(option?: string | string[]): Visio.HyperlinkCollection; + load(option?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; + toJSON(): Visio.Interfaces.HyperlinkCollectionData; + } + /** + * + * Represents the Hyperlink. + * + * [Api set: 1.1] + */ + class Hyperlink extends OfficeExtension.ClientObject { + /** + * + * Gets the address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + readonly address: string; + /** + * + * Gets the description of a hyperlink. Read-only. + * + * [Api set: 1.1] + */ + readonly description: string; + /** + * + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * [Api set: 1.1] + */ + readonly extraInfo: string; + /** + * + * Gets the sub-address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + readonly subAddress: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Hyperlink` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Hyperlink` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Hyperlink` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.HyperlinkLoadOptions): Visio.Hyperlink; + load(option?: string | string[]): Visio.Hyperlink; + load(option?: { + select?: string; + expand?: string; + }): Visio.Hyperlink; + toJSON(): Visio.Interfaces.HyperlinkData; + } + /** + * + * Represents the CommentCollection for a given Shape. + * + * [Api set: 1.1] + */ + class CommentCollection extends OfficeExtension.ClientObject { + /** Gets the loaded child items in this collection. */ + readonly items: Visio.Comment[]; + /** + * + * Gets the number of Comments. + * + * [Api set: 1.1] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets the Comment using its name. + * + * [Api set: 1.1] + * + * @param key Key is the name of the Comment to be retrieved. + */ + getItem(key: string): Visio.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.CommentCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.CommentCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.CommentCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; + load(option?: string | string[]): Visio.CommentCollection; + load(option?: OfficeExtension.LoadOption): Visio.CommentCollection; + toJSON(): Visio.Interfaces.CommentCollectionData; + } + /** + * + * Represents the Comment. + * + * [Api set: 1.1] + */ + class Comment extends OfficeExtension.ClientObject { + /** + * + * A string that specifies the name of the author of the comment. + * + * [Api set: 1.1] + */ + author: string; + /** + * + * A string that specifies the date when the comment was created. + * + * [Api set: 1.1] + */ + date: string; + /** + * + * A string that contains the comment text. + * + * [Api set: 1.1] + */ + text: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Visio.Comment): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Visio.Comment): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Comment` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Comment` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Comment` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Visio.Interfaces.CommentLoadOptions): Visio.Comment; + load(option?: string | string[]): Visio.Comment; + load(option?: { + select?: string; + expand?: string; + }): Visio.Comment; + toJSON(): Visio.Interfaces.CommentData; + } + /** + * + * Represents the Selection in the page. + * + * [Api set: 1.1] + */ + class Selection extends OfficeExtension.ClientObject { + /** + * + * Gets the Shapes of the Selection. Read-only. + * + * [Api set: 1.1] + */ + readonly shapes: Visio.ShapeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Visio.Selection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Visio.Selection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Selection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: string | string[]): Visio.Selection; + load(option?: { + select?: string; + expand?: string; + }): Visio.Selection; + toJSON(): Visio.Interfaces.SelectionData; + } + /** + * + * Represents the Horizontal Alignment of the Overlay relative to the shape. + * + * [Api set: 1.1] + */ + enum OverlayHorizontalAlignment { + /** + * + * left + * + */ + left = "Left", + /** + * + * center + * + */ + center = "Center", + /** + * + * right + * + */ + right = "Right", + } + /** + * + * Represents the Vertical Alignment of the Overlay relative to the shape. + * + * [Api set: 1.1] + */ + enum OverlayVerticalAlignment { + /** + * + * top + * + */ + top = "Top", + /** + * + * middle + * + */ + middle = "Middle", + /** + * + * bottom + * + */ + bottom = "Bottom", + } + /** + * + * Represents the type of the overlay. + * + * [Api set: 1.1] + */ + enum OverlayType { + /** + * + * text + * + */ + text = "Text", + /** + * + * image + * + */ + image = "Image", + } + /** + * + * Toolbar IDs of the app + * + * [Api set: 1.1] + */ + enum ToolBarType { + /** + * + * CommandBar + * + */ + commandBar = "CommandBar", + /** + * + * PageNavigationBar + * + */ + pageNavigationBar = "PageNavigationBar", + /** + * + * StatusBar + * + */ + statusBar = "StatusBar", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notImplemented = "NotImplemented", + unsupportedOperation = "UnsupportedOperation", + } + module Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the Application object, for use in "application.set({ ... })". */ + interface ApplicationUpdateData { + /** + * + * Show or hide the iFrame application borders. + * + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * + * Show or hide the standard toolbars. + * + * [Api set: 1.1] + */ + showToolbars?: boolean; + } + /** An interface for updating data on the Document object, for use in "document.set({ ... })". */ + interface DocumentUpdateData { + /** + * + * Represents a Visio application instance that contains this document. + * + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationUpdateData; + /** + * + * Returns the DocumentView object. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewUpdateData; + } + /** An interface for updating data on the DocumentView object, for use in "documentView.set({ ... })". */ + interface DocumentViewUpdateData { + /** + * + * Disable Hyperlinks. + * + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * + * Disable Pan. + * + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * + * Disable Zoom. + * + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * + * Hide Diagram Boundary. + * + * [Api set: 1.1] + */ + hideDiagramBoundary?: boolean; + } + /** An interface for updating data on the Page object, for use in "page.set({ ... })". */ + interface PageUpdateData { + /** + * + * Returns the view of the page. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewUpdateData; + } + /** An interface for updating data on the PageView object, for use in "pageView.set({ ... })". */ + interface PageViewUpdateData { + /** + * + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * [Api set: 1.1] + */ + zoom?: number; + } + /** An interface for updating data on the PageCollection object, for use in "pageCollection.set({ ... })". */ + interface PageCollectionUpdateData { + items?: Visio.Interfaces.PageData[]; + } + /** An interface for updating data on the ShapeCollection object, for use in "shapeCollection.set({ ... })". */ + interface ShapeCollectionUpdateData { + items?: Visio.Interfaces.ShapeData[]; + } + /** An interface for updating data on the Shape object, for use in "shape.set({ ... })". */ + interface ShapeUpdateData { + /** + * + * Returns the view of the shape. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewUpdateData; + /** + * + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * [Api set: 1.1] + */ + select?: boolean; + } + /** An interface for updating data on the ShapeView object, for use in "shapeView.set({ ... })". */ + interface ShapeViewUpdateData { + /** + * + * Represents the highlight around the shape. + * + * [Api set: 1.1] + */ + highlight?: Visio.Highlight; + } + /** An interface for updating data on the ShapeDataItemCollection object, for use in "shapeDataItemCollection.set({ ... })". */ + interface ShapeDataItemCollectionUpdateData { + items?: Visio.Interfaces.ShapeDataItemData[]; + } + /** An interface for updating data on the HyperlinkCollection object, for use in "hyperlinkCollection.set({ ... })". */ + interface HyperlinkCollectionUpdateData { + items?: Visio.Interfaces.HyperlinkData[]; + } + /** An interface for updating data on the CommentCollection object, for use in "commentCollection.set({ ... })". */ + interface CommentCollectionUpdateData { + items?: Visio.Interfaces.CommentData[]; + } + /** An interface for updating data on the Comment object, for use in "comment.set({ ... })". */ + interface CommentUpdateData { + /** + * + * A string that specifies the name of the author of the comment. + * + * [Api set: 1.1] + */ + author?: string; + /** + * + * A string that specifies the date when the comment was created. + * + * [Api set: 1.1] + */ + date?: string; + /** + * + * A string that contains the comment text. + * + * [Api set: 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "application.toJSON()". */ + interface ApplicationData { + /** + * + * Show or hide the iFrame application borders. + * + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * + * Show or hide the standard toolbars. + * + * [Api set: 1.1] + */ + showToolbars?: boolean; + } + /** An interface describing the data returned by calling "document.toJSON()". */ + interface DocumentData { + /** + * + * Represents a Visio application instance that contains this document. Read-only. + * + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationData; + /** + * + * Represents a collection of pages associated with the document. Read-only. + * + * [Api set: 1.1] + */ + pages?: Visio.Interfaces.PageData[]; + /** + * + * Returns the DocumentView object. Read-only. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewData; + } + /** An interface describing the data returned by calling "documentView.toJSON()". */ + interface DocumentViewData { + /** + * + * Disable Hyperlinks. + * + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * + * Disable Pan. + * + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * + * Disable Zoom. + * + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * + * Hide Diagram Boundary. + * + * [Api set: 1.1] + */ + hideDiagramBoundary?: boolean; + } + /** An interface describing the data returned by calling "page.toJSON()". */ + interface PageData { + /** + * + * All shapes in the Page, including subshapes. Read-only. + * + * [Api set: 1.1] + */ + allShapes?: Visio.Interfaces.ShapeData[]; + /** + * + * Returns the Comments Collection. Read-only. + * + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * + * All top-level shapes in the Page.Read-only. + * + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + /** + * + * Returns the view of the page. Read-only. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewData; + /** + * + * Returns the height of the page. Read-only. + * + * [Api set: 1.1] + */ + height?: number; + /** + * + * Index of the Page. Read-only. + * + * [Api set: 1.1] + */ + index?: number; + /** + * + * Whether the page is a background page or not. Read-only. + * + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * + * Page name. Read-only. + * + * [Api set: 1.1] + */ + name?: string; + /** + * + * Returns the width of the page. Read-only. + * + * [Api set: 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "pageView.toJSON()". */ + interface PageViewData { + /** + * + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * [Api set: 1.1] + */ + zoom?: number; + } + /** An interface describing the data returned by calling "pageCollection.toJSON()". */ + interface PageCollectionData { + items?: Visio.Interfaces.PageData[]; + } + /** An interface describing the data returned by calling "shapeCollection.toJSON()". */ + interface ShapeCollectionData { + items?: Visio.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling "shape.toJSON()". */ + interface ShapeData { + /** + * + * Returns the Comments Collection. Read-only. + * + * [Api set: 1.1] + */ + comments?: Visio.Interfaces.CommentData[]; + /** + * + * Returns the Hyperlinks collection for a Shape object. Read-only. + * + * [Api set: 1.1] + */ + hyperlinks?: Visio.Interfaces.HyperlinkData[]; + /** + * + * Returns the Shape's Data Section. Read-only. + * + * [Api set: 1.1] + */ + shapeDataItems?: Visio.Interfaces.ShapeDataItemData[]; + /** + * + * Gets SubShape Collection. Read-only. + * + * [Api set: 1.1] + */ + subShapes?: Visio.Interfaces.ShapeData[]; + /** + * + * Returns the view of the shape. Read-only. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewData; + /** + * + * Shape's identifier. Read-only. + * + * [Api set: 1.1] + */ + id?: number; + /** + * + * Shape's name. Read-only. + * + * [Api set: 1.1] + */ + name?: string; + /** + * + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * [Api set: 1.1] + */ + select?: boolean; + /** + * + * Shape's text. Read-only. + * + * [Api set: 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "shapeView.toJSON()". */ + interface ShapeViewData { + /** + * + * Represents the highlight around the shape. + * + * [Api set: 1.1] + */ + highlight?: Visio.Highlight; + } + /** An interface describing the data returned by calling "shapeDataItemCollection.toJSON()". */ + interface ShapeDataItemCollectionData { + items?: Visio.Interfaces.ShapeDataItemData[]; + } + /** An interface describing the data returned by calling "shapeDataItem.toJSON()". */ + interface ShapeDataItemData { + /** + * + * A string that specifies the format of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + format?: string; + /** + * + * A string that specifies the formatted value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + formattedValue?: string; + /** + * + * A string that specifies the label of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + label?: string; + /** + * + * A string that specifies the value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + value?: string; + } + /** An interface describing the data returned by calling "hyperlinkCollection.toJSON()". */ + interface HyperlinkCollectionData { + items?: Visio.Interfaces.HyperlinkData[]; + } + /** An interface describing the data returned by calling "hyperlink.toJSON()". */ + interface HyperlinkData { + /** + * + * Gets the address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + address?: string; + /** + * + * Gets the description of a hyperlink. Read-only. + * + * [Api set: 1.1] + */ + description?: string; + /** + * + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * [Api set: 1.1] + */ + extraInfo?: string; + /** + * + * Gets the sub-address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + subAddress?: string; + } + /** An interface describing the data returned by calling "commentCollection.toJSON()". */ + interface CommentCollectionData { + items?: Visio.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling "comment.toJSON()". */ + interface CommentData { + /** + * + * A string that specifies the name of the author of the comment. + * + * [Api set: 1.1] + */ + author?: string; + /** + * + * A string that specifies the date when the comment was created. + * + * [Api set: 1.1] + */ + date?: string; + /** + * + * A string that contains the comment text. + * + * [Api set: 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "selection.toJSON()". */ + interface SelectionData { + /** + * + * Gets the Shapes of the Selection. Read-only. + * + * [Api set: 1.1] + */ + shapes?: Visio.Interfaces.ShapeData[]; + } + /** + * + * Represents the Application. + * + * [Api set: 1.1] + */ + interface ApplicationLoadOptions { + $all?: boolean; + /** + * + * Show or hide the iFrame application borders. + * + * [Api set: 1.1] + */ + showBorders?: boolean; + /** + * + * Show or hide the standard toolbars. + * + * [Api set: 1.1] + */ + showToolbars?: boolean; + } + /** + * + * Represents the Document class. + * + * [Api set: 1.1] + */ + interface DocumentLoadOptions { + $all?: boolean; + /** + * + * Represents a Visio application instance that contains this document. + * + * [Api set: 1.1] + */ + application?: Visio.Interfaces.ApplicationLoadOptions; + /** + * + * Returns the DocumentView object. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.DocumentViewLoadOptions; + } + /** + * + * Represents the DocumentView class. + * + * [Api set: 1.1] + */ + interface DocumentViewLoadOptions { + $all?: boolean; + /** + * + * Disable Hyperlinks. + * + * [Api set: 1.1] + */ + disableHyperlinks?: boolean; + /** + * + * Disable Pan. + * + * [Api set: 1.1] + */ + disablePan?: boolean; + /** + * + * Disable Zoom. + * + * [Api set: 1.1] + */ + disableZoom?: boolean; + /** + * + * Hide Diagram Boundary. + * + * [Api set: 1.1] + */ + hideDiagramBoundary?: boolean; + } + /** + * + * Represents the Page class. + * + * [Api set: 1.1] + */ + interface PageLoadOptions { + $all?: boolean; + /** + * + * Returns the view of the page. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * + * Returns the height of the page. Read-only. + * + * [Api set: 1.1] + */ + height?: boolean; + /** + * + * Index of the Page. Read-only. + * + * [Api set: 1.1] + */ + index?: boolean; + /** + * + * Whether the page is a background page or not. Read-only. + * + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * + * Page name. Read-only. + * + * [Api set: 1.1] + */ + name?: boolean; + /** + * + * Returns the width of the page. Read-only. + * + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * + * Represents the PageView class. + * + * [Api set: 1.1] + */ + interface PageViewLoadOptions { + $all?: boolean; + /** + * + * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. + * + * [Api set: 1.1] + */ + zoom?: boolean; + } + /** + * + * Represents a collection of Page objects that are part of the document. + * + * [Api set: 1.1] + */ + interface PageCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the view of the page. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.PageViewLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the height of the page. Read-only. + * + * [Api set: 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Index of the Page. Read-only. + * + * [Api set: 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Whether the page is a background page or not. Read-only. + * + * [Api set: 1.1] + */ + isBackground?: boolean; + /** + * + * For EACH ITEM in the collection: Page name. Read-only. + * + * [Api set: 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the width of the page. Read-only. + * + * [Api set: 1.1] + */ + width?: boolean; + } + /** + * + * Represents the Shape Collection. + * + * [Api set: 1.1] + */ + interface ShapeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the view of the shape. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * + * For EACH ITEM in the collection: Shape's identifier. Read-only. + * + * [Api set: 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Shape's name. Read-only. + * + * [Api set: 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * [Api set: 1.1] + */ + select?: boolean; + /** + * + * For EACH ITEM in the collection: Shape's text. Read-only. + * + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * + * Represents the Shape class. + * + * [Api set: 1.1] + */ + interface ShapeLoadOptions { + $all?: boolean; + /** + * + * Returns the view of the shape. + * + * [Api set: 1.1] + */ + view?: Visio.Interfaces.ShapeViewLoadOptions; + /** + * + * Shape's identifier. Read-only. + * + * [Api set: 1.1] + */ + id?: boolean; + /** + * + * Shape's name. Read-only. + * + * [Api set: 1.1] + */ + name?: boolean; + /** + * + * Returns true, if shape is selected. User can set true to select the shape explicitly. + * + * [Api set: 1.1] + */ + select?: boolean; + /** + * + * Shape's text. Read-only. + * + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * + * Represents the ShapeView class. + * + * [Api set: 1.1] + */ + interface ShapeViewLoadOptions { + $all?: boolean; + /** + * + * Represents the highlight around the shape. + * + * [Api set: 1.1] + */ + highlight?: boolean; + } + /** + * + * Represents the ShapeDataItemCollection for a given Shape. + * + * [Api set: 1.1] + */ + interface ShapeDataItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the format of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + format?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the formatted value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + formattedValue?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the label of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + label?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * + * Represents the ShapeDataItem. + * + * [Api set: 1.1] + */ + interface ShapeDataItemLoadOptions { + $all?: boolean; + /** + * + * A string that specifies the format of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + format?: boolean; + /** + * + * A string that specifies the formatted value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + formattedValue?: boolean; + /** + * + * A string that specifies the label of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + label?: boolean; + /** + * + * A string that specifies the value of the shape data item. Read-only. + * + * [Api set: 1.1] + */ + value?: boolean; + } + /** + * + * Represents the Hyperlink Collection. + * + * [Api set: 1.1] + */ + interface HyperlinkCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + address?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the description of a hyperlink. Read-only. + * + * [Api set: 1.1] + */ + description?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the sub-address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * + * Represents the Hyperlink. + * + * [Api set: 1.1] + */ + interface HyperlinkLoadOptions { + $all?: boolean; + /** + * + * Gets the address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + address?: boolean; + /** + * + * Gets the description of a hyperlink. Read-only. + * + * [Api set: 1.1] + */ + description?: boolean; + /** + * + * Gets the extra URL request information used to resolve the hyperlink's URL. Read-only. + * + * [Api set: 1.1] + */ + extraInfo?: boolean; + /** + * + * Gets the sub-address of the Hyperlink object. Read-only. + * + * [Api set: 1.1] + */ + subAddress?: boolean; + } + /** + * + * Represents the CommentCollection for a given Shape. + * + * [Api set: 1.1] + */ + interface CommentCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the name of the author of the comment. + * + * [Api set: 1.1] + */ + author?: boolean; + /** + * + * For EACH ITEM in the collection: A string that specifies the date when the comment was created. + * + * [Api set: 1.1] + */ + date?: boolean; + /** + * + * For EACH ITEM in the collection: A string that contains the comment text. + * + * [Api set: 1.1] + */ + text?: boolean; + } + /** + * + * Represents the Comment. + * + * [Api set: 1.1] + */ + interface CommentLoadOptions { + $all?: boolean; + /** + * + * A string that specifies the name of the author of the comment. + * + * [Api set: 1.1] + */ + author?: boolean; + /** + * + * A string that specifies the date when the comment was created. + * + * [Api set: 1.1] + */ + date?: boolean; + /** + * + * A string that contains the comment text. + * + * [Api set: 1.1] + */ + text?: boolean; + } + } +} +declare namespace Visio { + /** + * The RequestContext object facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. + */ + class RequestContext extends OfficeExtension.ClientRequestContext { + constructor(url?: string | OfficeExtension.EmbeddedSession); + readonly document: Document; + } + /** + * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. + */ + function run(batch: (context: Visio.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Visio object model, using the request context of a previously-created API object. + * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + */ + function run(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Visio object model, using the request context of previously-created API objects. + * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()". + * @param batch - A function that takes in a Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + */ + function run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Visio object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param contextObject - A previously-created Visio.RequestContext. This context will get re-used by the batch function (instead of having a new context created). This means that the batch will be able to pick up changes made to existing API objects, if those objects were derived from this same context. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the RequestContext is required to get access to the Visio object model from the add-in. + * + * @remarks + * In addition to this signature, the method also has the following signatures: + * + * `run(batch: (context: Visio.RequestContext) => Promise): Promise;` + * + * `run(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise): Promise;` + * + * `run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise;` + */ + function run(contextObject: OfficeExtension.ClientRequestContext, batch: (context: Visio.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Visio APIs //////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +///////////////////// Begin PowerPoint APIs //////////////////// +//////////////////////////////////////////////////////////////// + +// Empty placeholder, for now + +//////////////////////////////////////////////////////////////// +////////////////////// End PowerPoint APIs ///////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/types/office-js-preview/office-js-preview-tests.ts b/types/office-js-preview/office-js-preview-tests.ts new file mode 100644 index 0000000000..ba2d267f0e --- /dev/null +++ b/types/office-js-preview/office-js-preview-tests.ts @@ -0,0 +1,320 @@ +/* +office-js-preview +Copyright (c) Microsoft Corporation +*/ + + + +function test_excel() { + + // Range + Excel.run(function (ctx) { + var range = ctx.workbook.getSelectedRange().load("values"); + return ctx.sync() + .then(function () { + var vals = range.values; + for (var i = 0; i < vals.length; i++) { + for (var j = 0; j < vals[i].length; j++) { + vals[i][j] = vals[i][j].toUpperCase(); + } + } + range.values = vals; + }) + .then(ctx.sync); + }).catch(function (error) { + console.log(error); + }); + + + // Chart + Excel.run(function (ctx) { + var sheet = ctx.workbook.worksheets.getItem("Sheet1"); + + var range = sheet.getRange("A1:B3"); + range.values = [ + ["", "Gender"], + ["Male", 12], + ["Female", 14] + ]; + + var chart = sheet.charts.add(Excel.ChartType._3DColumn, range, "Auto"); + + chart.format.fill.setSolidColor("F8F8FF"); + + chart.title.text = "Class Demographics"; + chart.title.format.font.bold = true; + chart.title.format.font.size = 18; + chart.title.format.font.color = "568568"; + + chart.legend.position = "Right"; + chart.legend.format.font.name = "Algerian"; + chart.legend.format.font.size = 13; + + chart.dataLabels.showPercentage = true; + chart.dataLabels.format.font.size = 15; + chart.dataLabels.format.font.color = "444444"; + + var points = chart.series.getItemAt(0).points; + points.getItemAt(0).format.fill.setSolidColor("8FBC8F"); + points.getItemAt(1).format.fill.setSolidColor("D87093"); + + return ctx.sync(); + }).catch(function (error) { + console.log(error); + }); + + + // Table + Excel.run(function (ctx) { + var rows = ctx.workbook.tables.getItem("Table1").rows.load("values"); + return ctx.sync() + .then(function () { + var largestRow = 0; + var largestValue = 0; + + for (var i = 0; i < rows.items.length; i++) { + if (rows.items[i].values[0][1] > largestValue) { + largestRow = i; + largestValue = rows.items[i].values[0][1]; + } + } + + var largestRowRng = rows.getItemAt(largestRow).getRange(); + largestRowRng.format.fill.color = "#ff0000"; + + }) + .then(ctx.sync); + }).catch(function (error) { + console.log(error); + }); + + + // Object.set + Excel.run(ctx => { + const range = ctx.workbook.getSelectedRange(); + range.set({ + values: [[1]], + format: { + font: { + bold: true + }, + fill: { + color: "red" + } + } + }); + + return ctx.sync(); + }).catch(console.log); +} + +function test_word() { + + // Search + Word.run(function (context) { + + // Create a proxy object for the document body. + var body = context.document.body; + + // Setup the search options. + var options = Word.SearchOptions.newObject(context); + options.matchCase = false + + // Queue a commmand to search the document. + var searchResults = context.document.body.search('video', options); + + // Queue a commmand to load the results. + context.load(searchResults, 'text, font'); + + // Synchronize the document state by executing the queued-up commands, + // and return a promise to indicate task completion. + return context.sync().then(function () { + var results = 'Found count: ' + searchResults.items.length + + '; we highlighted the results.'; + + // Queue a command to change the font for each found item. + for (var i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = '#FF0000' // Change color to Red + searchResults.items[i].font.highlightColor = '#FFFF00'; + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued-up commands, + // and return a promise to indicate task completion. + return context.sync().then(function () { + console.log(results); + }); + }); + }) + .catch(function (error) { + console.log('Error: ' + JSON.stringify(error)); + if (error instanceof OfficeExtension.Error) { + console.log('Debug info: ' + JSON.stringify(error.debugInfo)); + } + }); + + + // Content control + Word.run(function (context) { + + // Create a proxy range object for the current selection. + var range = context.document.getSelection(); + + // Queue a commmand to create the content control. + var myContentControl = range.insertContentControl(); + myContentControl.tag = 'Customer-Address'; + myContentControl.title = 'Enter Customer Address Here:'; + myContentControl.style = 'Heading 2'; + myContentControl.insertText('One Microsoft Way, Redmond, WA 98052', 'Replace'); + myContentControl.cannotEdit = true; + myContentControl.appearance = 'Tags'; + + // Queue a command to load the id property for the content control you created. + context.load(myContentControl, 'id'); + + // Synchronize the document state by executing the queued-up commands, + // and return a promise to indicate task completion. + return context.sync().then(function () { + console.log('Created content control with id: ' + myContentControl.id); + }); + }) + .catch(function (error) { + console.log('Error: ' + JSON.stringify(error)); + if (error instanceof OfficeExtension.Error) { + console.log('Debug info: ' + JSON.stringify(error.debugInfo)); + } + }); + + // Body.insertInlinePictureFromBase64 Word 1.1 + Word.run(function (context) { + + // Create a proxy body object. + var body = context.document.body; + + // Queue a command to insert the image into the document. + var image = body.insertInlinePictureFromBase64('', Word.InsertLocation.start); + + // Queue a command to select the image. + image.select(); + + // Synchronize the document state by executing the queued commands, + // and returning a promise to indicate task completion. + return context.sync() + }) + .catch(function (error) { + console.log('Error: ' + JSON.stringify(error)); + if (error instanceof OfficeExtension.Error) { + console.log('Debug info: ' + JSON.stringify(error.debugInfo)); + } + }); + + // Body.insertInlinePictureFromBase64 Word 1.2 + Word.run((context) => { + + // Create a proxy object for the range at the current selection. + var imageRange = context.document.getSelection(); + + // Load the selected range. + context.load(imageRange, 'text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + return context.sync() + .then(() => { + + // Queue a command to insert the image into the document. + var insertedImage = imageRange.insertInlinePictureFromBase64('', Word.InsertLocation.replace); + + // Queue a command to navigate the UI to the insert picture. + insertedImage.select(); + + // Queue an indefinite number of commands to insert paragraphs + // based on the number of callouts added to the image. + if (this._calloutNumber > 0) { + var lastParagraph = insertedImage.insertParagraph('Here are your callout descriptions:', Word.InsertLocation.after) as Word.Paragraph; + + for (var i = 0; i < this._calloutNumber; i++) { + lastParagraph = lastParagraph.insertParagraph((i + 1) + ') [enter callout description].', Word.InsertLocation.after); + } + } + }) + // Synchronize the document state by executing the queued commands. + .then(context.sync); + }) + .catch((error) => { + console.log('Error: ' + JSON.stringify(error)); + if (error instanceof OfficeExtension.Error) { + console.log('Debug info: ' + JSON.stringify(error.debugInfo)); + } + }); + +} + +async function test_visio() { + const url = "someurl"; + + try { + const session = new OfficeExtension.EmbeddedSession(url, { id: "embed-iframe", container: document.getElementById("iframeHost") }); + await session.init(); + await Visio.run(session, async context => { + const eventResult = context.document.onPageLoadComplete.add(async args => { + console.log(Date.now() + ": Page Load Complete Event: " + JSON.stringify(args)); + }); + await context.sync(); + console.log("Success"); + }); + } catch (error) { + if (error instanceof OfficeExtension.Error) { + console.log("Debug info: " + JSON.stringify(error.debugInfo)); + } + } +} + +function test_OfficePromise() { + let p1: Promise = Excel.run(async () => { return 10 }); + let p2: Promise = new OfficeExtension.Promise(resolve => setTimeout(resolve, 1000)); + let p3: Promise = new Office.Promise(resolve => setTimeout(resolve, 1000)); + let p4: OfficeExtension.IPromise = new OfficeExtension.Promise(resolve => setTimeout(resolve, 1000)); +} + +async function test_interfaces() { + await Excel.run(async context => { + let range = context.workbook.getSelectedRange(); + range.set({ + values: [["Hi"]], + format: { + fill: { + color: "red" + } + } + }); + + let rangeSettables: Excel.Interfaces.RangeUpdateData = { + values: [["Hi"]], + format: { + fill: { + color: "red" + } + } + }; + range.set(rangeSettables); + }); +} + +async function testResumeExistingObject () { + let range: Excel.Range; + await Excel.run(async context => { + range = context.workbook.getSelectedRange(); + await context.sync(); + }); + + await Excel.run(range, async context => { + range.clear(); + await context.sync(); + }); + + await Excel.run({delayForCellEdit: true, previousObjects: range}, async context => { + range.clear(); + await context.sync(); + }); +} diff --git a/types/office-js-preview/tsconfig.json b/types/office-js-preview/tsconfig.json new file mode 100644 index 0000000000..b41f1923e4 --- /dev/null +++ b/types/office-js-preview/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "office-js-preview-tests.ts" + ] +} \ No newline at end of file diff --git a/types/office-js-preview/tslint.json b/types/office-js-preview/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/office-js-preview/tslint.json @@ -0,0 +1,79 @@ +{ + "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 + } +} From 9d4263f892c6acd4c6b6f9c0267a7f6f807d90bc Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Thu, 1 Nov 2018 16:00:04 -0700 Subject: [PATCH 0027/2268] Updating to current d.ts --- types/office-js-preview/index.d.ts | 557 ++++++++++++++++++++++++----- 1 file changed, 469 insertions(+), 88 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 3899c02021..54d0e2711c 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -1,11 +1,11 @@ -// Type definitions for Office.js (Preview) -// Project: https://github.com/OfficeDev/office-js-preview -// Definitions by: OfficeDev , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham , Alex Jerabek , Elizabeth Samuel +// Type definitions for Office.js +// Project: https://github.com/OfficeDev/office-js +// Definitions by: OfficeDev , Lance Austin , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham , Alex Jerabek , Elizabeth Samuel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 /* -office-js-preview +office-js Copyright (c) Microsoft Corporation */ @@ -1070,9 +1070,9 @@ declare namespace Office { displayDialogAsync(startAddress: string, options?: DialogOptions, callback?: (result: AsyncResult) => void): void; /** * Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent. - * @param messageObject Accepts a message from the dialog to deliver to the add-in. + * @param message Accepts a message from the dialog to deliver to the add-in. In addition to a boolean, anything that can serialized to a string including JSON and XML can be sent. */ - messageParent(messageObject: any): void; + messageParent(message: boolean | string): void; /** * Closes the UI container where the JavaScript is executing. * @@ -1822,6 +1822,14 @@ declare namespace Office { * [Api set: Mailbox 1.7] */ AppointmentTimeChanged, + /** + * Triggers when an attachment is added to or removed from an item. + * + * [Api set: Mailbox Preview] + * + * @beta + */ + AttachmentsChanged, /** * Occurs when data within the binding is changed. * To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object. @@ -1918,6 +1926,8 @@ declare namespace Office { * Triggers when the OfficeTheme is changed in Outlook. * * [Api set: Mailbox Preview] + * + * @beta */ OfficeThemeChanged, /** @@ -7340,6 +7350,57 @@ declare namespace Office { declare namespace Office { namespace MailboxEnums { + /** + * Specifies the formatting that applies to an attachment's content. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentContentFormat { + /** + * The content of the attachment is returned as a base64-encoded string. + */ + Base64 = "base64", + + /** + * The content of the attachment is returned as a string representing a URL. + */ + Url = "url", + + /** + * The content of the attachment is returned as a string representing an .eml formatted file. + */ + Eml = "eml" + } + /** + * Specifies whether an attachment was added to or removed from an item. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
+ * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode} + * Compose or read
+ * + * @beta + */ + enum AttachmentStatus { + /** + * An attachment was added to the item. + */ + Added = "added", + + /** + * An attachment was removed from the item. + */ + Removed = "removed" + } /** * Specifies an attachment's type. * @@ -8494,6 +8555,31 @@ declare namespace Office { */ subject: string; } + /** + * Represents the content of an attachment on a message or appointment item. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + interface AttachmentContent { + /** + * The content of an attachment as a string. + */ + content: string; + /** + * The string format to use for an attachment's content. + * For file attachments, the formatting is a base64-encoded string. + * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * For cloud attachments, the formatting is a URL string. + */ + format: Office.MailboxEnums.AttachmentContentFormat; + } /** * Represents an attachment on an item from the server. Read mode only. * @@ -8562,7 +8648,7 @@ declare namespace Office { * * In addition to this signature, this method also has the following signature: * - * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` + * `getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void;` * * @param coercionType The format for the returned body. * @param options Optional. An object literal that contains one or more of the following properties: @@ -8570,7 +8656,7 @@ declare namespace Office { * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. * The body is provided in the requested format in the asyncResult.value property. */ - getAsync(coerciontype: Office.CoercionType, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getAsync(coerciontype: Office.CoercionType, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the current body in a specified format. * @@ -8591,7 +8677,7 @@ declare namespace Office { * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. * The body is provided in the requested format in the asyncResult.value property. */ - getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; + getAsync(coerciontype: Office.CoercionType, callback: (result: AsyncResult) => void): void; /** * Gets a value that indicates whether the content is in HTML or text format. @@ -8615,7 +8701,7 @@ declare namespace Office { * The prependAsync method inserts the specified string at the beginning of the item body. * After insertion, the cursor is returned to its original place, relative to the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8649,7 +8735,7 @@ declare namespace Office { * The prependAsync method inserts the specified string at the beginning of the item body. * After insertion, the cursor is returned to its original place, relative to the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8673,7 +8759,7 @@ declare namespace Office { * The prependAsync method inserts the specified string at the beginning of the item body. * After insertion, the cursor is returned to its original place, relative to the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8694,7 +8780,7 @@ declare namespace Office { * The prependAsync method inserts the specified string at the beginning of the item body. * After insertion, the cursor is returned to its original place, relative to the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8714,7 +8800,7 @@ declare namespace Office { * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.3] @@ -8749,7 +8835,7 @@ declare namespace Office { * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.3] @@ -8774,7 +8860,7 @@ declare namespace Office { * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.3] @@ -8798,7 +8884,7 @@ declare namespace Office { * The value returned from the getAsync method will not necessarily be exactly the same as the value that was passed in the setAsync method * previously. The client may modify the value passed to setAsync in order to make it render efficiently with its rendering engine. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.3] @@ -8821,7 +8907,7 @@ declare namespace Office { * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8856,7 +8942,7 @@ declare namespace Office { * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8881,7 +8967,7 @@ declare namespace Office { * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -8905,7 +8991,7 @@ declare namespace Office { * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. * - * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor () to "LPNoLP" + * When including links in HTML markup, you can disable online link preview by setting the id attribute on the anchor (\) to "LPNoLP" * (please see the Examples section for a sample). * * [Api set: Mailbox 1.1] @@ -9279,6 +9365,154 @@ declare namespace Office { getAsync(callback?: (result: AsyncResult) => void): void; } + /** + * The InternetHeaders object represents properties that are preserved after the item leaves Exchange and converted to a MIME message. + * These properties are stored as x-headers in the MIME message. + * + * InternetHeaders are stored as key/value pairs on a per-item basis. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @beta + */ + export interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * In addition to this signature, this method also has the following signature: + * + * `getAsync(names: string[], callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be returned. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method returns a dictionary containing those internet headers and their values. + * If the add-in requests an x-header that is not available, that x-header will not be returned in the results. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param names The names of the internet headers to be returned. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + getAsync(names: string[], callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * In addition to this signature, this method also has the following signature: + * + * `removeAsync(names: string[], callback: (result: AsyncResult) => void): void;` + * + * @param names The names of the internet headers to be removed. + * @param options Optional. An object literal that contains one or more of the following properties: + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param names The names of the internet headers to be removed. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. + * + * @beta + */ + removeAsync(names: string[], callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * In addition to this signature, this method also has the following signatures: + * + * `setAsync(headers: string, callback: (result: AsyncResult) => void): void;` + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta + */ + setAsync(headers: Object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The setAsync method creates a new header if the specified header does not already exist; otherwise, the existing value is replaced with + * the new value. + * + * [Api set: Mailbox Preview] + * + * @remarks + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * + * + * @param headers The names and corresponding values of the headers to be set. Should be a dictionary object with keys being the names of the + * internet headers and values being the values of the internet headers. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. + * Any errors encountered will be provided in the asyncResult.error property. + * + * @beta + */ + setAsync(headers: Object, callback?: (result: AsyncResult) => void): void; + } + /** * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. * This object provides a method to get the organizer value of an appointment in an Outlook add-in. @@ -9669,7 +9903,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -9696,7 +9931,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -9855,6 +10090,26 @@ declare namespace Office { *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadWriteItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer
*/ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -9963,8 +10218,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -9997,8 +10252,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10019,8 +10274,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10044,8 +10299,8 @@ declare namespace Office { * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. * In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -10067,7 +10322,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10081,7 +10336,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -10093,7 +10348,8 @@ declare namespace Office { /** * Removes an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10103,7 +10359,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Organizer * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -10147,13 +10403,13 @@ declare namespace Office { * * `saveAsync(options: Office.AsyncContextOptions): void;` * - * `saveAsync(callback: (result: AsyncResult) => void): void;` + * `saveAsync(callback: (result: AsyncResult) => void): void;` * * @param options Optional. An object literal that contains one or more of the following properties. * asyncContext: Developers can provide any object they wish to access in the callback method. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. */ - saveAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + saveAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously saves an item. * @@ -10254,7 +10510,7 @@ declare namespace Office { * * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. */ - saveAsync(callback: (result: AsyncResult) => void): void; + saveAsync(callback: (result: AsyncResult) => void): void; /** * Asynchronously inserts data into the body or subject of a message. * @@ -10378,7 +10634,7 @@ declare namespace Office { */ interface AppointmentRead extends Appointment, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -10682,7 +10938,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -10710,7 +10966,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11063,7 +11319,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11077,7 +11333,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -11090,7 +11346,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11100,7 +11356,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Appointment Attendee * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -11237,7 +11493,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11264,7 +11521,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11281,6 +11539,36 @@ declare namespace Office { * asyncResult, which is an Office.AsyncResult object. */ addHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void; + + /** + * Gets an attachment from a message or appointment and returns it as an `Office.AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should use + * the identifier to retrieve an attachment in the same session that the attachmentIds were retrieved with the `getAttachmentsAsync` or + * `item.attachments` call. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
ErrorsInvalidAttachmentId - The attachment identifier does not exist.
+ * + * @param attachmentId The identifier of the attachment you want to get. The maximum length of the string is 100 characters. + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * asyncResult, which is an Office.AsyncResult object. If the call fails, the asyncResult.error property will contain and error code + * with the reason for the failure. + * + * @beta + */ + getAttachmentContentAsync(attachmentId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is {@link https://docs.microsoft.com/outlook/actionable-messages/invoke-add-in-from-actionable-message | activated by an actionable message}. @@ -11384,7 +11672,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11398,7 +11686,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType: Office.EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -11412,7 +11700,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -11422,7 +11710,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -11732,6 +12020,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose */ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -11818,8 +12126,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11853,8 +12161,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11875,8 +12183,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -11899,8 +12207,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -12192,7 +12500,7 @@ declare namespace Office { */ interface ItemRead extends Item { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -12740,6 +13048,22 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ from: Office.From; + /** + * Sets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose
+ * + * @beta + */ + internetHeaders: Office.InternetHeaders; /** * Gets the type of item that an instance represents. * @@ -12978,7 +13302,8 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and `Office.EventType.RecurrenceChanged`. + * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13005,7 +13330,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13166,6 +13491,26 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose */ close(): void; + /** + * Gets the item's attachments as an array. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose
+ * + * @param options Optional. An object literal that contains one or more of the following properties. + * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. If the call fails, the asyncResult.error property will contain and error code with the reason for + * the failure. + * + * @beta + */ + getAttachmentsAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets initialization data passed when the add-in is activated by an actionable message. * @@ -13278,8 +13623,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13313,8 +13658,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13335,8 +13680,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13359,8 +13704,8 @@ declare namespace Office { * The removeAttachmentAsync method removes the attachment with the specified identifier from the item. * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment * in the same session. In Outlook Web App and OWA for Devices, the attachment identifier is valid only within the same session. - * A session is over when the user closes the app, or if the user starts composing in an inline form and subsequently pops out the inline form - * to continue in a separate window. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. * * [Api set: Mailbox 1.1] * @@ -13382,7 +13727,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13396,7 +13741,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -13409,7 +13754,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -13419,7 +13764,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Compose * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -13694,7 +14039,7 @@ declare namespace Office { */ interface MessageRead extends Message, ItemRead { /** - * Gets an array of attachments for the item. + * Gets the item's attachments as an array. * * [Api set: Mailbox 1.0] * @@ -13802,6 +14147,22 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read */ from: EmailAddressDetails; + /** + * Gets the internet headers of a message. + * + * The internetHeaders property returns an InternetHeaders object that provides methods to manage the internet headers on the message. + * + * [Api set: Mailbox Preview] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read
+ * + * @beta + */ + internetHeaders: Office.InternetHeaders; /** * Gets the Internet message identifier for an email message. * @@ -14014,7 +14375,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14042,7 +14403,7 @@ declare namespace Office { * Adds an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14399,7 +14760,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14413,7 +14774,7 @@ declare namespace Office { * * `removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;` * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param options Optional. An object literal that contains one or more of the following properties. @@ -14426,7 +14787,7 @@ declare namespace Office { * Removes an event handler for a supported event. * * Currently the supported event types are `Office.EventType.AppointmentTimeChanged`, `Office.EventType.RecipientsChanged`, and - * `Office.EventType.RecurrenceChanged`. + * `Office.EventType.RecurrenceChanged`. In Preview, `Office.EventType.AttachmentsChanged` is also supported. * * [Api set: Mailbox 1.7] * @@ -14436,7 +14797,7 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Message Read * - * @param eventType The event that should invoke the handler. + * @param eventType The event that should revoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. * The type property on the parameter will match the eventType parameter passed to removeHandlerAsync. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, @@ -14725,7 +15086,7 @@ declare namespace Office { */ restUrl: string; /** - * Information about the user associated with the mailbox. This includes their account type, display name, email adddress, and time zone. + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. * * More information is under {@link Office.UserProfile} */ @@ -14733,7 +15094,7 @@ declare namespace Office { /** * Adds an event handler for a supported event. * - * Currently, the supported event types are `Office.EventType.ItemChanged` and `Office.EventType.OfficeThemeChanged`. + * Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported. * * [Api set: Mailbox 1.5] * @@ -15139,6 +15500,27 @@ declare namespace Office { * @param userContext Optional. Any state data that is passed to the asynchronous method. */ makeEwsRequestAsync(data: any, callback: (result: AsyncResult) => void, userContext?: any): void; + /** + * Removes an event handler for a supported event. + * + * Currently, the only supported event type is `Office.EventType.ItemChanged`. In Preview, `Office.EventType.OfficeThemeChanged` is also supported. + * + * [Api set: Mailbox 1.5] + * + * @remarks + * + * + * + *
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}ReadItem
{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read
+ * + * @param eventType The event that should revoke the handler. + * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. + * The type property on the parameter will match the eventType parameter passed to addHandlerAsync. + * @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type Office.AsyncResult. + */ + removeHandlerAsync(eventType: Office.EventType, handler: (type: EventType) => void, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** @@ -16444,7 +16826,7 @@ declare namespace Office { */ owner: String; /** - * The remote REST url related to the owner’s mailbox. + * The remote REST URL related to the owner’s mailbox. */ restUrl: String; /** @@ -16768,7 +17150,7 @@ declare namespace Office { } /** - * Information about the user associated with the mailbox. This includes their account type, display name, email adddress, and time zone. + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. * * [Api set: Mailbox 1.0] * @@ -21397,12 +21779,11 @@ declare namespace Excel { inCellDropDown: boolean; /** * - * Source of the list for data validation - When setting the value, it can be passed in as a Excel Range object, or a string that contains comma separated number, boolean or date. + * The source of the list for data validation. The value is a string, which can either be a range reference (e.g. `"=Names!$A$1:$A$3"`) or a comma-separated list of the values themselves. * * [Api set: ExcelApi 1.8] */ - source: string | Range; + source: string; } /** * From 8f1dd1ee614142dc1f8a188896ce667b96c89655 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Thu, 1 Nov 2018 16:01:52 -0700 Subject: [PATCH 0028/2268] Undoing package.json edit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b55674f15b..09fe064d48 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint": "dtslint types" }, "devDependencies": { - "dtslint": "^0.3.0", + "dtslint": "github:Microsoft/dtslint#production", "types-publisher": "Microsoft/types-publisher#production" } } From b35e77ddefd1ea5a09b2e6748391b123ab476b55 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Tue, 6 Nov 2018 16:01:50 +0100 Subject: [PATCH 0029/2268] initial commit for tern addon typings. still WIP. workstream: --- types/codemirror/codemirror-tern.d.ts | 80 +++++++++++++++++++++++++++ types/codemirror/tsconfig.json | 1 + 2 files changed, 81 insertions(+) create mode 100644 types/codemirror/codemirror-tern.d.ts diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts new file mode 100644 index 0000000000..5b882a096a --- /dev/null +++ b/types/codemirror/codemirror-tern.d.ts @@ -0,0 +1,80 @@ +//MUCH TODO + + +import * as CodeMirror from "codemirror"; + +declare module "codemiror" { + + export const TernServer: TernConstructor; + + interface TernServer { + + addDoc: ( + name: string, + doc: CodeMirror.Doc + ) => { + doc: CodeMirror.Doc, + name: string, + changed: { from: number, to: number } | null + }; + + delDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + hideDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + complete: (cm: CodeMirror.Editor) => void; + + showType: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + showDocs: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + updateArgHints: (cm: CodeMirror.Editor) => void; + + jumpToDef: (cm: CodeMirror.Editor) => void; + + jumpBack: (cm: CodeMirror.Editor) => void; + + rename: (cm: CodeMirror.Editor) => void; + + selectName: (cm: CodeMirror.Editor) => void; + + request: (cm: CodeMirror.Editor, query: string | Query, callback: (error: any, data?: any) => void, pos?: CodeMirror.Position) => void; + + destroy: () => void; + } + + interface TernConstructor { + new(options?: TernOptions): TernServer; + } + + interface TernOptions { + plugins?: any; + defs?: any[]; + getFile?: (name: string, callback: (doc: any) => void) => void; + fileFilter?: (value: any, docName: string, doc: any) => any; + switchToDoc?: (name: string, doc: any) => any; + showError?: (editor: CodeMirror.Editor, message: any) => void; + completionTip?: any; + typeTip?: any; + responseFilter?: (doc, query, request, error, data) => any; + useWorker?: boolean; + workerScript?: any; + workerDeps?: string[]; + } + + interface Query { + type: string; + file: string; //either the file name or a number in the following representation #0 #1 #2 etc... + scope?: Scope; + lineCharPositions?: boolean; + lineNumber?: number; + groupByFiles?: any; + start?: CodeMirror.Position; + end?: CodeMirror.Position; + } + +} + +declare module "codemirror/addon/tern/tern" { + export = CodeMirror; +} diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index 79d2eae5c3..caf680e2c2 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -23,6 +23,7 @@ "codemirror-panel.d.ts", "codemirror-runmode.d.ts", "codemirror-showhint.d.ts", + "codemirror-tern.d.ts", "searchcursor.d.ts", "test/index.ts", "test/matchbrackets.ts", From cdb4f1157697e1868d18744db83c28d570272ee1 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Tue, 6 Nov 2018 16:01:50 +0100 Subject: [PATCH 0030/2268] initial commit for tern addon typings. still WIP. workstream: --- types/codemirror/codemirror-tern.d.ts | 112 ++++++++++++++++++++++++++ types/codemirror/tsconfig.json | 1 + 2 files changed, 113 insertions(+) create mode 100644 types/codemirror/codemirror-tern.d.ts diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts new file mode 100644 index 0000000000..087307e200 --- /dev/null +++ b/types/codemirror/codemirror-tern.d.ts @@ -0,0 +1,112 @@ +//MUCH TODO + + +import * as CodeMirror from "codemirror"; +import * as Tern from "tern"; + +declare module "codemiror" { + + interface Editor { + server: TernServer; + } + + interface TernServer { + + addDoc: ( + name: string, + doc: CodeMirror.Doc + ) => { + doc: CodeMirror.Doc, + name: string, + changed: { from: number, to: number } | null + }; + + delDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + hideDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + complete: (cm: CodeMirror.Editor) => void; + + showType: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + showDocs: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + updateArgHints: (cm: CodeMirror.Editor) => void; + + jumpToDef: (cm: CodeMirror.Editor) => void; + + jumpBack: (cm: CodeMirror.Editor) => void; + + rename: (cm: CodeMirror.Editor) => void; + + selectName: (cm: CodeMirror.Editor) => void; + + request: (cm: CodeMirror.Editor, query: string | Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], callback: (error: any, data?: any) => void, pos?: CodeMirror.Position) => void; + + destroy: () => void; + } + + interface TernConstructor { + new(options?: TernOptions): TernServer; + } + export const TernServer: TernConstructor; + + interface TernOptions { + /** An object mapping plugin names to configuration options. */ + plugins?: Tern.ConstructorOptions["plugins"]; + /** An array of JSON definition data structures. */ + defs?: Tern.ConstructorOptions["defs"]; + /** + * Can be used to access files in + * the project that haven't been loaded yet. Simply do callback(null) to + * indicate that a file is not available. + */ + getFile?: (name: string, callback: (doc: CodeMirror.Doc | null) => void) => void; + /** + * This function will be applied + * to documents before passing them on to Tern. + */ + fileFilter?: (value: any, docName: string, doc: CodeMirror.Doc) => any; + /** This function should, when providing a multi-file view, switch the view or focus to the named file. */ + switchToDoc?: (name: string, doc: CodeMirror.Doc) => any; + /** Can be used to override the way errors are displayed. */ + showError?: (editor: CodeMirror.Editor, message: any) => void; + /** + * Customize the content in tooltips for completions. + * Is passed a single argument—the completion's data as returned by + * Tern—and may return a string, DOM node, or null to indicate that + * no tip should be shown. By default the docstring is shown. + */ + completionTip?: (data: Tern.QueryRegistry["completions"]["result"]) => string | HTMLElement | null; + /** Like completionTip, but for the tooltips shown for type queries. */ + typeTip?: (data: Tern.QueryRegistry["type"]["result"]) => string | HTMLElement | null; + /** This function will be applied to the Tern responses before treating them */ + responseFilter?: ( + doc: CodeMirror.Doc, + query: Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], + request: any, + error: Error, + data: any + ) => any; + /** + * Set to true to enable web worker mode. You'll probably + * want to feature detect the actual value you use here, for example + * !!window.Worker. + */ + useWorker?: boolean; + /** The main script of the worker. Point this to wherever you are hosting worker.js from this directory. */ + workerScript?: any; + /** + * An array of paths pointing (relative to workerScript) + * to the Acorn and Tern libraries and any Tern plugins you want to + * load. Or, if you minified those into a single script and included + * them in the workerScript, simply leave this undefined. + */ + workerDeps?: string[]; + } + +} + +declare module "codemirror/addon/tern/tern" { + export = CodeMirror; +} diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index 79d2eae5c3..caf680e2c2 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -23,6 +23,7 @@ "codemirror-panel.d.ts", "codemirror-runmode.d.ts", "codemirror-showhint.d.ts", + "codemirror-tern.d.ts", "searchcursor.d.ts", "test/index.ts", "test/matchbrackets.ts", From 202f4ee2dd0603bc665629d5f6c1c37ae3868dd6 Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 16:49:37 -0600 Subject: [PATCH 0031/2268] detox: create tests folder, add test for importing Detox module --- types/detox/detox-tests.ts | 31 -------------- types/detox/tests/detox-globals-tests.ts | 40 ++++++++++++++++++ .../detox/tests/detox-import-modules-tests.ts | 42 +++++++++++++++++++ types/detox/tsconfig.json | 11 ++--- 4 files changed, 86 insertions(+), 38 deletions(-) delete mode 100644 types/detox/detox-tests.ts create mode 100644 types/detox/tests/detox-globals-tests.ts create mode 100644 types/detox/tests/detox-import-modules-tests.ts diff --git a/types/detox/detox-tests.ts b/types/detox/detox-tests.ts deleted file mode 100644 index 58fe5c1912..0000000000 --- a/types/detox/detox-tests.ts +++ /dev/null @@ -1,31 +0,0 @@ -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 element(by.id('element')).scroll(50, 'down'); - await element(by.id('scrollView')).scrollTo('bottom'); - await expect(element(by.id('element')).atIndex(0)).toNotExist(); - await element(by.id('scrollView')).swipe('down', 'fast'); - await element(by.type('UIPickerView')).setColumnToValue(1, "6"); - - await expect(element(by.id('element').withAncestor(by.id('parent_element')))).toNotExist(); - await expect(element(by.id('element').withDescendant(by.id('child_element')))).toNotExist(); - - await waitFor(element(by.id('element'))).toBeVisible().withTimeout(2000); - await device.pressBack(); - await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); - }); -}); diff --git a/types/detox/tests/detox-globals-tests.ts b/types/detox/tests/detox-globals-tests.ts new file mode 100644 index 0000000000..42415c548d --- /dev/null +++ b/types/detox/tests/detox-globals-tests.ts @@ -0,0 +1,40 @@ +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 element(by.id("element")).scroll(50, "down"); + await element(by.id("scrollView")).scrollTo("bottom"); + await expect(element(by.id("element")).atIndex(0)).toNotExist(); + await element(by.id("scrollView")).swipe("down", "fast"); + await element(by.type("UIPickerView")).setColumnToValue(1, "6"); + + await expect( + element(by.id("element").withAncestor(by.id("parent_element"))) + ).toNotExist(); + await expect( + element(by.id("element").withDescendant(by.id("child_element"))) + ).toNotExist(); + + await waitFor(element(by.id("element"))) + .toBeVisible() + .withTimeout(2000); + await device.pressBack(); + await waitFor(element(by.text("Text5"))) + .toBeVisible() + .whileElement(by.id("ScrollView630")) + .scroll(50, "down"); + }); +}); diff --git a/types/detox/tests/detox-import-modules-tests.ts b/types/detox/tests/detox-import-modules-tests.ts new file mode 100644 index 0000000000..318569c03d --- /dev/null +++ b/types/detox/tests/detox-import-modules-tests.ts @@ -0,0 +1,42 @@ +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; + +import { by, device, element, expect, waitFor } from "detox"; + +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 element(by.id("element")).scroll(50, "down"); + await element(by.id("scrollView")).scrollTo("bottom"); + await expect(element(by.id("element")).atIndex(0)).toNotExist(); + await element(by.id("scrollView")).swipe("down", "fast"); + await element(by.type("UIPickerView")).setColumnToValue(1, "6"); + + await expect( + element(by.id("element").withAncestor(by.id("parent_element"))) + ).toNotExist(); + await expect( + element(by.id("element").withDescendant(by.id("child_element"))) + ).toNotExist(); + + await waitFor(element(by.id("element"))) + .toBeVisible() + .withTimeout(2000); + await device.pressBack(); + await waitFor(element(by.text("Text5"))) + .toBeVisible() + .whileElement(by.id("ScrollView630")) + .scroll(50, "down"); + }); +}); diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 2d1a22fb79..3eb7524be2 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -1,24 +1,21 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": ["es6"], "target": "ES2015", "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "detox-tests.ts" + "tests/detox-globals-tests.ts", + "tests/detox-import-modules-tests.ts" ] } From 45a0c57ef040ed95fa5994b05a2a5c32778706fc Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 16:49:42 -0600 Subject: [PATCH 0032/2268] detox: follow global-modifying dts example --- types/detox/index.d.ts | 821 +++++++++++++++++++++-------------------- 1 file changed, 416 insertions(+), 405 deletions(-) diff --git a/types/detox/index.d.ts b/types/detox/index.d.ts index 7ef085e25d..f9baa99f6e 100644 --- a/types/detox/index.d.ts +++ b/types/detox/index.d.ts @@ -3,418 +3,429 @@ // Definitions by: Tareq El-Masri , Steve Chun // 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 global { + const detox: Detox.Detox; + const device: Detox.Device; + const element: Detox.Element; + const waitFor: Detox.WaitFor; + const expect: Detox.Expect>; + 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 press back button (Android Only) - */ - pressBack(): Promise; - /** - * Simulate shake (iOS Only) - */ - shake(): Promise; - } + 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 press back button (Android Only) + */ + pressBack(): Promise; + /** + * Simulate shake (iOS Only) + */ + shake(): Promise; + } - type DetoxAny = Element & Actions & WaitFor; + type DetoxAny = Element & Actions & WaitFor; - interface Element { - (by: Matchers): DetoxAny; + interface Element { + (by: Matchers): 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: Matchers): Matchers; + /** + * 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: Matchers): 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; - /** - * Find an element by a matcher with a parent matcher - * @param parentBy - * @example await element(by.id('Grandson883').withAncestor(by.id('Son883'))); - */ - withAncestor(parentBy: Matchers): Matchers; - /** - * Find an element by a matcher with a child matcher - * @param childBy - * @example await element(by.id('Son883').withDescendant(by.id('Grandson883'))); - */ - withDescendant(childBy: Matchers): Matchers; - /** - * Find an element by multiple matchers - * @param by - * @example await element(by.text('Product').and(by.id('product_name')); - */ - and(by: Matchers): 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 by - * @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); - */ - whileElement(by: Matchers): DetoxAny; - } - 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): Promise>; - /** - * Scroll to edge. - * @param edge - * @example await element(by.id('scrollView')).scrollTo('bottom'); - * await element(by.id('scrollView')).scrollTo('top'); - */ - scrollTo(edge: Direction): Promise>; - /** - * - * @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): Promise>; - /** - * (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): Promise>; - } + /** + * 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; + /** + * Find an element by a matcher with a parent matcher + * @param parentBy + * @example await element(by.id('Grandson883').withAncestor(by.id('Son883'))); + */ + withAncestor(parentBy: Matchers): Matchers; + /** + * Find an element by a matcher with a child matcher + * @param childBy + * @example await element(by.id('Son883').withDescendant(by.id('Grandson883'))); + */ + withDescendant(childBy: Matchers): Matchers; + /** + * Find an element by multiple matchers + * @param by + * @example await element(by.text('Product').and(by.id('product_name')); + */ + and(by: Matchers): 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 by + * @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); + */ + whileElement(by: Matchers): DetoxAny; + } + 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): Promise>; + /** + * Scroll to edge. + * @param edge + * @example await element(by.id('scrollView')).scrollTo('bottom'); + * await element(by.id('scrollView')).scrollTo('top'); + */ + scrollTo(edge: Direction): Promise>; + /** + * + * @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 + ): Promise>; + /** + * (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 + ): Promise>; + } - type Direction = "left" | "right" | "top" | "bottom" | "up" | "down"; - type Orientation = "portrait" | "landscape"; - type Speed = "fast" | "slow"; + 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 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; + 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; + } } } + +export { by, detox, device, element, expect, waitFor }; From 700298f03a177fd488245bd0d0a77212085cb0d3 Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 17:11:01 -0600 Subject: [PATCH 0033/2268] detox: add jest adapter definitions --- types/detox/runners/jest/adapters/index.d.ts | 9 +++++++ types/detox/tests/detox-jest-setup-tests.ts | 28 ++++++++++++++++++++ types/detox/tsconfig.json | 4 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 types/detox/runners/jest/adapters/index.d.ts create mode 100644 types/detox/tests/detox-jest-setup-tests.ts diff --git a/types/detox/runners/jest/adapters/index.d.ts b/types/detox/runners/jest/adapters/index.d.ts new file mode 100644 index 0000000000..ca195ae744 --- /dev/null +++ b/types/detox/runners/jest/adapters/index.d.ts @@ -0,0 +1,9 @@ +interface DetoxJestAdapter { + detox: Detox.Detox; + beforeEach: () => Promise; + afterAll: () => Promise; +} + +declare const adapter: DetoxJestAdapter; + +export default adapter; diff --git a/types/detox/tests/detox-jest-setup-tests.ts b/types/detox/tests/detox-jest-setup-tests.ts new file mode 100644 index 0000000000..002b5605bb --- /dev/null +++ b/types/detox/tests/detox-jest-setup-tests.ts @@ -0,0 +1,28 @@ +declare var beforeAll: (callback: () => void) => void; +declare var beforeEach: (callback: () => void) => void; +declare var afterAll: (callback: () => void) => void; + +import adapter from "detox/runners/jest/adapters"; + +// Normally the Detox configuration from the project's package.json like so: +// const config = require("./package.json").detox; +declare const config: any; + +beforeAll(async () => { + await detox.init(config); + + const initOptions: Detox.DetoxInitOptions = { + initGlobals: false, + launchApp: false, + }; + await detox.init(config, initOptions); +}); + +beforeEach(async () => { + await adapter.beforeEach(); +}); + +afterAll(async () => { + await adapter.afterAll(); + await detox.cleanup(); +}); diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 3eb7524be2..9440443222 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -15,7 +15,9 @@ }, "files": [ "index.d.ts", + "runners/jest/adapters/index.d.ts", "tests/detox-globals-tests.ts", - "tests/detox-import-modules-tests.ts" + "tests/detox-import-modules-tests.ts", + "tests/detox-jest-setup-tests.ts" ] } From f627c9caf605e2c6bd920b79d87b17fd34a21c0b Mon Sep 17 00:00:00 2001 From: Jeff Held Date: Thu, 8 Nov 2018 17:11:13 -0600 Subject: [PATCH 0034/2268] detox: add mocha adapter definitions --- types/detox/runners/mocha/adapters/index.d.ts | 9 ++++++ .../detox-global-tests.ts} | 0 .../{tests => test}/detox-jest-setup-tests.ts | 0 types/detox/test/detox-mocha-setup-tests.ts | 32 +++++++++++++++++++ .../detox-module-tests.ts} | 0 types/detox/tsconfig.json | 8 +++-- 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 types/detox/runners/mocha/adapters/index.d.ts rename types/detox/{tests/detox-globals-tests.ts => test/detox-global-tests.ts} (100%) rename types/detox/{tests => test}/detox-jest-setup-tests.ts (100%) create mode 100644 types/detox/test/detox-mocha-setup-tests.ts rename types/detox/{tests/detox-import-modules-tests.ts => test/detox-module-tests.ts} (100%) diff --git a/types/detox/runners/mocha/adapters/index.d.ts b/types/detox/runners/mocha/adapters/index.d.ts new file mode 100644 index 0000000000..8e13b3bc01 --- /dev/null +++ b/types/detox/runners/mocha/adapters/index.d.ts @@ -0,0 +1,9 @@ +interface DetoxMochaAdapter { + detox: Detox.Detox; + beforeEach: (context: any) => Promise; + afterEach: (context: any) => Promise; +} + +declare const adapter: DetoxMochaAdapter; + +export default adapter; diff --git a/types/detox/tests/detox-globals-tests.ts b/types/detox/test/detox-global-tests.ts similarity index 100% rename from types/detox/tests/detox-globals-tests.ts rename to types/detox/test/detox-global-tests.ts diff --git a/types/detox/tests/detox-jest-setup-tests.ts b/types/detox/test/detox-jest-setup-tests.ts similarity index 100% rename from types/detox/tests/detox-jest-setup-tests.ts rename to types/detox/test/detox-jest-setup-tests.ts diff --git a/types/detox/test/detox-mocha-setup-tests.ts b/types/detox/test/detox-mocha-setup-tests.ts new file mode 100644 index 0000000000..3f502d1391 --- /dev/null +++ b/types/detox/test/detox-mocha-setup-tests.ts @@ -0,0 +1,32 @@ +// tslint:disable:only-arrow-functions + +declare var before: (callback: () => void) => void; +declare var beforeEach: (callback: () => void) => void; +declare var after: (callback: () => void) => void; +declare var afterEach: (callback: () => void) => void; + +import adapter from "detox/runners/mocha/adapters"; + +// Normally the Detox configuration from the project's package.json like so: +// const config = require("./package.json").detox; +declare const config: any; + +// Normally, the beforeEach and afterEach function should take `this` as its argument, +// but `this` cannot be used since it doesn't have a type signature (and therefore always implicltly any) +declare const context: any; + +before(async function() { + await detox.init(config); +}); + +beforeEach(async function() { + await adapter.beforeEach(context); +}); + +afterEach(async function() { + await adapter.afterEach(context); +}); + +after(async function() { + await detox.cleanup(); +}); diff --git a/types/detox/tests/detox-import-modules-tests.ts b/types/detox/test/detox-module-tests.ts similarity index 100% rename from types/detox/tests/detox-import-modules-tests.ts rename to types/detox/test/detox-module-tests.ts diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json index 9440443222..7be4d3bb9e 100644 --- a/types/detox/tsconfig.json +++ b/types/detox/tsconfig.json @@ -16,8 +16,10 @@ "files": [ "index.d.ts", "runners/jest/adapters/index.d.ts", - "tests/detox-globals-tests.ts", - "tests/detox-import-modules-tests.ts", - "tests/detox-jest-setup-tests.ts" + "runners/mocha/adapters/index.d.ts", + "test/detox-global-tests.ts", + "test/detox-module-tests.ts", + "test/detox-jest-setup-tests.ts", + "test/detox-mocha-setup-tests.ts" ] } From 5fdbb434dbc3ade21ff9ed491640e9d0b0bd7cef Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Fri, 9 Nov 2018 08:57:35 -0800 Subject: [PATCH 0035/2268] Linter work --- types/office-js-preview/tslint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/office-js-preview/tslint.json b/types/office-js-preview/tslint.json index a41bf5d19a..86c4ba7acc 100644 --- a/types/office-js-preview/tslint.json +++ b/types/office-js-preview/tslint.json @@ -10,6 +10,7 @@ "dt-header": false, "eofline": false, "export-just-namespace": false, + "file-name-casing": false, "import-spacing": false, "interface-name": false, "interface-over-type-literal": false, From 67f14c9a73e33f25a4f5f284f71de9493500ca65 Mon Sep 17 00:00:00 2001 From: Sebastian Richter Date: Tue, 13 Nov 2018 10:46:14 +0100 Subject: [PATCH 0036/2268] Reference lib "dom" Currently lib "dom" is required for compilation. However, including "dom" in lib can cause some opaque bugs on a server. For example, the TS compiler won't complain when using `fetch` without something like `import fetch from "node-fetch"` or using `URL` without `import { URL } from "url"`. --- types/jsdom/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/jsdom/index.d.ts b/types/jsdom/index.d.ts index dec74af1ba..a48404da21 100644 --- a/types/jsdom/index.d.ts +++ b/types/jsdom/index.d.ts @@ -5,6 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 +/// /// import { EventEmitter } from 'events'; From f18851bea8e67645232633c8c88321add78a1822 Mon Sep 17 00:00:00 2001 From: Bryan Smith Date: Fri, 16 Nov 2018 10:35:29 -0800 Subject: [PATCH 0037/2268] Add onBeforeInput form events. --- types/react/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 332d3ac640..2a1c7baf7b 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -808,6 +808,8 @@ declare namespace React { // Form Events onChange?: FormEventHandler; onChangeCapture?: FormEventHandler; + onBeforeInput?: FormEventHandler; + onBeforeInputCapture?: FormEventHandler; onInput?: FormEventHandler; onInputCapture?: FormEventHandler; onReset?: FormEventHandler; From 7364d8937f28c0460ff0eefd3ee1a3e7bd6393e3 Mon Sep 17 00:00:00 2001 From: HokieGeek Date: Fri, 16 Nov 2018 15:30:20 -0500 Subject: [PATCH 0038/2268] @types/lunr: Updated Builder functions to add new optional arguments --- types/lunr/index.d.ts | 17 +++++++++++++---- types/lunr/lunr-tests.ts | 7 +++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/types/lunr/index.d.ts b/types/lunr/index.d.ts index da87ae95d8..415c7c1d8f 100644 --- a/types/lunr/index.d.ts +++ b/types/lunr/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for lunr.js 2.1 +// Type definitions for lunr.js 2.3 // Project: https://github.com/olivernn/lunr.js -// Definitions by: Sean Tan +// Definitions by: Sean Tan , Andrés Pérez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -127,9 +127,14 @@ declare namespace lunr { * All fields should be added before adding documents to the index. Adding fields after * a document has been indexed will have no effect on already indexed documents. * + * Fields can be boosted at build time. This allows terms within that field to have more + * importance when ranking search results. Use a field boost to specify that matches + * within one field are more important than other fields. + * * @param field - The name of a field to index in all documents. + * @param attributes - Optional attributes associated with this field. */ - field(field: string): void; + field(field: string, attributes?: object): void; /** * A parameter to tune the amount of field length normalisation that is applied when @@ -160,9 +165,13 @@ declare namespace lunr { * it should have all fields defined for indexing, though null or undefined values will not * cause errors. * + * Entire documents can be boosted at build time. Applying a boost to a document indicates that + * this document should rank higher in search results than other documents. + * * @param doc - The document to add to the index. + * @param attributes - Optional attributes associated with this document. */ - add(doc: object): void; + add(doc: object, attributes?: object): void; /** * Builds the index, creating an instance of lunr.Index. diff --git a/types/lunr/lunr-tests.ts b/types/lunr/lunr-tests.ts index ade45cae64..a14fd1947f 100644 --- a/types/lunr/lunr-tests.ts +++ b/types/lunr/lunr-tests.ts @@ -4,11 +4,18 @@ function basic_test() { const index = lunr(function() { this.field("title"); this.field("body"); + this.field("content", { + boost: 2, + extractor: (doc: object) => "oof" + }); this.ref("id"); this.add({ id: 1, title: "Foo", body: "Foo foo foo!" + }, + { + boost: 2 }); this.add({ id: 2, From a7e72529b207c1529dd2ad7707f154ac0e359b86 Mon Sep 17 00:00:00 2001 From: robbywashere Date: Fri, 16 Nov 2018 22:16:01 -0500 Subject: [PATCH 0039/2268] Update to types/recompose package withStateHandler to give stateUpdaters typed arguments rather than --- types/recompose/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index 6f61888954..edb8ef9415 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -151,7 +151,7 @@ declare module 'recompose' { [updaterName: string]: StateHandler; }; type StateUpdaters = { - [updaterName in keyof TUpdaters]: (state: TState, props: TOutter) => StateHandler; + [updaterName in keyof TUpdaters]: (state: TState, props: TOutter) => TUpdaters[updaterName]; }; export function withStateHandlers, TOutter = {}>( createProps: TState | mapper, From 3b81bfa085a47e5a95557455670218d77e7b93f0 Mon Sep 17 00:00:00 2001 From: Sebastian Richter Date: Sat, 17 Nov 2018 12:24:01 +0100 Subject: [PATCH 0040/2268] Add ts3.1 typesVersions --- types/jsdom/index.d.ts | 1 - types/jsdom/package.json | 8 + types/jsdom/ts3.1/index.d.ts | 320 +++++++++++++++++++++++++++++++ types/jsdom/ts3.1/jsdom-tests.ts | 184 ++++++++++++++++++ types/jsdom/ts3.1/tsconfig.json | 19 ++ types/jsdom/ts3.1/tslint.json | 8 + 6 files changed, 539 insertions(+), 1 deletion(-) create mode 100644 types/jsdom/ts3.1/index.d.ts create mode 100644 types/jsdom/ts3.1/jsdom-tests.ts create mode 100644 types/jsdom/ts3.1/tsconfig.json create mode 100644 types/jsdom/ts3.1/tslint.json diff --git a/types/jsdom/index.d.ts b/types/jsdom/index.d.ts index a48404da21..dec74af1ba 100644 --- a/types/jsdom/index.d.ts +++ b/types/jsdom/index.d.ts @@ -5,7 +5,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -/// /// import { EventEmitter } from 'events'; diff --git a/types/jsdom/package.json b/types/jsdom/package.json index ef0b8c56fc..51569954af 100644 --- a/types/jsdom/package.json +++ b/types/jsdom/package.json @@ -2,5 +2,13 @@ "private": true, "dependencies": { "parse5": "^4.0.0" + }, + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "*": [ + "ts3.1/*" + ] + } } } diff --git a/types/jsdom/ts3.1/index.d.ts b/types/jsdom/ts3.1/index.d.ts new file mode 100644 index 0000000000..e00b4a0d5f --- /dev/null +++ b/types/jsdom/ts3.1/index.d.ts @@ -0,0 +1,320 @@ +/// +/// + +import { EventEmitter } from "events"; +import { MarkupData } from "parse5"; +import * as tough from "tough-cookie"; +import { Script } from "vm"; + +export class JSDOM { + static fromURL(url: string, options?: FromUrlOptions): Promise; + + static fromFile(url: string, options?: FromFileOptions): Promise; + + static fragment(html: string): DocumentFragment; + + constructor( + html?: string | Buffer | BinaryData, + options?: ConstructorOptions + ); + + readonly window: DOMWindow; + readonly virtualConsole: VirtualConsole; + readonly cookieJar: CookieJar; + + /** + * The serialize() method will return the HTML serialization of the document, including the doctype. + */ + serialize(): string; + + /** + * The nodeLocation() method will find where a DOM node is within the source document, returning the parse5 location info for the node. + */ + nodeLocation(node: Node): MarkupData.ElementLocation | null; + + /** + * The built-in vm module of Node.js allows you to create Script instances, + * which can be compiled ahead of time and then run multiple times on a given "VM context". + * Behind the scenes, a jsdom Window is indeed a VM context. + * To get access to this ability, use the runVMScript() method. + */ + runVMScript(script: Script): void; + + reconfigure(settings: ReconfigureSettings): void; +} + +export interface Options { + /** + * referrer just affects the value read from document.referrer. + * It defaults to no referrer (which reflects as the empty string). + */ + referrer?: string; + /** + * userAgent affects the value read from navigator.userAgent, as well as the User-Agent header sent while fetching subresources. + * It defaults to `Mozilla/5.0 (${process.platform}) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/${jsdomVersion}`. + */ + userAgent?: string; + /** + * includeNodeLocations preserves the location info produced by the HTML parser, + * allowing you to retrieve it with the nodeLocation() method (described below). + * It defaults to false to give the best performance, + * and cannot be used with an XML content type since our XML parser does not support location info. + */ + includeNodeLocations?: boolean; + runScripts?: "dangerously" | "outside-only"; + resources?: "usable" | ResourceLoader; + virtualConsole?: VirtualConsole; + cookieJar?: CookieJar; + beforeParse?(window: DOMWindow): void; +} + +export type FromUrlOptions = Options; + +export type FromFileOptions = Options & { + /** + * url sets the value returned by window.location, document.URL, and document.documentURI, + * and affects things like resolution of relative URLs within the document + * and the same-origin restrictions and referrer used while fetching subresources. + * It will default to a file URL corresponding to the given filename, instead of to "about:blank". + */ + url?: string; + /** + * contentType affects the value read from document.contentType, and how the document is parsed: as HTML or as XML. + * Values that are not "text/html" or an XML mime type will throw. It will default to "application/xhtml+xml" if + * the given filename ends in .xhtml or .xml; otherwise it will continue to default to "text/html". + */ + contentType?: string; +}; + +export type ConstructorOptions = Options & { + /** + * url sets the value returned by window.location, document.URL, and document.documentURI, + * and affects things like resolution of relative URLs within the document + * and the same-origin restrictions and referrer used while fetching subresources. + * It defaults to "about:blank". + */ + url?: string; + /** + * contentType affects the value read from document.contentType, and how the document is parsed: as HTML or as XML. + * Values that are not "text/html" or an XML mime type will throw. It defaults to "text/html". + */ + contentType?: string; + /** + * jsdom does not have the capability to render visual content, and will act like a headless browser by default. + * It provides hints to web pages through APIs such as document.hidden that their content is not visible. + * + * When the pretendToBeVisual option is set to true, jsdom will pretend that it is rendering and displaying + * content. + */ + pretendToBeVisual?: boolean; + /** + * The maximum size in code units for the separate storage areas used by localStorage and sessionStorage. + * Attempts to store data larger than this limit will cause a DOMException to be thrown. By default, it is set + * to 5,000,000 code units per origin, as inspired by the HTML specification. + */ + storageQuota?: number; +}; + +export interface DOMWindow extends Window { + eval(script: string): void; + + /* node_modules/jsdom/living/index.js */ + DOMException: typeof DOMException; + Attr: typeof Attr; + Node: typeof Node; + Element: typeof Element; + DocumentFragment: typeof DocumentFragment; + Document: typeof Document; + HTMLDocument: typeof HTMLDocument; + XMLDocument: typeof XMLDocument; + CharacterData: typeof CharacterData; + Text: typeof Text; + CDATASection: typeof CDATASection; + ProcessingInstruction: typeof ProcessingInstruction; + Comment: typeof Comment; + DocumentType: typeof DocumentType; + DOMImplementation: typeof DOMImplementation; + NodeList: typeof NodeList; + HTMLCollection: typeof HTMLCollection; + HTMLOptionsCollection: typeof HTMLOptionsCollection; + DOMStringMap: typeof DOMStringMap; + DOMTokenList: typeof DOMTokenList; + Event: typeof Event; + CustomEvent: typeof CustomEvent; + MessageEvent: typeof MessageEvent; + ErrorEvent: typeof ErrorEvent; + HashChangeEvent: typeof HashChangeEvent; + FocusEvent: typeof FocusEvent; + PopStateEvent: typeof PopStateEvent; + UIEvent: typeof UIEvent; + MouseEvent: typeof MouseEvent; + KeyboardEvent: typeof KeyboardEvent; + TouchEvent: typeof TouchEvent; + ProgressEvent: typeof ProgressEvent; + CompositionEvent: typeof CompositionEvent; + WheelEvent: typeof WheelEvent; + EventTarget: typeof EventTarget; + Location: typeof Location; + History: typeof History; + Blob: typeof Blob; + File: typeof File; + FileList: typeof FileList; + DOMParser: typeof DOMParser; + FormData: typeof FormData; + XMLHttpRequestEventTarget: XMLHttpRequestEventTarget; + XMLHttpRequestUpload: typeof XMLHttpRequestUpload; + NodeIterator: typeof NodeIterator; + TreeWalker: typeof TreeWalker; + NamedNodeMap: typeof NamedNodeMap; + URL: typeof URL; + URLSearchParams: typeof URLSearchParams; + + /* node_modules/jsdom/living/register-elements.js */ + HTMLElement: typeof HTMLElement; + HTMLAnchorElement: typeof HTMLAnchorElement; + HTMLAppletElement: typeof HTMLAppletElement; + HTMLAreaElement: typeof HTMLAreaElement; + HTMLAudioElement: typeof HTMLAudioElement; + HTMLBaseElement: typeof HTMLBaseElement; + HTMLBodyElement: typeof HTMLBodyElement; + HTMLBRElement: typeof HTMLBRElement; + HTMLButtonElement: typeof HTMLButtonElement; + HTMLCanvasElement: typeof HTMLCanvasElement; + HTMLDataElement: typeof HTMLDataElement; + HTMLDataListElement: typeof HTMLDataListElement; + // HTMLDetailsElement: typeof HTMLDetailsElement; + // HTMLDialogElement: typeof HTMLDialogElement; + HTMLDirectoryElement: typeof HTMLDirectoryElement; + HTMLDivElement: typeof HTMLDivElement; + HTMLDListElement: typeof HTMLDListElement; + HTMLEmbedElement: typeof HTMLEmbedElement; + HTMLFieldSetElement: typeof HTMLFieldSetElement; + HTMLFontElement: typeof HTMLFontElement; + HTMLFormElement: typeof HTMLFormElement; + HTMLFrameElement: typeof HTMLFrameElement; + HTMLFrameSetElement: typeof HTMLFrameSetElement; + HTMLHeadingElement: typeof HTMLHeadingElement; + HTMLHeadElement: typeof HTMLHeadElement; + HTMLHRElement: typeof HTMLHRElement; + HTMLHtmlElement: typeof HTMLHtmlElement; + HTMLIFrameElement: typeof HTMLIFrameElement; + HTMLImageElement: typeof HTMLImageElement; + HTMLInputElement: typeof HTMLInputElement; + HTMLLabelElement: typeof HTMLLabelElement; + HTMLLegendElement: typeof HTMLLegendElement; + HTMLLIElement: typeof HTMLLIElement; + HTMLLinkElement: typeof HTMLLinkElement; + HTMLMapElement: typeof HTMLMapElement; + HTMLMarqueeElement: typeof HTMLMarqueeElement; + HTMLMediaElement: typeof HTMLMediaElement; + HTMLMenuElement: typeof HTMLMenuElement; + HTMLMetaElement: typeof HTMLMetaElement; + HTMLMeterElement: typeof HTMLMeterElement; + HTMLModElement: typeof HTMLModElement; + HTMLObjectElement: typeof HTMLObjectElement; + HTMLOListElement: typeof HTMLOListElement; + HTMLOptGroupElement: typeof HTMLOptGroupElement; + HTMLOptionElement: typeof HTMLOptionElement; + HTMLOutputElement: typeof HTMLOutputElement; + HTMLParagraphElement: typeof HTMLParagraphElement; + HTMLParamElement: typeof HTMLParamElement; + HTMLPictureElement: typeof HTMLPictureElement; + HTMLPreElement: typeof HTMLPreElement; + HTMLProgressElement: typeof HTMLProgressElement; + HTMLQuoteElement: typeof HTMLQuoteElement; + HTMLScriptElement: typeof HTMLScriptElement; + HTMLSelectElement: typeof HTMLSelectElement; + HTMLSourceElement: typeof HTMLSourceElement; + HTMLSpanElement: typeof HTMLSpanElement; + HTMLStyleElement: typeof HTMLStyleElement; + HTMLTableCaptionElement: typeof HTMLTableCaptionElement; + HTMLTableCellElement: typeof HTMLTableCellElement; + HTMLTableColElement: typeof HTMLTableColElement; + HTMLTableElement: typeof HTMLTableElement; + HTMLTimeElement: typeof HTMLTimeElement; + HTMLTitleElement: typeof HTMLTitleElement; + HTMLTableRowElement: typeof HTMLTableRowElement; + HTMLTableSectionElement: typeof HTMLTableSectionElement; + HTMLTemplateElement: typeof HTMLTemplateElement; + HTMLTextAreaElement: typeof HTMLTextAreaElement; + HTMLTrackElement: typeof HTMLTrackElement; + HTMLUListElement: typeof HTMLUListElement; + HTMLUnknownElement: typeof HTMLUnknownElement; + HTMLVideoElement: typeof HTMLVideoElement; + + /* node_modules/jsdom/level2/style.js */ + StyleSheet: typeof StyleSheet; + MediaList: typeof MediaList; + CSSStyleSheet: typeof CSSStyleSheet; + CSSRule: typeof CSSRule; + CSSStyleRule: typeof CSSStyleRule; + CSSMediaRule: typeof CSSMediaRule; + CSSImportRule: typeof CSSImportRule; + CSSStyleDeclaration: typeof CSSStyleDeclaration; + StyleSheetList: typeof StyleSheetList; + + /* node_modules/jsdom/level3/xpath.js */ + // XPathException: typeof XPathException; + XPathExpression: typeof XPathExpression; + XPathResult: typeof XPathResult; + XPathEvaluator: typeof XPathEvaluator; + + /* node_modules/jsdom/living/node-filter.js */ + NodeFilter: typeof NodeFilter; +} + +export type BinaryData = + | ArrayBuffer + | DataView + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array; + +export class VirtualConsole extends EventEmitter { + on(method: K, callback: Console[K]): this; + on(event: "jsdomError", callback: (e: Error) => void): this; + + sendTo(console: Console, options?: VirtualConsoleSendToOptions): this; +} + +export interface VirtualConsoleSendToOptions { + omitJSDOMErrors: boolean; +} + +export class CookieJar extends tough.CookieJar {} + +export const toughCookie: typeof tough; + +export interface ReconfigureSettings { + windowTop?: DOMWindow; + url?: string; +} + +export interface FetchOptions { + cookieJar?: CookieJar; + referrer?: string; + accept?: string; + element?: + | HTMLScriptElement + | HTMLLinkElement + | HTMLIFrameElement + | HTMLImageElement; +} + +export interface ResourceLoaderConstructorOptions { + strictSSL?: boolean; + proxy?: string; + userAgent?: string; +} + +export class ResourceLoader { + fetch(url: string, options: FetchOptions): Promise | null; + + constructor(obj?: ResourceLoaderConstructorOptions); +} diff --git a/types/jsdom/ts3.1/jsdom-tests.ts b/types/jsdom/ts3.1/jsdom-tests.ts new file mode 100644 index 0000000000..d20232e36f --- /dev/null +++ b/types/jsdom/ts3.1/jsdom-tests.ts @@ -0,0 +1,184 @@ +import { JSDOM, VirtualConsole, CookieJar, FromUrlOptions, FromFileOptions, DOMWindow, ResourceLoader, FetchOptions } from 'jsdom'; +import { CookieJar as ToughCookieJar, MemoryCookieStore } from 'tough-cookie'; +import { Script } from 'vm'; + +function test_basic_usage() { + const dom = new JSDOM(`

Hello world

`); + console.log(dom.window.document.querySelector('p')!.textContent); // "Hello world" + + const { window } = new JSDOM(`...`); + // or even + const { document } = (new JSDOM(`...`)).window; +} + +function test_executing_scripts1() { + const dom = new JSDOM(` + +`); + + // The script will not be executed, by default: + dom.window.document.body.children.length === 1; +} + +function test_executing_scripts2() { + const dom = new JSDOM(` + +`, { runScripts: 'dangerously' }); + + // The script will be executed and modify the DOM: + dom.window.document.body.children.length === 2; +} + +function test_executing_scripts3() { + const window = (new JSDOM(``, { runScripts: 'outside-only' })).window; + + window.eval(`document.body.innerHTML = "

Hello, world!

";`); + window.document.body.children.length === 1; +} + +function test_virtualConsole() { + const virtualConsole = new VirtualConsole(); + const dom = new JSDOM(``, { virtualConsole }); + + virtualConsole.on('error', () => { }); + virtualConsole.on('warn', () => { }); + virtualConsole.on('info', () => { }); + virtualConsole.on('dir', () => { }); + // ... etc. See https://console.spec.whatwg.org/#logging + + virtualConsole.sendTo(console); + + const c = console; + virtualConsole.sendTo(c, { omitJSDOMErrors: true }); +} + +function test_cookieJar() { + const store = {} as MemoryCookieStore; + const options = {} as ToughCookieJar.Options; + + const cookieJar = new CookieJar(store, options); + const dom = new JSDOM(``, { cookieJar }); +} + +function test_beforeParse() { + const dom = new JSDOM(`

Hello

`, { + beforeParse(window) { + window.document.childNodes.length === 0; + } + }); +} + +function test_storageQuota() { + new JSDOM('', { storageQuota: 1337 }); +} + +function test_pretendToBeVisual() { + new JSDOM('', { pretendToBeVisual: true }); +} + +function test_serialize() { + const dom = new JSDOM(`hello`); + + dom.serialize() === 'hello'; + + // Contrast with: + // tslint:disable-next-line no-unnecessary-type-assertion + dom.window.document.documentElement!.outerHTML === 'hello'; +} + +function test_nodeLocation() { + const dom = new JSDOM( + `

Hello + +

`, + { includeNodeLocations: true } + ); + + const document = dom.window.document; + const bodyEl = document.body; // implicitly created + const pEl = document.querySelector('p')!; + const textNode = pEl.firstChild!; + const imgEl = document.querySelector('img')!; + + console.log(dom.nodeLocation(bodyEl)); // null; it's not in the source + console.log(dom.nodeLocation(pEl)); // { startOffset: 0, endOffset: 39, startTag: ..., endTag: ... } + console.log(dom.nodeLocation(textNode)); // { startOffset: 3, endOffset: 13 } + console.log(dom.nodeLocation(imgEl)); // { startOffset: 13, endOffset: 32 } +} + +function test_runVMScript() { + const dom = new JSDOM(``, { runScripts: 'outside-only' }); + const s = new Script(` + if (!this.ran) { + this.ran = 0; + } + + ++this.ran; +`); + + dom.runVMScript(s); + dom.runVMScript(s); + dom.runVMScript(s); + + ( dom.window).ran === 3; +} + +function test_reconfigure() { + const myFakeTopForTesting = {} as DOMWindow; + + const dom = new JSDOM(); + + dom.window.top === dom.window; + dom.window.location.href === 'about:blank'; + + dom.reconfigure({ windowTop: myFakeTopForTesting, url: 'https://example.com/' }); + + dom.window.top === myFakeTopForTesting; + dom.window.location.href === 'https://example.com/'; +} + +function test_fromURL() { + const options = {} as FromUrlOptions; + + JSDOM.fromURL('https://example.com/', options).then(dom => { + console.log(dom.serialize()); + }); +} + +function test_fromFile() { + const options = {} as FromFileOptions; + + JSDOM.fromFile('stuff.html', options).then(dom => { + console.log(dom.serialize()); + }); +} + +function test_fragment() { + const frag = JSDOM.fragment(`

Hello

Hi!`); + + frag.childNodes.length === 2; + frag.querySelector('strong')!.textContent = 'Why hello there!'; + // etc. +} + +function test_fragment_serialization() { + const frag = JSDOM.fragment(`

Hello

`); + if (frag instanceof Element) { + if (frag.firstChild instanceof Element) { + console.log(frag.firstChild.outerHTML); // logs "

Hello

" + } + } +} + +function test_custom_resource_loader() { + class CustomResourceLoader extends ResourceLoader { + fetch(url: string, options: FetchOptions) { + if (options.element) { + console.log(`Element ${options.element.localName} is requesting the url ${url}`); + } + + return super.fetch(url, options); + } + } + new JSDOM('', { resources: new CustomResourceLoader() }); +} diff --git a/types/jsdom/ts3.1/tsconfig.json b/types/jsdom/ts3.1/tsconfig.json new file mode 100644 index 0000000000..d3e0cbd06f --- /dev/null +++ b/types/jsdom/ts3.1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": ["../../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "parse5": ["parse5/v4"] + } + }, + "files": ["index.d.ts", "jsdom-tests.ts"] +} diff --git a/types/jsdom/ts3.1/tslint.json b/types/jsdom/ts3.1/tslint.json new file mode 100644 index 0000000000..523ff9bf74 --- /dev/null +++ b/types/jsdom/ts3.1/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "no-empty-interface": false, + "no-object-literal-type-assertion": false + } +} From 04a7f91091d8dec8aa718d99f672b864b7977011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Sat, 17 Nov 2018 14:00:17 +0100 Subject: [PATCH 0041/2268] Upgrade to mem-fs-editor 5.1 and export more interfaces --- types/mem-fs-editor/index.d.ts | 62 ++++++++++------------ types/mem-fs-editor/mem-fs-editor-tests.ts | 10 ++-- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/types/mem-fs-editor/index.d.ts b/types/mem-fs-editor/index.d.ts index 60f5b51867..179fdadf66 100644 --- a/types/mem-fs-editor/index.d.ts +++ b/types/mem-fs-editor/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for mem-fs-editor 4.0 +// Type definitions for mem-fs-editor 5.1 // Project: https://github.com/SBoudrias/mem-fs-editor#readme // Definitions by: My Food Bag // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -9,43 +9,39 @@ import * as Buffer from 'buffer'; import { Transform } from 'stream'; import { Store } from 'mem-fs'; -import { Options as TemplateOptions } from 'ejs'; +import { Options as TemplateOptions, Data as TemplateData } from 'ejs'; import { IOptions as GlobOptions } from 'glob'; -export function create(store: Store): memFsEditor.Editor; +type ReplacerFunc = (key: string, value: any) => any; -export namespace memFsEditor { - type Contents = string|Buffer; +type Space = string|number; - type ReplacerFunc = (key: string, value: any) => any; +type Contents = string|Buffer; - type Space = string|number; +type Callback = (err: any) => any; - type ProcessFunc = (contents: Buffer) => Contents; +export type ProcessingFunc = (contents: Buffer, path: string) => Contents; - type Callback = (err: any) => any; - - interface CopyOptions { - process?: ProcessFunc; - globOptions?: GlobOptions; - } - - interface Editor { - read(filepath: string, options?: { raw: boolean, defaults: string }): string; - readJSON(filepath: string, defaults?: any): any; - write(filepath: string, contents: Contents): void; - writeJSON(filepath: string, contents: any, 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(callback: Callback): void; - commit(filters: ReadonlyArray, callback: Callback): void; - } - - const prototype: { - }; +export interface CopyOptions { + process?: ProcessingFunc; + globOptions?: GlobOptions; } + +export interface Editor { + read(filepath: string, options?: { raw?: boolean, defaults: string }): string; + readJSON(filepath: string, defaults?: any): any; + exists(filepath: string): boolean; + write(filepath: string, contents: Contents): string; + writeJSON(filepath: string, contents: any, replacer?: ReplacerFunc, space?: Space): string; + append(to: string, contents: Contents, options?: { trimEnd?: boolean, separator?: string }): string; + delete(paths: string|string[], options?: { globOptions?: GlobOptions }): void; + copy(from: string|string[], to: string, options?: CopyOptions, context?: TemplateData, templateOptions?: TemplateOptions): void; + copyTpl(from: string|string[], to: string, context?: TemplateData, templateOptions?: TemplateOptions, copyOptions?: CopyOptions): void; + move(from: string|string[], to: string, options?: { globOptions: GlobOptions }): void; + commit(callback: Callback): void; + commit(filters: ReadonlyArray, callback: Callback): void; +} + +export function create(store: Store): Editor; + +export {}; diff --git a/types/mem-fs-editor/mem-fs-editor-tests.ts b/types/mem-fs-editor/mem-fs-editor-tests.ts index ff3c52c5a0..e000fefb92 100644 --- a/types/mem-fs-editor/mem-fs-editor-tests.ts +++ b/types/mem-fs-editor/mem-fs-editor-tests.ts @@ -1,18 +1,19 @@ import { Transform } from 'stream'; -import memFs = require('mem-fs'); -import editor = require('mem-fs-editor'); +import * as memFs from 'mem-fs'; +import * as editor from 'mem-fs-editor'; const store = memFs.create(); const fs = editor.create(store); fs.write('template.js', 'var a = 1; console.log(\'<%= foo %>\', a);'); +fs.append('template.js', 'var b = 2;'); fs.copy('template.js', 'template.tpl', { - process: (contents) => contents, globOptions: { cwd: '.' - } + }, + process: (contents) => contents }); fs.copyTpl('template.tpl', 'output.js', { @@ -21,7 +22,6 @@ fs.copyTpl('template.tpl', 'output.js', { const obj = fs.readJSON('template.json'); fs.writeJSON('template.json', obj); -fs.extendJSON('template.json', {qwer: 'asdf'}); fs.writeJSON('template.json', 'qwer'); // should not be an error, because the parameter is passed to JSON.stringify and it accepts the string // fs.extendJSON('template.json', 'qwer'); // should be an error, because it does not make sense to extend a json with string From 55f32e23822c29c4fb3c46bba5357f8585a2a0f1 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 10:59:20 +1100 Subject: [PATCH 0042/2268] Remove zopfli options https://github.com/webpack-contrib/compression-webpack-plugin/pull/65 --- types/compression-webpack-plugin/index.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index a7b38383ef..b0416ca8b0 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -22,14 +22,6 @@ declare namespace CompressionPlugin { threshold?: number; minRatio?: number; - // zopfli options - verbose?: boolean; - verbose_more?: boolean; - numiterations?: number; - blocksplitting?: boolean; - blocksplittinglast?: boolean; - blocksplittingmax?: number; - // zlib options level?: number; flush?: number; From ceee1391c7e05e2c46eaef0deedfb8febe3ba432 Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 11:51:13 +1100 Subject: [PATCH 0043/2268] compression-webpack-plugin: Support custom algorithm Had to bump the TypeScript version to detect correct option type based on `algorithm` argument. --- .../compression-webpack-plugin-tests.ts | 53 ++++++++++++++++++- types/compression-webpack-plugin/index.d.ts | 37 ++++++++----- 2 files changed, 75 insertions(+), 15 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index 423ca4cea7..e162a6bcb2 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -1,7 +1,9 @@ import { Configuration } from 'webpack'; import CompressionPlugin = require('compression-webpack-plugin'); -const c: Configuration = { +new CompressionPlugin(); + +const config: Configuration = { plugins: [ new CompressionPlugin({ asset: "[path].gz[query]", @@ -13,3 +15,52 @@ const c: Configuration = { }) ] }; + +const configDefaultAlgo = new CompressionPlugin({ + compressionOptions: { level: 7 } +}); + +const zlib: Configuration = { + plugins: [ + new CompressionPlugin({ + algorithm: "deflate", + compressionOptions: { + flush: 5, + windowBits: 20, + level: 7 + } + }) + ] +}; + +const badZlib: Configuration = { + plugins: [ + // $ExpectError + new CompressionPlugin({ + algorithm: "deflate", + compressionOptions: 5 + }) + ] +}; + +function customAlgorithm(input: string, options: number, callback: (err: Error, result: Buffer) => void) { +} + +const custom: Configuration = { + plugins: [ + new CompressionPlugin({ + algorithm: customAlgorithm, + compressionOptions: 5 + }) + ] +}; + +const badCustom: Configuration = { + plugins: [ + // $ExpectError + new CompressionPlugin({ + algorithm: customAlgorithm, + compressionOptions: { flush: 5 } + }) + ] +}; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index b0416ca8b0..9c66248776 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -2,33 +2,42 @@ // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 import { Plugin } from 'webpack'; +import { ZlibOptions as ZlibCompressionOptions } from 'zlib'; export = CompressionPlugin; -declare class CompressionPlugin extends Plugin { - constructor(options?: CompressionPlugin.Options); +declare class CompressionPlugin extends Plugin { + constructor(options?: CompressionPlugin.Options); } declare namespace CompressionPlugin { - interface Options { + type AlgorithmCallback = (error: Error | null, result: Buffer) => void; + type Algorithm = (source: string, options: O, callback: AlgorithmCallback) => void; + + // NOTE: These are the compression algorithms exported by zlib. + type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; + + interface BaseOptions { asset?: string; - algorithm?: string; cache?: boolean | string; test?: RegExp | RegExp[]; regExp?: RegExp | RegExp[]; threshold?: number; minRatio?: number; - - // zlib options - level?: number; - flush?: number; - chunkSize?: number; - windowBits?: number; - memLevel?: number; - strategy?: number; - dictionary?: any; } + + interface ZlibOptions extends BaseOptions { + algorithm?: ZlibAlgorithm; + compressionOptions?: ZlibCompressionOptions; + } + + interface CustomOptions extends BaseOptions { + algorithm: Algorithm; + compressionOptions?: O; + } + + type Options = ZlibOptions | CustomOptions; } From 3fc7e124637a16d269db2640fe40e9c4ddbc024a Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 11:56:16 +1100 Subject: [PATCH 0044/2268] compression-webpack-plugin: asset -> filename --- .../compression-webpack-plugin-tests.ts | 5 ++++- types/compression-webpack-plugin/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index e162a6bcb2..44662c4177 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -6,7 +6,7 @@ new CompressionPlugin(); const config: Configuration = { plugins: [ new CompressionPlugin({ - asset: "[path].gz[query]", + filename: "[path].gz[query]", algorithm: "gzip", cache: true, test: /\.js$|\.html$/, @@ -20,6 +20,9 @@ const configDefaultAlgo = new CompressionPlugin({ compressionOptions: { level: 7 } }); +// $ExpectError +new CompressionPlugin({ asset: "[path].gz[query]" }); + const zlib: Configuration = { plugins: [ new CompressionPlugin({ diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 9c66248776..4a6ccd290e 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -21,7 +21,7 @@ declare namespace CompressionPlugin { type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; interface BaseOptions { - asset?: string; + filename?: string; cache?: boolean | string; test?: RegExp | RegExp[]; regExp?: RegExp | RegExp[]; From d74799987561f76db932b4bc40cfb814289101dc Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:08:39 +1100 Subject: [PATCH 0045/2268] compression-webpack-plugin: Update options - Add `include`/`exclude` - Remove `regExp` which was undocumented (possibly always wrong?) - Add `deleteOriginalAssets` - Prefer `ReadonlyArray` for string/regex options --- .../compression-webpack-plugin-tests.ts | 11 +++++++++-- types/compression-webpack-plugin/index.d.ts | 13 ++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts index 44662c4177..a679b7f599 100644 --- a/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts +++ b/types/compression-webpack-plugin/compression-webpack-plugin-tests.ts @@ -3,15 +3,22 @@ import CompressionPlugin = require('compression-webpack-plugin'); new CompressionPlugin(); +new CompressionPlugin({ + include: ["a"] as ReadonlyArray, + exclude: [/a/g] as ReadonlyArray, + test: "a", +}); + const config: Configuration = { plugins: [ new CompressionPlugin({ - filename: "[path].gz[query]", algorithm: "gzip", cache: true, + filename: "[path].gz[query]", + minRatio: 0.8, test: /\.js$|\.html$/, threshold: 10240, - minRatio: 0.8 + deleteOriginalAssets: true }) ] }; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 4a6ccd290e..8c399bbdd5 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -17,16 +17,19 @@ declare namespace CompressionPlugin { type AlgorithmCallback = (error: Error | null, result: Buffer) => void; type Algorithm = (source: string, options: O, callback: AlgorithmCallback) => void; - // NOTE: These are the compression algorithms exported by zlib. + // NOTE: These are the async compression algorithms on the zlib object. type ZlibAlgorithm = 'deflate' | 'deflateRaw' | 'gzip'; + type Pattern = string | RegExp | ReadonlyArray | ReadonlyArray; interface BaseOptions { - filename?: string; cache?: boolean | string; - test?: RegExp | RegExp[]; - regExp?: RegExp | RegExp[]; - threshold?: number; + deleteOriginalAssets?: boolean; + exclude?: Pattern; + filename?: string; + include?: Pattern; minRatio?: number; + test?: Pattern; + threshold?: number; } interface ZlibOptions extends BaseOptions { From 2087e1b9f13248e441fc923ab638a23bec69255c Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:09:14 +1100 Subject: [PATCH 0046/2268] compression-webpack-plugin: Add myself --- types/compression-webpack-plugin/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 8c399bbdd5..b03b655c69 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for compression-webpack-plugin 0.4 // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo +// Rhys van der Waerden // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 From f69b9883f0ab04fdb4c2d057f8a3b16ec288782e Mon Sep 17 00:00:00 2001 From: Rhys van der Waerden Date: Mon, 19 Nov 2018 12:13:49 +1100 Subject: [PATCH 0047/2268] compression-webpack-plugin: Bump version number --- types/compression-webpack-plugin/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index b03b655c69..5d72f1fca8 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for compression-webpack-plugin 0.4 +// Type definitions for compression-webpack-plugin 2.0 // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Rhys van der Waerden From a185047e8e2de73610c42992170ab0e2bb5b2118 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 09:09:00 -0800 Subject: [PATCH 0048/2268] Update match-media-mock tests --- types/match-media-mock/match-media-mock-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/match-media-mock/match-media-mock-tests.ts b/types/match-media-mock/match-media-mock-tests.ts index dc35cff40b..6aa36407a9 100644 --- a/types/match-media-mock/match-media-mock-tests.ts +++ b/types/match-media-mock/match-media-mock-tests.ts @@ -7,7 +7,7 @@ matchMediaMock('(max-width: 991px)').matches // false matchMediaMock('(max-width: 1240px)').matches // true const mediaQueryList = matchMediaMock('(max-width: 991px)'); -const listener = (mql: MediaQueryList) => { }; +const listener = (mqle: MediaQueryListEvent) => { }; mediaQueryList.addListener(listener) mediaQueryList.removeListener(listener) From 4d019f2ef8d52b646c4e974fca498ecbd450335f Mon Sep 17 00:00:00 2001 From: Marko K Date: Tue, 20 Nov 2018 20:51:17 +0200 Subject: [PATCH 0049/2268] fix: allow StyleFunction for heatmap paint properties --- types/mapbox-gl/index.d.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 91fb68cd96..b45e1e8746 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -232,7 +232,7 @@ declare namespace mapboxgl { /** * The max number of pixels a user can shift the mouse pointer during a click for it to be * considered a valid click (as opposed to a mouse drag). - * + * * @default 3 */ clickTolerance?: number; @@ -242,7 +242,7 @@ declare namespace mapboxgl { * and Vector Tile web workers (this information is normally inaccessible from the main * Javascript thread). Information will be returned in a `resourceTiming` property of * relevant `data` events. - * + * * @default false */ collectResourceTiming?: boolean; @@ -250,7 +250,7 @@ declare namespace mapboxgl { /** * If `true`, symbols from multiple sources can collide with each other during collision * detection. If `false`, collision detection is run separately for the symbols in each source. - * + * * @default true */ crossSourceCollisions?: boolean; @@ -278,7 +278,7 @@ declare namespace mapboxgl { * Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds. * This setting affects all symbol layers. This setting does not affect the duration of runtime * styling transitions or raster tile cross-fading. - * + * * @default 300 */ fadeDuration?: number; @@ -297,14 +297,14 @@ declare namespace mapboxgl { * 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. In these ranges, font settings from * the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold). * The purpose of this option is to avoid bandwidth-intensive glyph server requests. - * + * * @default null */ localIdeographFontFamily?: string; /** * A string representing the position of the Mapbox wordmark on the map. - * + * * @default "bottom-left" */ logoPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; @@ -324,14 +324,14 @@ declare namespace mapboxgl { /** * The initial pitch (tilt) of the map, measured in degrees away from the plane of the * screen (0-60). - * + * * @default 0 */ pitch?: number; /** * If `false`, the map's pitch (tilt) control with "drag to rotate" interaction will be disabled. - * + * * @default true */ pitchWithRotate?: boolean; @@ -339,14 +339,14 @@ declare namespace mapboxgl { /** * If `false`, the map won't attempt to re-request tiles once they expire per their HTTP * `cacheControl`/`expires` headers. - * + * * @default true */ refreshExpiredTiles?: boolean; /** * If `true`, multiple copies of the world will be rendered, when zoomed out. - * + * * @default true */ renderWorldCopies?: boolean; @@ -363,7 +363,7 @@ declare namespace mapboxgl { /** * A callback run before the Map makes a request for an external URL. The callback can be * used to modify the url, set headers, or set the credentials property for cross-origin requests. - * + * * @default null */ transformRequest?: TransformRequestFunction; @@ -377,13 +377,13 @@ declare namespace mapboxgl { /** * The maximum number of tiles stored in the tile cache for a given source. If omitted, the * cache will be dynamically sized based on the current viewport. - * + * * @default null */ maxTileCacheSize?: number; } - export type ResourceType = + export type ResourceType = | 'Unknown' | 'Style' | 'Source' @@ -692,7 +692,7 @@ declare namespace mapboxgl { clusterMaxZoom?: number; lineMetrics?: boolean; - + generateId?: boolean; } @@ -1476,13 +1476,13 @@ declare namespace mapboxgl { } export interface HeatmapPaint { - 'heatmap-radius'?: number | Expression; + 'heatmap-radius'?: number | StyleFunction | Expression; 'heatmap-radius-transition'?: Transition; 'heatmap-weight'?: number | StyleFunction | Expression; - 'heatmap-intensity'?: number | Expression; + 'heatmap-intensity'?: number | StyleFunction | Expression; 'heatmap-intensity-transition'?: Transition; - 'heatmap-color'?: string | Expression; - 'heatmap-opacity'?: number | Expression; + 'heatmap-color'?: string | StyleFunction | Expression; + 'heatmap-opacity'?: number | StyleFunction | Expression; 'heatmap-opacity-transition'?: Transition; } From 9e68f23ebb215d1d2cda8ff25652d79dddada69c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:17:42 -0800 Subject: [PATCH 0050/2268] Update redux-action with redux 4.0 API --- types/redux-action/package.json | 3 +-- types/redux-action/redux-action-tests.ts | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/types/redux-action/package.json b/types/redux-action/package.json index 0a14f5edc6..7cc600c266 100644 --- a/types/redux-action/package.json +++ b/types/redux-action/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "redux": "^3.6.0", - "redux-thunk": "^2.2.0" + "redux": "^4.0.1" } } diff --git a/types/redux-action/redux-action-tests.ts b/types/redux-action/redux-action-tests.ts index 2290ed9a3f..d1b065c08f 100644 --- a/types/redux-action/redux-action-tests.ts +++ b/types/redux-action/redux-action-tests.ts @@ -1,5 +1,4 @@ import * as ReduxAction from 'redux-action'; -import * as ReduxThunk from 'redux-thunk'; import * as Redux from 'redux'; interface Payload { @@ -11,7 +10,7 @@ const dispatch: Redux.Dispatch = (...args: any[]): any => { }; const actionCreator0 = ReduxAction.createAction('get items'); -dispatch(actionCreator0(1)) +actionCreator0(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: Payload = action.payload; @@ -19,7 +18,7 @@ dispatch(actionCreator0(1)) const actionCreator1 = ReduxAction.createAction(); -dispatch(actionCreator1(1)) +actionCreator1(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: Payload = action.payload; @@ -27,7 +26,7 @@ dispatch(actionCreator1(1)) const actionCreator2 = ReduxAction.createAction('get items', (name: string) => name); -dispatch(actionCreator2(1)) +actionCreator2(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -35,7 +34,7 @@ dispatch(actionCreator2(1)) const actionCreator3 = ReduxAction.createAction('get items', (name: string) => Promise.resolve(name)); -dispatch(actionCreator3(1)) +actionCreator3(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -43,7 +42,7 @@ dispatch(actionCreator3(1)) const actionCreator4 = ReduxAction.createAction((name: string) => name); -dispatch(actionCreator4(1)) +actionCreator4(1)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: string = action.payload; @@ -51,7 +50,7 @@ dispatch(actionCreator4(1)) const actionCreator5 = ReduxAction.createAction((name: string) => 1); -dispatch(actionCreator5('items')) +actionCreator5('items')(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: number = action.payload; @@ -59,7 +58,7 @@ dispatch(actionCreator5('items')) const actionCreator6 = ReduxAction.createAction((name: string) => 1); -dispatch(actionCreator6('items', false)) +actionCreator6('items', false)(dispatch, () => { }) .then(action => { const type: string = action.type; const payload: number = action.payload; @@ -80,4 +79,4 @@ const reducer = ReduxAction.createReducer({ name: 'name' }, { } }); -const combinedReducer: Redux.Reducer = Redux.combineReducers({ reducer }); +const combinedReducer: Redux.Reducer<{ reducer: State }> = Redux.combineReducers<{ reducer: State }>({ reducer }); From fd052a6b5a37f5125f2f0b750090902ec41908fa Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:31:32 -0800 Subject: [PATCH 0051/2268] Downcast Error types to ignore call signature This helps type inference work correctly. --- types/bluebird/bluebird-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 05ac5cc19c..8fe5db7538 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -313,7 +313,7 @@ fooOrBarProm = fooProm.caught((error: any) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // $ExpectType Bluebird -fooProm.catch(Error, (reason: any) => { +fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { return; }); // $ExpectType Bluebird @@ -321,7 +321,7 @@ fooProm.catch(Promise.CancellationError, (reason: any) => { return; }); // $ExpectType Bluebird -fooProm.caught(Error, (reason: any) => { +fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { return; }); // $ExpectType Bluebird @@ -329,13 +329,13 @@ fooProm.caught(Promise.CancellationError, (reason: any) => { return; }); -fooOrBarProm = fooProm.catch(Error, (reason: any) => { +fooOrBarProm = fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { return bar; }); fooOrBarProm = fooProm.catch(Promise.CancellationError, (reason: any) => { return bar; }); -fooOrBarProm = fooProm.caught(Error, (reason: any) => { +fooOrBarProm = fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { return bar; }); fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => { From f1d0311b61d2efdd39e82369b40906d39a7f4a13 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 11:42:19 -0800 Subject: [PATCH 0052/2268] Fix unrelated lints --- types/db-migrate-base/db-migrate-base-tests.ts | 4 ++-- types/db-migrate-pg/db-migrate-pg-tests.ts | 2 +- types/project-oxford/project-oxford-tests.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/db-migrate-base/db-migrate-base-tests.ts b/types/db-migrate-base/db-migrate-base-tests.ts index 79d81a75f9..b094be1280 100644 --- a/types/db-migrate-base/db-migrate-base-tests.ts +++ b/types/db-migrate-base/db-migrate-base-tests.ts @@ -3,7 +3,7 @@ import * as DbMigrateBase from "db-migrate-base"; // Throw together a dummy driver -let db = {}; +let db = {} as DbMigrateBase.Base; let callback = (err: any, response: any) => { // Do nothing. @@ -318,4 +318,4 @@ db.runSqlAsync('DROP TABLE `pets`').then(onResolve); /// allAsync(sql, [params]) db.allAsync('SELECT * FROM `module_user` WHERE `?` = \'?\'', ['first_name', 'Test']).then(onResolve); -db.allAsync('SELECT * FROM `module_user`').then(onResolve); \ No newline at end of file +db.allAsync('SELECT * FROM `module_user`').then(onResolve); diff --git a/types/db-migrate-pg/db-migrate-pg-tests.ts b/types/db-migrate-pg/db-migrate-pg-tests.ts index adf2716074..b31d88e37d 100644 --- a/types/db-migrate-pg/db-migrate-pg-tests.ts +++ b/types/db-migrate-pg/db-migrate-pg-tests.ts @@ -3,7 +3,7 @@ import * as DbMigratePg from "db-migrate-pg"; // Throw together a dummy driver -let db = {}; +let db = {} as DbMigratePg.PgDriver; let callback = (err: any, response: any) => { // Do nothing. diff --git a/types/project-oxford/project-oxford-tests.ts b/types/project-oxford/project-oxford-tests.ts index d4c59de109..8b1dbec466 100644 --- a/types/project-oxford/project-oxford-tests.ts +++ b/types/project-oxford/project-oxford-tests.ts @@ -12,7 +12,7 @@ const {describe, it, before, after, beforeEach, afterEach} = null as any as { var client = new oxford.Client(process.env.OXFORD_KEY); // Store variables, no point in calling the api too often -var billFaces = []; +var billFaces = [] as string[]; var personGroupId = "uuid.v4()"; var personGroupId2 = "uuid.v4()"; var billPersonId: string; @@ -113,7 +113,7 @@ describe('Project Oxford Face API Test', function () { describe('#grouping()', function () { it('detects groups faces', function (done) { - var faceIds = []; + var faceIds = [] as string[]; this.timeout(10000); From dc6cea2e1ed814f51b9211f2a31bf752666a3890 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 12:36:47 -0800 Subject: [PATCH 0053/2268] Fix CI failure 1. Use 3.1 and 3.2-compatible fix for match-media-mock. Specify a this-parameter. 2. redux-action requires TS 2.3 so that type parameter defaults and mapped types from redux 4.0 work. --- types/match-media-mock/match-media-mock-tests.ts | 2 +- types/redux-action/index.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/match-media-mock/match-media-mock-tests.ts b/types/match-media-mock/match-media-mock-tests.ts index 6aa36407a9..25fe411dd1 100644 --- a/types/match-media-mock/match-media-mock-tests.ts +++ b/types/match-media-mock/match-media-mock-tests.ts @@ -7,7 +7,7 @@ matchMediaMock('(max-width: 991px)').matches // false matchMediaMock('(max-width: 1240px)').matches // true const mediaQueryList = matchMediaMock('(max-width: 991px)'); -const listener = (mqle: MediaQueryListEvent) => { }; +const listener = function (this: MediaQueryList) { }; mediaQueryList.addListener(listener) mediaQueryList.removeListener(listener) diff --git a/types/redux-action/index.d.ts b/types/redux-action/index.d.ts index dc5b9e5229..51c3cc3b61 100644 --- a/types/redux-action/index.d.ts +++ b/types/redux-action/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/coderhaoxin/redux-action // Definitions by: newraina // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /** * inspired by @types/redux-actions, thanks. From ebbf64f76b0b702ca0591ffa43c3586f994c9e43 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 20 Nov 2018 15:56:58 -0800 Subject: [PATCH 0054/2268] Work around 3.2 inference change using overloads Notes: 1. I only duplicated overloads to get 2 * n instead of 2 * n overloads needed to support every combination of constructor function/other. 2. I deleted the duplicate R vs U | R overloads for `catch` since they were equivalent; I don't think the R overloads were ever used. 3. The original overload is now Constructor | CatchFilter; I haven't figured out why yet, but normal classes don't use the new Constructor-only overload. Only constructor functions do. --- types/bluebird/bluebird-tests.ts | 8 +- types/bluebird/index.d.ts | 277 +++++++++++++++++++++---------- 2 files changed, 190 insertions(+), 95 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 8fe5db7538..05ac5cc19c 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -313,7 +313,7 @@ fooOrBarProm = fooProm.caught((error: any) => { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // $ExpectType Bluebird -fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { +fooProm.catch(Error, (reason: any) => { return; }); // $ExpectType Bluebird @@ -321,7 +321,7 @@ fooProm.catch(Promise.CancellationError, (reason: any) => { return; }); // $ExpectType Bluebird -fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { +fooProm.caught(Error, (reason: any) => { return; }); // $ExpectType Bluebird @@ -329,13 +329,13 @@ fooProm.caught(Promise.CancellationError, (reason: any) => { return; }); -fooOrBarProm = fooProm.catch(Error as { new(message?: string): Error }, (reason: any) => { +fooOrBarProm = fooProm.catch(Error, (reason: any) => { return bar; }); fooOrBarProm = fooProm.catch(Promise.CancellationError, (reason: any) => { return bar; }); -fooOrBarProm = fooProm.caught(Error as { new(message?: string): Error }, (reason: any) => { +fooOrBarProm = fooProm.caught(Error, (reason: any) => { return bar; }); fooOrBarProm = fooProm.caught(Promise.CancellationError, (reason: any) => { diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index 091dbe6e7a..1f8768498a 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -35,7 +35,8 @@ * THE SOFTWARE. */ -type CatchFilter = (new (...args: any[]) => E) | ((error: E) => boolean) | (object & E); +type Constructor = new (...args: any[]) => E +type CatchFilter = ((error: E) => boolean) | (object & E); type IterableItem = R extends Iterable ? U : never; type IterableOrNever = Extract>; type Resolvable = R | PromiseLike; @@ -85,69 +86,73 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { * * Alias `.caught();` for compatibility with earlier ECMAScript version. */ - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, - onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - onReject: (error: E1 | E2 | E3 | E4) => Resolvable, - ): Bluebird; + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, + onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, + ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + onReject: (error: E1 | E2 | E3 | E4) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - onReject: (error: E1 | E2 | E3) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + onReject: (error: E1 | E2 | E3) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - filter2: CatchFilter, - onReject: (error: E1 | E2) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor, + filter2: Constructor, + onReject: (error: E1 | E2) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, onReject: (error: E1 | E2) => Resolvable, ): Bluebird; - catch( - filter1: CatchFilter, - onReject: (error: E1) => Resolvable, - ): Bluebird; catch( - filter1: CatchFilter, + filter1: Constructor, + onReject: (error: E1) => Resolvable, + ): Bluebird; + + catch( + filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -201,33 +206,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { tapCatch(onReject: (error?: any) => Resolvable): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, + onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4 | E5) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + onReject: (error: E1 | E2 | E3 | E4) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3 | E4) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + onReject: (error: E1 | E2 | E3) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, onReject: (error: E1 | E2 | E3) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor, + filter2: Constructor, + onReject: (error: E1 | E2) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, onReject: (error: E1 | E2) => Resolvable, ): Bluebird; tapCatch( - filter1: CatchFilter, + filter1: Constructor, + onReject: (error: E1) => Resolvable, + ): Bluebird; + tapCatch( + filter1: Constructor | CatchFilter, onReject: (error: E1) => Resolvable, ): Bluebird; @@ -376,33 +411,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { // No need to be specific about Error types in these overrides, since there's no handler function catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, value: U, ): Bluebird; catchReturn( - filter1: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor, + filter2: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor, + value: U, + ): Bluebird; + catchReturn( + filter1: Constructor | CatchFilter, value: U, ): Bluebird; @@ -420,33 +485,63 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { // No need to be specific about Error types in these overrides, since there's no handler function catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, - filter5: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, + filter5: Constructor, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, - filter4: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, + filter5: Constructor | CatchFilter, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, - filter3: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + filter4: Constructor, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, - filter2: CatchFilter, + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + filter4: Constructor | CatchFilter, reason: Error, ): Bluebird; catchThrow( - filter1: CatchFilter, + filter1: Constructor, + filter2: Constructor, + filter3: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + filter3: Constructor | CatchFilter, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor, + filter2: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, + filter2: Constructor | CatchFilter, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor, + reason: Error, + ): Bluebird; + catchThrow( + filter1: Constructor | CatchFilter, reason: Error, ): Bluebird; From 17af5405cbaa196d9f0766d3eda0374604fc0fda Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 11:34:35 -0800 Subject: [PATCH 0055/2268] More TS 3.2 DOM updates Unlike the other PR, these updates should not go in until 3.2 is out, since they rely on the following additions: 1. webrtc 2. web-animations 3. geometry-dom I left these packages in to make it easier to upgrade and edited them where needed, but I removed the dependencies on them in other Definitely Typed packages. --- types/peerjs/index.d.ts | 6 +- types/skyway/index.d.ts | 6 +- types/w3c-generic-sensor/index.d.ts | 6 +- types/w3c-screen-orientation/index.d.ts | 2 +- types/web-animations-js/index.d.ts | 25 +++------ types/webrtc/RTCPeerConnection.d.ts | 75 +++++++++++++------------ 6 files changed, 53 insertions(+), 67 deletions(-) diff --git a/types/peerjs/index.d.ts b/types/peerjs/index.d.ts index 4ca88fd50b..faf99dc9b3 100644 --- a/types/peerjs/index.d.ts +++ b/types/peerjs/index.d.ts @@ -2,9 +2,7 @@ // Project: http://peerjs.com/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// +// TypeScript Version: 3.2 declare namespace PeerJs{ interface PeerJSOption{ @@ -13,7 +11,7 @@ declare namespace PeerJs{ port?: number; path?: string; secure?: boolean; - config?: RTCPeerConnectionConfig; + config?: RTCConfiguration; debug?: number; } diff --git a/types/skyway/index.d.ts b/types/skyway/index.d.ts index eb73937178..e396f8cff0 100644 --- a/types/skyway/index.d.ts +++ b/types/skyway/index.d.ts @@ -2,9 +2,7 @@ // Project: http://nttcom.github.io/skyway/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// +// TypeScript Version: 3.2 declare namespace PeerJs{ interface PeerJSOption{ @@ -14,7 +12,7 @@ declare namespace PeerJs{ path?: string; secure?: boolean; turn?: boolean; - config?: RTCPeerConnectionConfig; + config?: RTCConfiguration; debug?: number; } diff --git a/types/w3c-generic-sensor/index.d.ts b/types/w3c-generic-sensor/index.d.ts index 40f6db6301..bec987d04f 100644 --- a/types/w3c-generic-sensor/index.d.ts +++ b/types/w3c-generic-sensor/index.d.ts @@ -2,12 +2,10 @@ // Project: https://www.w3.org/TR/generic-sensor/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 3.2 // Explainer: https://www.w3.org/TR/motion-sensors/ -/// - declare class SensorErrorEvent extends Event { constructor(type: string, errorEventInitDict: SensorErrorEventInit); readonly error: Error; @@ -82,7 +80,7 @@ declare class UncalibratedMagnetometer extends Sensor { // Orientation Sensor: https://www.w3.org/TR/orientation-sensor/ -type RotationMatrixType = Float32Array | Float64Array | GeometryDom.DOMMatrix; +type RotationMatrixType = Float32Array | Float64Array | DOMMatrix; declare class OrientationSensor extends Sensor { readonly quaternion?: number[]; diff --git a/types/w3c-screen-orientation/index.d.ts b/types/w3c-screen-orientation/index.d.ts index 7cac6c33f3..74fee2ecb6 100644 --- a/types/w3c-screen-orientation/index.d.ts +++ b/types/w3c-screen-orientation/index.d.ts @@ -2,8 +2,8 @@ // Project: https://www.w3.org/TR/screen-orientation/ // Definitions by: Kenneth Rohde Christiansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 -type OrientationType = "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; type ScreenOrientationLockType = "any" | "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"; interface ScreenOrientation extends EventTarget { diff --git a/types/web-animations-js/index.d.ts b/types/web-animations-js/index.d.ts index 54c0b8c01b..c317675727 100644 --- a/types/web-animations-js/index.d.ts +++ b/types/web-animations-js/index.d.ts @@ -2,10 +2,10 @@ // Project: https://github.com/web-animations/web-animations-js // Definitions by: Kristian Moerch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 type AnimationEffectTimingFillMode = "none" | "forwards" | "backwards" | "both" | "auto"; type AnimationEffectTimingPlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse"; -type AnimationPlayState = "idle" | "running" | "paused" | "finished"; interface AnimationPlaybackEvent { target: Animation; @@ -68,18 +68,7 @@ interface ComputedTimingProperties { currentIteration: number | null; } -declare class KeyframeEffect implements AnimationEffectReadOnly { - constructor(target: HTMLElement, effect: AnimationKeyFrame | AnimationKeyFrame[], timing: number | AnimationEffectTiming, id?: string); - activeDuration: number; - onsample: (timeFraction: number | null, effect: KeyframeEffect, animation: Animation) => void | undefined; - parent: KeyframeEffect | null; - target: HTMLElement; - timing: number; - getComputedTiming(): ComputedTimingProperties; - getFrames(): AnimationKeyFrame[]; - remove(): void; -} -type AnimationEventListener = (this: Animation, evt: AnimationPlaybackEvent) => any; +type AnimationEventListener = ((this: Animation, evt: AnimationPlaybackEvent) => any) | null; interface Animation extends EventTarget { currentTime: number | null; @@ -88,7 +77,7 @@ interface Animation extends EventTarget { onfinish: AnimationEventListener; readonly playState: AnimationPlayState; playbackRate: number; - startTime: number; + startTime: number | null; cancel(): void; finish(): void; pause(): void; @@ -96,15 +85,15 @@ interface Animation extends EventTarget { reverse(): void; addEventListener(type: "finish" | "cancel", handler: EventListener): void; removeEventListener(type: "finish" | "cancel", handler: EventListener): void; - effect: AnimationEffectReadOnly; + effect: AnimationEffect | null; readonly finished: Promise; readonly ready: Promise; - timeline: AnimationTimeline; + timeline: AnimationTimeline | null; } declare var Animation: { prototype: Animation; - new(effect?: AnimationEffectReadOnly, timeline?: AnimationTimeline): Animation; + new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; }; declare class SequenceEffect extends KeyframeEffect { @@ -118,5 +107,5 @@ interface Element { getAnimations(): Animation[]; } interface Document { - timeline: AnimationTimeline; + readonly timeline: AnimationTimeline; } diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 210ab66ddd..4b5c1cea53 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,6 +2,7 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 // // W3 Spec: https://www.w3.org/TR/webrtc/ // @@ -11,8 +12,6 @@ /// -type EventHandler = (event: Event) => void; - // https://www.w3.org/TR/webrtc/#idl-def-rtcofferansweroptions interface RTCOfferAnswerOptions { voiceActivityDetection?: boolean; // default = true @@ -28,10 +27,10 @@ interface RTCAnswerOptions extends RTCOfferAnswerOptions { } // https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnectionstate -type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; +// type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; // https://www.w3.org/TR/webrtc/#idl-def-rtcicecredentialtype -type RTCIceCredentialType = 'password' | 'token'; +// type RTCIceCredentialType = 'password' | 'token'; // https://www.w3.org/TR/webrtc/#idl-def-rtciceserver interface RTCIceServer { @@ -40,7 +39,7 @@ interface RTCIceServer { } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpmuxpolicy -type RTCRtcpMuxPolicy = 'negotiate' | 'require'; +// type RTCRtcpMuxPolicy = 'negotiate' | 'require'; // https://www.w3.org/TR/webrtc/#idl-def-rtciceparameters interface RTCIceParameters { @@ -49,6 +48,7 @@ interface RTCIceParameters { } // https://www.w3.org/TR/webrtc/#idl-def-rtcicetransport +type IceTransportEventHandler = ((this: RTCIceTransport, ev: Event) => any) | null; interface RTCIceTransport { //readonly role: RTCIceRole; //readonly component: RTCIceComponent; @@ -59,17 +59,18 @@ interface RTCIceTransport { getSelectedCandidatePair(): RTCIceCandidatePair | null; getLocalParameters(): RTCIceParameters | null; getRemoteParameters(): RTCIceParameters | null; - onstatechange: EventHandler; - ongatheringstatechange: EventHandler; - onselectedcandidatepairchange: EventHandler; + onstatechange: IceTransportEventHandler; + ongatheringstatechange: IceTransportEventHandler; + onselectedcandidatepairchange: IceTransportEventHandler; } // https://www.w3.org/TR/webrtc/#idl-def-rtcdtlstransport +type DtlsTransportEventHandler = ((this: RTCDtlsTransport, ev: Event) => any) | null; interface RTCDtlsTransport { readonly transport: RTCIceTransport; //readonly state: RTCDtlsTransportState; getRemoteCertificates(): ArrayBuffer[]; - onstatechange: EventHandler; + onstatechange: DtlsTransportEventHandler; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodeccapability @@ -79,7 +80,7 @@ interface RTCRtpCodecCapability { // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpheaderextensioncapability interface RTCRtpHeaderExtensionCapability { - uri: string; + uri?: string; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities @@ -99,17 +100,17 @@ interface RTCRtpFecParameters { } // https://www.w3.org/TR/webrtc/#idl-def-rtcdtxstatus -type RTCDtxStatus = 'disabled' | 'enabled'; +// type RTCDtxStatus = 'disabled' | 'enabled'; // https://www.w3.org/TR/webrtc/#idl-def-rtcprioritytype -type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; +// type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpencodingparameters interface RTCRtpEncodingParameters { //ssrc: number; //rtx: RTCRtpRtxParameters; //fec: RTCRtpFecParameters; - dtx: RTCDtxStatus; + dtx?: RTCDtxStatus; //active: boolean; //priority: RTCPriorityType; //maxBitrate: number; @@ -121,7 +122,7 @@ interface RTCRtpEncodingParameters { interface RTCRtpHeaderExtensionParameters { //uri: string; //id: number; - encrypted: boolean; + encrypted?: boolean; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpparameters @@ -136,7 +137,7 @@ interface RTCRtpCodecParameters { mimeType: string; //clockRate: number; channels?: number; // default = 1 - sdpFmtpLine: string; + sdpFmtpLine?: string; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpparameters @@ -152,9 +153,9 @@ interface RTCRtpParameters { // https://www.w3.org/TR/webrtc/#dom-rtcrtpcontributingsource interface RTCRtpContributingSource { //readonly timestamp: number; - readonly source: number; + source: number; //readonly audioLevel: number | null; - readonly voiceActivityFlag: boolean | null; + readonly voiceActivityFlag?: boolean | undefined; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities @@ -183,7 +184,7 @@ interface RTCRtpReceiver { } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverdirection -type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; +// type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiver interface RTCRtpTransceiver { @@ -191,7 +192,7 @@ interface RTCRtpTransceiver { readonly sender: RTCRtpSender; readonly receiver: RTCRtpReceiver; readonly stopped: boolean; - readonly direction: RTCRtpTransceiverDirection; + direction: RTCRtpTransceiverDirection; setDirection(direction: RTCRtpTransceiverDirection): void; stop(): void; setCodecPreferences(codecs: RTCRtpCodecCapability[]): void; @@ -200,8 +201,8 @@ interface RTCRtpTransceiver { // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverinit interface RTCRtpTransceiverInit { direction?: RTCRtpTransceiverDirection; // default = 'sendrecv' - streams: MediaStream[]; - sendEncodings: RTCRtpEncodingParameters[]; + streams?: MediaStream[]; + sendEncodings?: RTCRtpEncodingParameters[]; } // https://www.w3.org/TR/webrtc/#dom-rtccertificate @@ -241,12 +242,13 @@ interface RTCDataChannelInit { } // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate -type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; +// type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; // https://www.w3.org/TR/websockets/#dom-websocket-binarytype -type RTCBinaryType = 'blob' | 'arraybuffer'; +// type RTCBinaryType = 'blob' | 'arraybuffer'; // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannel +type DataChannelEventHandler = ((this: RTCDataChannel, ev: E) => any) | null; interface RTCDataChannel extends EventTarget { readonly label: string; readonly ordered: boolean; @@ -254,33 +256,33 @@ interface RTCDataChannel extends EventTarget { readonly maxRetransmits: number | null; readonly protocol: string; readonly negotiated: boolean; - readonly id: number; + readonly id: number | null; readonly readyState: RTCDataChannelState; readonly bufferedAmount: number; bufferedAmountLowThreshold: number; - binaryType: RTCBinaryType; + binaryType: string; close(): void; send(data: string | Blob | ArrayBuffer | ArrayBufferView): void; - onopen: EventHandler; - onmessage: (event: MessageEvent) => void; - onbufferedamountlow: EventHandler; - onerror: (event: ErrorEvent) => void; - onclose: EventHandler; + onopen: DataChannelEventHandler; + onmessage: DataChannelEventHandler; + onbufferedamountlow: DataChannelEventHandler; + onerror: DataChannelEventHandler; + onclose: DataChannelEventHandler; } // https://www.w3.org/TR/webrtc/#h-rtctrackevent interface RTCTrackEvent extends Event { readonly receiver: RTCRtpReceiver; readonly track: MediaStreamTrack; - readonly streams: MediaStream[]; + readonly streams: ReadonlyArray; readonly transceiver: RTCRtpTransceiver; } // https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceevent interface RTCPeerConnectionIceEvent extends Event { - readonly url: string; + readonly url: string | null; } // https://www.w3.org/TR/webrtc/#h-rtcpeerconnectioniceerrorevent @@ -297,6 +299,7 @@ interface RTCDataChannelEvent { } // https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnection +type PeerConnectionEventHandler = ((this: RTCPeerConnection, ev: E) => any) | null; interface RTCPeerConnection extends EventTarget { createOffer(options?: RTCOfferOptions): Promise; createAnswer(options?: RTCAnswerOptions): Promise; @@ -320,8 +323,8 @@ interface RTCPeerConnection extends EventTarget { setConfiguration(configuration: RTCConfiguration): void; close(): void; - onicecandidateerror: (event: RTCPeerConnectionIceErrorEvent) => void; - onconnectionstatechange: EventHandler; + onicecandidateerror: PeerConnectionEventHandler; + onconnectionstatechange: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions getSenders(): RTCRtpSender[]; @@ -330,12 +333,12 @@ interface RTCPeerConnection extends EventTarget { addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender; removeTrack(sender: RTCRtpSender): void; addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver; - ontrack: (event: RTCTrackEvent) => void; + ontrack: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-1 readonly sctp: RTCSctpTransport | null; createDataChannel(label: string | null, dataChannelDict?: RTCDataChannelInit): RTCDataChannel; - ondatachannel: (event: RTCDataChannelEvent) => void; + ondatachannel: PeerConnectionEventHandler; // Extension: https://www.w3.org/TR/webrtc/#h-rtcpeerconnection-interface-extensions-2 getStats(selector?: MediaStreamTrack | null): Promise; From 289d09cce48cbd9faf698fa59864a5aef463dbe1 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 12:41:56 -0800 Subject: [PATCH 0056/2268] Remove code instead of commenting it out --- types/webrtc/RTCPeerConnection.d.ts | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 4b5c1cea53..e5dfd79be9 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -26,21 +26,12 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { interface RTCAnswerOptions extends RTCOfferAnswerOptions { } -// https://www.w3.org/TR/webrtc/#idl-def-rtcpeerconnectionstate -// type RTCPeerConnectionState = 'new' | 'connecting' | 'connected' | 'disconnected' | 'failed' | 'closed'; - -// https://www.w3.org/TR/webrtc/#idl-def-rtcicecredentialtype -// type RTCIceCredentialType = 'password' | 'token'; - // https://www.w3.org/TR/webrtc/#idl-def-rtciceserver interface RTCIceServer { //urls: string | string[]; credentialType?: RTCIceCredentialType; // default = 'password' } -// https://www.w3.org/TR/webrtc/#idl-def-rtcrtcpmuxpolicy -// type RTCRtcpMuxPolicy = 'negotiate' | 'require'; - // https://www.w3.org/TR/webrtc/#idl-def-rtciceparameters interface RTCIceParameters { //usernameFragment: string; @@ -99,12 +90,6 @@ interface RTCRtpFecParameters { //ssrc: number; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcdtxstatus -// type RTCDtxStatus = 'disabled' | 'enabled'; - -// https://www.w3.org/TR/webrtc/#idl-def-rtcprioritytype -// type RTCPriorityType = 'very-low' | 'low' | 'medium' | 'high'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpencodingparameters interface RTCRtpEncodingParameters { //ssrc: number; @@ -183,9 +168,6 @@ interface RTCRtpReceiver { getContributingSources(): RTCRtpContributingSource[]; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiverdirection -// type RTCRtpTransceiverDirection = 'sendrecv' | 'sendonly' | 'recvonly' | 'inactive'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcrtptransceiver interface RTCRtpTransceiver { readonly mid: string | null; @@ -241,12 +223,6 @@ interface RTCDataChannelInit { id?: number; } -// https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelstate -// type RTCDataChannelState = 'connecting' | 'open' | 'closing' | 'closed'; - -// https://www.w3.org/TR/websockets/#dom-websocket-binarytype -// type RTCBinaryType = 'blob' | 'arraybuffer'; - // https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannel type DataChannelEventHandler = ((this: RTCDataChannel, ev: E) => any) | null; interface RTCDataChannel extends EventTarget { From 60d9095e61563415668e240eadfa8d2469548bf7 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:27:18 -0800 Subject: [PATCH 0057/2268] Seems like webrtc was added in 3.0 --- types/webrtc/RTCPeerConnection.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index e5dfd79be9..9dc2faae12 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,7 +2,7 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// TypeScript Version: 3.0 // // W3 Spec: https://www.w3.org/TR/webrtc/ // @@ -140,7 +140,7 @@ interface RTCRtpContributingSource { //readonly timestamp: number; source: number; //readonly audioLevel: number | null; - readonly voiceActivityFlag?: boolean | undefined; + readonly voiceActivityFlag?: boolean; } // https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcapabilities From 089442e1a9440bf89474edf2d81d13c3bd96226e Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:33:21 -0800 Subject: [PATCH 0058/2268] Put version header in index.d.ts --- types/webrtc/RTCPeerConnection.d.ts | 1 - types/webrtc/index.d.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/webrtc/RTCPeerConnection.d.ts b/types/webrtc/RTCPeerConnection.d.ts index 9dc2faae12..3df7999212 100644 --- a/types/webrtc/RTCPeerConnection.d.ts +++ b/types/webrtc/RTCPeerConnection.d.ts @@ -2,7 +2,6 @@ // Project: https://www.w3.org/TR/webrtc/ // Definitions by: Danilo Bargen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 // // W3 Spec: https://www.w3.org/TR/webrtc/ // diff --git a/types/webrtc/index.d.ts b/types/webrtc/index.d.ts index 4a16860637..e087a03f4e 100644 --- a/types/webrtc/index.d.ts +++ b/types/webrtc/index.d.ts @@ -2,7 +2,7 @@ // Project: https://webrtc.org/ // Definitions by: Toshiya Nakakura // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 3.0 /// /// From 588718bc304d4b577457032f8348decfce16b5cb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:38:02 -0800 Subject: [PATCH 0059/2268] Update w3c-image-capture's dependencies too --- types/w3c-image-capture/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/w3c-image-capture/index.d.ts b/types/w3c-image-capture/index.d.ts index 8f04fad534..24a7d917c4 100644 --- a/types/w3c-image-capture/index.d.ts +++ b/types/w3c-image-capture/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.w3.org/TR/image-capture/ // Definitions by: Cosium // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 3.0 /// From 7120224aac33e95d45696e486351f0ca23f9e1e9 Mon Sep 17 00:00:00 2001 From: Sammyt Date: Wed, 21 Nov 2018 18:02:32 +0100 Subject: [PATCH 0060/2268] Add scrollablePlotArea options in ChartOptions --- types/highcharts/index.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 167d6532d3..a2d3c5b44f 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -2232,6 +2232,10 @@ declare namespace Highcharts { * The button that appears after a selection zoom, allowing the user to reset zoom. */ resetZoomButton?: ChartResetZoomButton; + /** + * Options for a scrollable plot area + */ + scrollablePlotArea?: ScrollablePropArea; /** * The background color of the marker square when selecting (zooming in on) an area of the chart. * @default 'rgba(69,114,167,0.25)' @@ -3495,6 +3499,11 @@ declare namespace Highcharts { update(options: TitleOptions): void; } + interface ScrollablePropArea { + minWidth?: number; + scrollPositionX?: number; + } + /** * Under which conditions the rule applies. */ From 756349c67c53c76888b575abe1c7e545378b72fe Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 21:43:51 +0100 Subject: [PATCH 0061/2268] [react-redux] fixed mistreating of action thunk creator parameters --- types/react-redux/index.d.ts | 11 +++++++--- types/react-redux/react-redux-tests.tsx | 27 ++++++++++++++++--------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 2f919581f4..1cccae6d01 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -13,7 +13,7 @@ // Anatoli Papirovski // Boris Sergeyev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 // Known Issue: // There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes @@ -112,9 +112,14 @@ export type InferableComponentEnhancerWithProps = export type InferableComponentEnhancer = InferableComponentEnhancerWithProps; +export type WrappedThunkActionCreator any> = + TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn + ? (...args: TParams) => TReturn + : TActionCreator; + export type HandleThunkActionCreator = - TActionCreator extends (...args: any[]) => (...args: any[]) => any - ? ReturnType + TActionCreator extends (...args: any[]) => any + ? WrappedThunkActionCreator : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index aff8515e87..f47683047e 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -102,20 +102,27 @@ function MapDispatch() { } function MapDispatchWithThunkActionCreators() { - class TestComponent extends React.Component<{ - foo: string, - onClick(): void, - thunkAction(): Promise - }> {} - - const mapDispatchToProps = () => ({ - onClick: () => {}, - thunkAction: () => async () => {} + const simpleAction = (payload: boolean) => ({ + type: 'SIMPLE_ACTION', + payload, }); + const thunkAction = (param1: number, param2: string) => ( + async (dispatch: Dispatch, { foo }: OwnProps) => { + return foo; + } + ); + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + simpleAction: typeof simpleAction; + thunkAction(param1: number, param2: string): Promise; + } + class TestComponent extends React.Component {} const Test = connect( null, - mapDispatchToProps, + ({ simpleAction, thunkAction }), )(TestComponent); const verify = ; From 35d989dce077cdd42be9943a53895eeebf569fb8 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 22:16:23 +0100 Subject: [PATCH 0062/2268] [react-redux] bumped TS versions of packages dependent on react-redux --- types/mirrorx/index.d.ts | 2 +- types/next-redux-saga/index.d.ts | 2 +- types/next-redux-wrapper/index.d.ts | 2 +- types/react-intl-redux/index.d.ts | 2 +- types/react-lifecycle-component/index.d.ts | 2 +- types/react-redux-toastr/index.d.ts | 2 +- types/react-router-redux/index.d.ts | 2 +- types/redux-auth-wrapper/index.d.ts | 2 +- types/redux-devtools/index.d.ts | 2 +- types/redux-form/index.d.ts | 2 +- types/redux-form/v6/index.d.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/types/mirrorx/index.d.ts b/types/mirrorx/index.d.ts index 443712c325..e2fa0ee465 100644 --- a/types/mirrorx/index.d.ts +++ b/types/mirrorx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mirrorjs/mirror // Definitions by: Aaronphy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import * as H from 'history'; diff --git a/types/next-redux-saga/index.d.ts b/types/next-redux-saga/index.d.ts index b7575fba16..0366868d97 100644 --- a/types/next-redux-saga/index.d.ts +++ b/types/next-redux-saga/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bmealhouse/next-redux-saga // Definitions by: Leo Cavalcante // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentType } from "react"; diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index 16af858743..cbf56579d5 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Steve // Jungwoo-An // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 /// diff --git a/types/react-intl-redux/index.d.ts b/types/react-intl-redux/index.d.ts index 9d9e805df9..4410e7c019 100644 --- a/types/react-intl-redux/index.d.ts +++ b/types/react-intl-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ratson/react-intl-redux // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Action, AnyAction } from "redux" import { Provider as ReduxProvider } from "react-redux" diff --git a/types/react-lifecycle-component/index.d.ts b/types/react-lifecycle-component/index.d.ts index 315d04f7fb..bb6dc65dd8 100644 --- a/types/react-lifecycle-component/index.d.ts +++ b/types/react-lifecycle-component/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JamieDixon/react-lifecycle-component // Definitions by: Alexander Fisher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentLifecycle, Component, ComponentClass } from 'react'; import { Connect } from 'react-redux'; diff --git a/types/react-redux-toastr/index.d.ts b/types/react-redux-toastr/index.d.ts index fc11da9c43..9a7a115725 100644 --- a/types/react-redux-toastr/index.d.ts +++ b/types/react-redux-toastr/index.d.ts @@ -4,7 +4,7 @@ // Artyom Stukans // Mika Kuitunen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Component } from 'react'; import { Action, Reducer } from 'redux'; diff --git a/types/react-router-redux/index.d.ts b/types/react-router-redux/index.d.ts index 9dfbd58c11..7abdc88505 100644 --- a/types/react-router-redux/index.d.ts +++ b/types/react-router-redux/index.d.ts @@ -4,7 +4,7 @@ // Shoya Tanaka // Mykolas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { Store, diff --git a/types/redux-auth-wrapper/index.d.ts b/types/redux-auth-wrapper/index.d.ts index 728be4a54b..3ec88b50dc 100644 --- a/types/redux-auth-wrapper/index.d.ts +++ b/types/redux-auth-wrapper/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mjrussell/redux-auth-wrapper // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentClass, StatelessComponent, ComponentType, ReactType } from "react"; diff --git a/types/redux-devtools/index.d.ts b/types/redux-devtools/index.d.ts index 234fb9a4bb..ddead025ff 100644 --- a/types/redux-devtools/index.d.ts +++ b/types/redux-devtools/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gaearon/redux-devtools // Definitions by: Petryshyn Sergii // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import * as React from 'react'; import { GenericStoreEnhancer } from 'redux'; diff --git a/types/redux-form/index.d.ts b/types/redux-form/index.d.ts index e80c196c0a..5851728369 100644 --- a/types/redux-form/index.d.ts +++ b/types/redux-form/index.d.ts @@ -12,7 +12,7 @@ // Maddi Joyce // Kamil Wojcik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 +// TypeScript Version: 3.0 import { ComponentClass, StatelessComponent, diff --git a/types/redux-form/v6/index.d.ts b/types/redux-form/v6/index.d.ts index a8209a7643..5127457884 100644 --- a/types/redux-form/v6/index.d.ts +++ b/types/redux-form/v6/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/erikras/redux-form // Definitions by: Carson Full , Daniel Lytkin , Karol Janyst , Luka Zakrajsek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.0 import { ComponentClass, From 2d5a8af9f819fad592387f8b4ce3731643125b05 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Thu, 22 Nov 2018 22:18:01 +0100 Subject: [PATCH 0063/2268] [react-redux] used whitespace consistently (no tabs) --- types/react-redux/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index 1cccae6d01..bf65d89fd5 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -65,11 +65,11 @@ export type AdvancedComponentDecorator = * DecorationTargetProps[P] definition, its definition will be that of InjectedProps[P] */ export type Matching = { - [P in keyof DecorationTargetProps]: P extends keyof InjectedProps - ? InjectedProps[P] extends DecorationTargetProps[P] - ? DecorationTargetProps[P] - : InjectedProps[P] - : DecorationTargetProps[P]; + [P in keyof DecorationTargetProps]: P extends keyof InjectedProps + ? InjectedProps[P] extends DecorationTargetProps[P] + ? DecorationTargetProps[P] + : InjectedProps[P] + : DecorationTargetProps[P]; }; /** @@ -95,16 +95,16 @@ export type GetProps = C extends ComponentType ? P : never; // Applies LibraryManagedAttributes (proper handling of defaultProps // and propTypes), as well as defines WrappedComponent. export type ConnectedComponentClass = ComponentClass> & { - WrappedComponent: C; + WrappedComponent: C; }; // Injects props and removes them from the prop requirements. // Will not pass through the injected props if they are passed in during // render. Also adds new prop requirements from TNeedsProps. export type InferableComponentEnhancerWithProps = - >>>( - component: C - ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; + >>>( + component: C + ) => ConnectedComponentClass, keyof Shared>> & TNeedsProps>; // Injects props and removes them from the prop requirements. // Will not pass through the injected props if they are passed in during From 3b5293b936973cec96bb34d86681e82315d15167 Mon Sep 17 00:00:00 2001 From: James Messinger Date: Fri, 23 Nov 2018 09:16:24 -0600 Subject: [PATCH 0064/2268] added type definitions for Petit-Dom 0.2 --- types/petit-dom/.editorconfig | 5 + types/petit-dom/index.d.ts | 187 ++++++++++++++ types/petit-dom/petit-dom-tests.tsx | 368 ++++++++++++++++++++++++++++ types/petit-dom/tsconfig.json | 25 ++ types/petit-dom/tslint.json | 3 + 5 files changed, 588 insertions(+) create mode 100644 types/petit-dom/.editorconfig create mode 100644 types/petit-dom/index.d.ts create mode 100644 types/petit-dom/petit-dom-tests.tsx create mode 100644 types/petit-dom/tsconfig.json create mode 100644 types/petit-dom/tslint.json diff --git a/types/petit-dom/.editorconfig b/types/petit-dom/.editorconfig new file mode 100644 index 0000000000..db9b917e06 --- /dev/null +++ b/types/petit-dom/.editorconfig @@ -0,0 +1,5 @@ +[*.ts] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 diff --git a/types/petit-dom/index.d.ts b/types/petit-dom/index.d.ts new file mode 100644 index 0000000000..937fbfa0e7 --- /dev/null +++ b/types/petit-dom/index.d.ts @@ -0,0 +1,187 @@ +// Type definitions for Petit-Dom 0.2 +// Project: // https://github.com/yelouafi/petit-dom +// Definitions by: James Messinger +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +/** + * Creates a VNode of the specified HTML Element type and with the + * specified properties and contents. + * + * @param type - The tag name of element to create + * @param props - Properties to set on the element + * @param ...children - Child nodes + * @returns A new VNode object + */ +export function h( + type: T, + props?: PetitDom.Props | null, + ...children: PetitDom.Content[] +): PetitDom.ElementNode; + +/** + * Creates a VNode using a PetitDom component object. + * + * @param type - A PetitDom component object + * @param props - Properties to set on the component + * @param ...children - Child nodes + * @returns A new VNode object + */ +export function h

( + type: PetitDom.Component

, + props?: P | null, + ...children: PetitDom.Content[] +): PetitDom.ComponentNode

; + +/** + * Creates a VNode using a PetitDom component class. + * + * @param type - A PetitDom component class + * @param props - Properties to set on the component + * @param ...children - Child nodes + * @returns A new VNode object + */ +export function h

( + type: PetitDom.ComponentClass

, + props?: P | null, + ...children: PetitDom.Content[] +): PetitDom.ComponentClassNode

; + +/** + * Creates a VNode using a PetitDom function component. + * + * This function is compatible with both JSX and HyperScript syntax. + * + * @param type - A PetitDom function component + * @param props - Properties to set on the component + * @param ...children - Child nodes + * @returns A new VNode object + */ +export function h

( + type: PetitDom.FunctionComponent

, + props?: P | null, + ...children: PetitDom.Content[] +): PetitDom.FunctionComponentNode

; + +/** + * Creates actual DOM Elements for the given VNode and its children. + * + * @param vnode - The VNode object to mount + * @returns The newly-created DOM element + */ +export function mount(vnode: PetitDom.VNode): Element; + +/** + * Diffs two VNodes and applies the necessary DOM changes + * + * @param newVNode - The new VNode object, which will be mounted to the DOM element of oldVNode + * @param oldVNode - The old VNode object to diff against + * @param parent - The parent DOM element. Used internally by PetitDom to recursively patch child nodes + * @returns The updated DOM element. This element is also moved from oldVNode to newVNode + */ +export function patch(newVNode: PetitDom.VNode, oldVNode: PetitDom.VNode, parent?: Element): Element; + +/** + * Removes the given VNode from the actual DOM + * + * @param vnode - The VNode object to unmount + */ +export function unmount(vnode: PetitDom.VNode): void; + +export namespace PetitDom { + type Key = string | number; + type ComponentProps = object; + type Content = string | VNode; + + type DOMElementProps = { + [P in keyof E]?: E[P]; + }; + + interface IntrinsicProps { + key?: Key; + } + + type Props = IntrinsicProps & DOMElementProps; + + type ShouldUpdate

= ( + newProps: P, + oldProps: P, + newContent: ReadonlyArray, + oldContent: ReadonlyArray + ) => boolean; + + interface FunctionComponent

{ + (props: P, content: ReadonlyArray): FunctionComponentNode

; + shouldUpdate?: ShouldUpdate

; + } + + interface ComponentClass

{ + new(props: P, content: ReadonlyArray): Component

; + } + + interface Component

{ + mount(props: P, content: ReadonlyArray): Element; + patch(element: Element, newProps: P, oldProps: P, newContent: ReadonlyArray, oldContent: ReadonlyArray): Element; + unmount(element: Element): void; + } + + interface VNode { + readonly isSVG: boolean; + readonly type: any; + readonly key: Key | null; + readonly props: any; + readonly content: ReadonlyArray; + } + + interface ElementNode extends VNode { + readonly type: T; + readonly props: Props; + } + + interface ComponentNode

extends VNode { + readonly type: Component

; + readonly props: P & IntrinsicProps; + } + + interface ComponentClassNode

extends VNode { + readonly type: ComponentClass

; + readonly props: P & IntrinsicProps; + } + + interface FunctionComponentNode

extends VNode { + readonly type: FunctionComponent

element with both text content and child elements, using HyperScript syntax and JSX syntax + */ +export function testHtmlElementWithMixedContent() { + // HyperScript syntax returns an ElementNode object, with typed properties + const formNode = h( + "form", + { key: 1, method: "POST", onsubmit: eventHandler }, + "Hello ", h("span", null, "World") + ); + + assertEqual(formNode.isSVG, false); + assertEqual(formNode.type, "form"); + assertEqual(formNode.key, 1); + assertEqual(formNode.props.method, "POST"); + assertEqual(formNode.props.onsubmit, eventHandler); + assertEqual(formNode.content.length, 2); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = Hello World; + const jsxNodeType = jsxNode.type as string; + const jsxNodeProps = jsxNode.props as PetitDom.Props; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, "form"); + assertEqual(jsxNode.key, 1); + assertEqual(jsxNodeProps.method, "POST"); + assertEqual(jsxNodeProps.onsubmit, eventHandler); + assertEqual(jsxNode.content.length, 2); +} + +/** + * Create an element with a child element, using HyperScript syntax and JSX syntax + */ +export function testSvgElementWithChild() { + // HyperScript syntax returns an ElementNode object, with typed properties + const svgNode = h("svg", { key: 2, currentScale: 1 }, h("path")); + + assertEqual(svgNode.isSVG, true); + assertEqual(svgNode.type, "svg"); + assertEqual(svgNode.key, 2); + assertEqual(svgNode.props.currentScale, 1); + assertEqual(svgNode.content.length, 1); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ; + const jsxNodeType = jsxNode.type as string; + const jsxNodeProps = jsxNode.props as PetitDom.Props; + + assertEqual(jsxNode.isSVG, true); + assertEqual(jsxNodeType, "svg"); + assertEqual(jsxNode.key, 2); + assertEqual(jsxNodeProps.currentScale, 1); + assertEqual(jsxNode.content.length, 1); +} + +/** + * Create a function component, using HyperScript syntax and JSX syntax + */ +export function testFunctionComponent() { + function FunctionComponent(): JSX.Element { + return
Hello World
; + } + + // HyperScript syntax returns a FunctionComponentNode object, with typed properties + const node = h(FunctionComponent, { key: "1" }); + + assertEqual(node.isSVG, false); + assertEqual(node.type, FunctionComponent); + assertEqual(node.key, "1"); + assertEqual(node.props.key, "1"); + assertEqual(node.content.length, 0); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ; + const jsxNodeType = jsxNode.type as PetitDom.FunctionComponent<{}>; + const jsxNodeProps = jsxNode.props as PetitDom.IntrinsicProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, FunctionComponent); + assertEqual(jsxNode.key, "1"); + assertEqual(jsxNodeProps.key, "1"); + assertEqual(jsxNode.content.length, 0); +} + +/** + * Create a function component with props, using HyperScript syntax and JSX syntax + */ +export function testFunctionComponentWithProps() { + function FunctionComponentWithProps(props: CustomProps): JSX.Element { + const { name, count, onSomeEvent } = props; + return
; + } + + // HyperScript syntax returns a FunctionComponentNode object, with typed properties + const node = h(FunctionComponentWithProps, { name: "xyz", count: 123, onSomeEvent: eventHandler }); + + assertEqual(node.isSVG, false); + assertEqual(node.type, FunctionComponentWithProps); + assertEqual(node.key, null); + assertEqual(node.props.name, "xyz"); + assertEqual(node.props.count, 123); + assertEqual(node.props.onSomeEvent, eventHandler); + assertEqual(node.content.length, 0); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ; + const jsxNodeType = jsxNode.type as PetitDom.FunctionComponent; + const jsxNodeProps = jsxNode.props as CustomProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, FunctionComponentWithProps); + assertEqual(jsxNode.key, null); + assertEqual(jsxNodeProps.name, "xyz"); + assertEqual(jsxNodeProps.count, 123); + assertEqual(jsxNodeProps.onSomeEvent, eventHandler); + assertEqual(jsxNode.content.length, 0); +} + +/** + * Create a function component with child content, using HyperScript syntax and JSX syntax + */ +export function testFunctionComponentWithChildren() { + function FunctionComponentWithChildren(props: CustomProps, content: ReadonlyArray): JSX.Element { + const { name, count, onSomeEvent } = props; + return
{content}
; + } + + // HyperScript syntax returns a FunctionComponentNode object, with typed properties + const node = h( + FunctionComponentWithChildren, + { name: "xyz", count: 123, onSomeEvent: eventHandler }, + "Hello", + h("span", null, "World") + ); + + assertEqual(node.isSVG, false); + assertEqual(node.type, FunctionComponentWithChildren); + assertEqual(node.key, null); + assertEqual(node.props.name, "xyz"); + assertEqual(node.props.count, 123); + assertEqual(node.props.onSomeEvent, eventHandler); + assertEqual(node.content.length, 2); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ( + + Hello World + + ); + const jsxNodeType = jsxNode.type as PetitDom.FunctionComponent; + const jsxNodeProps = jsxNode.props as CustomProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, FunctionComponentWithChildren); + assertEqual(jsxNode.key, null); + assertEqual(jsxNodeProps.name, "xyz"); + assertEqual(jsxNodeProps.count, 123); + assertEqual(jsxNodeProps.onSomeEvent, eventHandler); + assertEqual(jsxNode.content.length, 2); +} + +/** + * Create a component class, using HyperScript syntax and JSX syntax + */ +export function testComponentClass() { + class ComponentClass { + props = {}; + + mount(): Element { + return mount(
); + } + + patch(element: Element, newProps: object, oldProps: object, newContent: ReadonlyArray, oldContent: ReadonlyArray): Element { + patch( +
{oldContent}
, +
{newContent}
+ ); + return element; + } + + unmount(element: Element): void { + unmount(
Hello World
); + } + } + + // HyperScript syntax returns a ComponentClassNode object, with typed properties + const node = h(ComponentClass, { key: "1" }); + + assertEqual(node.isSVG, false); + assertEqual(node.type, ComponentClass); + assertEqual(node.key, "1"); + assertEqual(node.props.key, "1"); + assertEqual(node.content.length, 0); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ; + const jsxNodeType = jsxNode.type as PetitDom.ComponentClass<{}>; + const jsxNodeProps = jsxNode.props as PetitDom.IntrinsicProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, ComponentClass); + assertEqual(jsxNode.key, "1"); + assertEqual(jsxNodeProps.key, "1"); + assertEqual(jsxNode.content.length, 0); +} + +/** + * Create a component class with props, using HyperScript syntax and JSX syntax + */ +export function testComponentClassWithProps() { + class ComponentClassWithProps { + props: CustomProps; + + constructor(props: CustomProps) { + this.props = props; + } + + mount(props: CustomProps): Element { + const { name, count, onSomeEvent } = props; + return mount(
); + } + + patch(element: Element, newProps: CustomProps, oldProps: CustomProps, newContent: ReadonlyArray, oldContent: ReadonlyArray): Element { + patch( +
{oldContent}
, +
{newContent}
+ ); + return element; + } + + unmount(element: Element): void { + unmount(
Hello World
); + } + } + + // HyperScript syntax returns a ComponentClassNode object, with typed properties + const node = h(ComponentClassWithProps, { name: "xyz", count: 123, onSomeEvent: eventHandler }); + + assertEqual(node.isSVG, false); + assertEqual(node.type, ComponentClassWithProps); + assertEqual(node.key, null); + assertEqual(node.props.name, "xyz"); + assertEqual(node.props.count, 123); + assertEqual(node.props.onSomeEvent, eventHandler); + assertEqual(node.content.length, 0); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ; + const jsxNodeType = jsxNode.type as PetitDom.ComponentClass; + const jsxNodeProps = jsxNode.props as CustomProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, ComponentClassWithProps); + assertEqual(jsxNode.key, null); + assertEqual(jsxNodeProps.name, "xyz"); + assertEqual(jsxNodeProps.count, 123); + assertEqual(jsxNodeProps.onSomeEvent, eventHandler); + assertEqual(jsxNode.content.length, 0); +} + +/** + * Create a component class with child content, using HyperScript syntax and JSX syntax + */ +export function testComponentClassWithChildren() { + class ComponentClassWithChildren { + props: CustomProps; + + constructor(props: CustomProps) { + this.props = props; + } + + mount(props: CustomProps, content: ReadonlyArray): Element { + const { name, count, onSomeEvent } = props; + return mount( +
{content}
+ ); + } + + patch(element: Element, newProps: CustomProps, oldProps: CustomProps, newContent: ReadonlyArray, oldContent: ReadonlyArray): Element { + patch( +
{oldContent}
, +
{newContent}
+ ); + return element; + } + + unmount(element: Element): void { + unmount(
Hello World
); + } + } + + // HyperScript syntax returns a ComponentClassNode object, with typed properties + const node = h( + ComponentClassWithChildren, + { name: "xyz", count: 123, onSomeEvent: eventHandler }, + "Hello", + h("span", null, "World") + ); + + assertEqual(node.isSVG, false); + assertEqual(node.type, ComponentClassWithChildren); + assertEqual(node.key, null); + assertEqual(node.props.name, "xyz"); + assertEqual(node.props.count, 123); + assertEqual(node.props.onSomeEvent, eventHandler); + assertEqual(node.content.length, 2); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = ( + + Hello World + + ); + const jsxNodeType = jsxNode.type as PetitDom.ComponentClass; + const jsxNodeProps = jsxNode.props as CustomProps; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, ComponentClassWithChildren); + assertEqual(jsxNode.key, null); + assertEqual(jsxNodeProps.name, "xyz"); + assertEqual(jsxNodeProps.count, 123); + assertEqual(jsxNodeProps.onSomeEvent, eventHandler); + assertEqual(jsxNode.content.length, 2); +} diff --git a/types/petit-dom/tsconfig.json b/types/petit-dom/tsconfig.json new file mode 100644 index 0000000000..203b451193 --- /dev/null +++ b/types/petit-dom/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "petit-dom-tests.tsx" + ] +} diff --git a/types/petit-dom/tslint.json b/types/petit-dom/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/petit-dom/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 1bcbf71b93f09c4a7f29d7f60a18c6dc99d6aa4d Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 15:54:45 +0100 Subject: [PATCH 0065/2268] Fix error in list type --- types/prompts/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 7aa3f2ea63..a10a7ba243 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY // Daniel Perez Alvarez +// Kamontat Chantrachirathumrong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -47,6 +48,7 @@ declare namespace prompts { interface Choice { title: string; value: string; + disable?: boolean; } interface Options { @@ -58,7 +60,7 @@ declare namespace prompts { type: ValueOrFunc; name: ValueOrFunc; message?: ValueOrFunc; - initial?: string; + initial?: string | number; style?: string; format?: PrevCaller; validate?: PrevCaller; From a34223bc90cabd779bcbb14c2d9685206c52d87d Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 15:57:20 +0100 Subject: [PATCH 0066/2268] [release] Increase prompts version 1.2 --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index a10a7ba243..447d67d557 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for prompts 1.1 +// Type definitions for prompts 1.2 // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY // Daniel Perez Alvarez From a2c196471f30c373a6127ea47bc23c7973f0a454 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 16:00:36 +0100 Subject: [PATCH 0067/2268] [improve] Add boolean as initial message --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 447d67d557..d68f63af8e 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -60,7 +60,7 @@ declare namespace prompts { type: ValueOrFunc; name: ValueOrFunc; message?: ValueOrFunc; - initial?: string | number; + initial?: string | number | boolean; style?: string; format?: PrevCaller; validate?: PrevCaller; From 218607fa1be6d4394178f76e9bc490fcc46e38b5 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sat, 24 Nov 2018 16:06:46 +0100 Subject: [PATCH 0068/2268] [improve] Add falsy type to skip the question --- types/prompts/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index d68f63af8e..e4e2fbca80 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -57,7 +57,7 @@ declare namespace prompts { } interface PromptObject { - type: ValueOrFunc; + type: ValueOrFunc | Falsy; name: ValueOrFunc; message?: ValueOrFunc; initial?: string | number | boolean; @@ -86,6 +86,8 @@ declare namespace prompts { values: Answers, prompt: PromptObject ) => R; + + type Falsy = false | null | undefined; type ValueOrFunc = T | PrevCaller; } From 09832c50db44a2c8da4d4e330e0a61917fe32ec1 Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Sun, 25 Nov 2018 13:34:03 +0100 Subject: [PATCH 0069/2268] [fix] Remove trail space --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index e4e2fbca80..bfb08a8bd7 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -86,7 +86,7 @@ declare namespace prompts { values: Answers, prompt: PromptObject ) => R; - + type Falsy = false | null | undefined; type ValueOrFunc = T | PrevCaller; From 4b3cd54ddfe0e9d043f96b976b5d060e5a151e6d Mon Sep 17 00:00:00 2001 From: Carlos Date: Sun, 25 Nov 2018 18:57:49 +0100 Subject: [PATCH 0070/2268] feat(types): adds mixpanel-browser types --- types/mixpanel-browser/index.d.ts | 105 ++++++++++++++++++ .../mixpanel-browser-tests.ts | 91 +++++++++++++++ types/mixpanel-browser/tsconfig.json | 23 ++++ types/mixpanel-browser/tslint.json | 1 + 4 files changed, 220 insertions(+) create mode 100644 types/mixpanel-browser/index.d.ts create mode 100644 types/mixpanel-browser/mixpanel-browser-tests.ts create mode 100644 types/mixpanel-browser/tsconfig.json create mode 100644 types/mixpanel-browser/tslint.json diff --git a/types/mixpanel-browser/index.d.ts b/types/mixpanel-browser/index.d.ts new file mode 100644 index 0000000000..ff4daf4240 --- /dev/null +++ b/types/mixpanel-browser/index.d.ts @@ -0,0 +1,105 @@ +// Type definitions for mixpanel-browser 2.23 +// Project: https://github.com/mixpanel/mixpanel-js +// Definitions by: Carlos López +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export type Persistence = 'cookie' | 'localStorage'; + +export type PushItem = Array; + +export interface Dict {[key: string]: any; } + +export interface XhrHeadersDef {[header: string]: any; } + +export interface HasOptedInOutOptions { + persistence_type: Persistence; + cookie_prefix: string; +} + +export interface ClearOptOutInOutOptions extends HasOptedInOutOptions { + cookie_expiration: number; + cross_subdomain_cookie: boolean; + secure_cookie: boolean; +} + +export interface InTrackingOptions extends ClearOptOutInOutOptions { + track: () => void; + track_event_name: string; + track_event_properties: Dict; +} + +export interface OutTrackingOptions extends ClearOptOutInOutOptions { + delete_user: boolean; +} + +export interface Config { + api_host: string; + app_host: string; + autrotrack: boolean; + cdn: string; + cross_subdomain_cookie: boolean; + persistence: Persistence; + persistence_name: string; + cookie_name: string; + loaded: (mixpanel: MixPanel) => void; + store_google: boolean; + save_referrer: boolean; + test: boolean; + verbose: boolean; + img: boolean; + track_pageview: boolean; + debug: boolean; + track_links_timeout: number; + cookie_expiration: number; + upgrade: boolean; + disable_persistence: boolean; + disable_cookie: boolean; + secure_cookie: boolean; + ip: boolean; + property_blacklist: string[]; + xhr_headers: XhrHeadersDef; + opt_out_tracking_by_default: boolean; + opt_out_tracking_persistence_type: Persistence; + opt_out_tracking_cookie_prefix: string; +} + +export interface People { + set(prop: Dict | string, to?: any, callback?: () => void): void; + set_once(prop: Dict | string, to?: any, callback?: () => void): void; + unset(prop: string[] | string, callback?: () => void): void; + increment(prop: Dict | string, by?: number, callback?: () => void): void; + append(prop: Dict | string, value?: any, callback?: () => void): void; + union(prop: Dict | string, value?: any, callback?: () => void): void; + track_charge(amount: number, properties?: Dict, callback?: () => void): void; + clear_charges(callback?: () => void): void; + delete_user(): void; +} + +export interface MixPanel { + alias(alias: string, original?: string): void; + clear_opt_in_out_tracking(options?: Partial): void; + disable(events?: string[]): void; + get_config(prop_name?: string): any; + get_distinct_id(): any; + get_property(property_name: string): any; + has_opted_in_tracking(options?: Partial): boolean; + has_opted_out_tracking(options?: Partial): boolean; + identify(unique_id?: string): any; + init(token: string, config?: Partial, name?: string): MixPanel; + opt_in_tracking(options?: Partial): void; + opt_out_tracking(options?: Partial): void; + push(item: PushItem): void; + register(props: Dict, days?: number): void; + register_once(props: Dict, default_value?: any, days?: number): void; + reset(): void; + set_config(config: Partial): void; + time_event(event_name: string): void; + track(event_name: string, properties?: Dict, callback?: () => void): void; + track_forms(query: string, event_name: string, properties?: Dict | (() => void)): void; + track_links(query: string, event_name: string, properties?: Dict | (() => void)): void; + unregister(property: string): void; + people: People; +} + +export const mixpanel: MixPanel; diff --git a/types/mixpanel-browser/mixpanel-browser-tests.ts b/types/mixpanel-browser/mixpanel-browser-tests.ts new file mode 100644 index 0000000000..046b96db5c --- /dev/null +++ b/types/mixpanel-browser/mixpanel-browser-tests.ts @@ -0,0 +1,91 @@ +import { mixpanel } from 'mixpanel-browser'; + +const lib = mixpanel.init('new token', { secure_cookie: true }, 'library_name'); +lib.track('event name'); +mixpanel.push(['register', { a: 'b' }]); +mixpanel.disable(); +mixpanel.track('Registered', {Gender: 'Male', Age: 21}); +mixpanel.track_links('#nav', 'Clicked Nav Link'); +mixpanel.track_forms('#register', 'Created Account'); +mixpanel.time_event('Registered'); +mixpanel.track('Registered', {Gender: 'Male', Age: 21}); +mixpanel.register({Gender: 'Female'}); +mixpanel.register({ + Email: 'jdoe@example.com', + 'Account Type': 'Free' +}); +mixpanel.register_once({ + 'First Login Date': new Date().toISOString() +}); +mixpanel.init('YOUR PROJECT TOKEN', { + loaded: (mixpanel) => { + const distinct_id = mixpanel.get_distinct_id(); + } +}); +mixpanel.alias('new_id', 'existing_id'); +mixpanel.alias('newer_id', 'new_id'); +mixpanel.init('YOUR PROJECT TOKEN', { + loaded: (mixpanel) => { + const user_id = mixpanel.get_property('user_id'); + } +}); +mixpanel.opt_in_tracking(); +mixpanel.opt_in_tracking({ + track_event_name: 'User opted in', + track_event_properties: { + Email: 'jdoe@example.com' + }, + cookie_expiration: 30, + secure_cookie: true +}); +mixpanel.opt_out_tracking(); +mixpanel.opt_out_tracking({ + cookie_expiration: 30, + secure_cookie: true +}); +const has_opted_in = mixpanel.has_opted_in_tracking(); +const has_opted_out = mixpanel.has_opted_out_tracking(); +mixpanel.clear_opt_in_out_tracking(); +mixpanel.clear_opt_in_out_tracking({ + cookie_expiration: 30, + secure_cookie: true +}); +mixpanel.people.set('gender', 'm'); +mixpanel.people.set({ + Company: 'Acme', + Plan: 'Premium', + 'Upgrade date': new Date() +}); +mixpanel.people.set_once('First Login Date', new Date()); +mixpanel.people.set_once({ + 'First Login Date': new Date(), + 'Starting Plan': 'Premium' +}); +mixpanel.people.unset('gender'); +mixpanel.people.unset(['gender', 'Company']); +mixpanel.people.increment('page_views', 1); +mixpanel.people.increment('page_views'); +mixpanel.people.increment('credits_left', -1); +mixpanel.people.increment({ + counter1: 1, + counter2: 6 +}); +mixpanel.people.append('pages_visited', 'homepage'); +mixpanel.people.append({ + list1: 'bob', + list2: 123 +}); +mixpanel.people.union('pages_visited', 'homepage'); +mixpanel.people.union({ + list1: 'bob', + list2: 123 +}); +mixpanel.people.union({ + list1: ['bob', 'billy'] +}); +mixpanel.people.track_charge(50); +mixpanel.people.track_charge(30.50, { + $time: new Date('jan 1 2012') +}); +mixpanel.people.clear_charges(); +mixpanel.people.delete_user(); diff --git a/types/mixpanel-browser/tsconfig.json b/types/mixpanel-browser/tsconfig.json new file mode 100644 index 0000000000..da5a025e50 --- /dev/null +++ b/types/mixpanel-browser/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", + "mixpanel-browser-tests.ts" + ] +} diff --git a/types/mixpanel-browser/tslint.json b/types/mixpanel-browser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mixpanel-browser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b01b70a1f8357e8f2ca228627ff0cf78ff42c697 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Mon, 26 Nov 2018 16:53:27 +0900 Subject: [PATCH 0071/2268] Add is-buffer --- types/is-buffer/index.d.ts | 10 ++++++++++ types/is-buffer/is-buffer-tests.ts | 18 ++++++++++++++++++ types/is-buffer/tsconfig.json | 23 +++++++++++++++++++++++ types/is-buffer/tslint.json | 1 + 4 files changed, 52 insertions(+) create mode 100644 types/is-buffer/index.d.ts create mode 100644 types/is-buffer/is-buffer-tests.ts create mode 100644 types/is-buffer/tsconfig.json create mode 100644 types/is-buffer/tslint.json diff --git a/types/is-buffer/index.d.ts b/types/is-buffer/index.d.ts new file mode 100644 index 0000000000..3d5c2cdbc0 --- /dev/null +++ b/types/is-buffer/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for is-buffer 2.0 +// Project: https://github.com/feross/is-buffer#readme +// Definitions by: Junyoung Choi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare function isBuffer(obj: any): boolean; + +export = isBuffer; diff --git a/types/is-buffer/is-buffer-tests.ts b/types/is-buffer/is-buffer-tests.ts new file mode 100644 index 0000000000..4fb1295a07 --- /dev/null +++ b/types/is-buffer/is-buffer-tests.ts @@ -0,0 +1,18 @@ +import isBuffer = require('is-buffer'); + +let booleanResult: boolean = isBuffer(Buffer.alloc(4)); +booleanResult = isBuffer(Buffer.allocUnsafeSlow(100)); +booleanResult = isBuffer(undefined); +booleanResult = isBuffer(null); +booleanResult = isBuffer(''); +booleanResult = isBuffer(true); +booleanResult = isBuffer(false); +booleanResult = isBuffer(0); +booleanResult = isBuffer(1); +booleanResult = isBuffer(1.0); +booleanResult = isBuffer('string'); +booleanResult = isBuffer({}); +booleanResult = isBuffer([]); +booleanResult = isBuffer(function foo() {}); +booleanResult = isBuffer({ isBuffer: null }); +booleanResult = isBuffer({ isBuffer() { throw new Error(); } }); diff --git a/types/is-buffer/tsconfig.json b/types/is-buffer/tsconfig.json new file mode 100644 index 0000000000..0da0f3cdc3 --- /dev/null +++ b/types/is-buffer/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-buffer-tests.ts" + ] +} diff --git a/types/is-buffer/tslint.json b/types/is-buffer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-buffer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f26696ad1980206be1efc54f1f407b067801a5a7 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 26 Nov 2018 15:32:07 +0100 Subject: [PATCH 0072/2268] add typings for open-apifactory --- types/openapi-factory/index.d.ts | 49 +++++++++++++++++++ .../openapi-factory/openapi-factory-tests.ts | 25 ++++++++++ types/openapi-factory/tsconfig.json | 23 +++++++++ types/openapi-factory/tslint.json | 3 ++ 4 files changed, 100 insertions(+) create mode 100644 types/openapi-factory/index.d.ts create mode 100644 types/openapi-factory/openapi-factory-tests.ts create mode 100644 types/openapi-factory/tsconfig.json create mode 100644 types/openapi-factory/tslint.json diff --git a/types/openapi-factory/index.d.ts b/types/openapi-factory/index.d.ts new file mode 100644 index 0000000000..6cb22f7194 --- /dev/null +++ b/types/openapi-factory/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for openapi-factory 4.2 +// Project: https://github.com/wparad/openapi-factory.js +// Definitions by: Daan Boerlage +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace OpenApi { + interface OpenApiOptions { + requestMiddleware?: () => any; + responseMiddleware?: () => any; + errorMiddleware?: () => any; + } +} + +declare class OpenApi { + constructor(options: OpenApi.OpenApiOptions, overrideLogger?: () => void); + + setAuthorizer(authorizerFunc: (req?: any) => any): void; + onEvent(onEventFunc: (req?: any) => any): void; + onSchedule(onScheduleFunc: (req?: any) => any): void; + + head(route: string, p0: (req?: any) => any): void; + head(route: string, p0: object, p1: (req?: any) => any): void; + + get(route: string, p0: (req?: any) => any): void; + get(route: string, p0: object, p1: (req?: any) => any): void; + + post(route: string, p0: (req?: any) => any): void; + post(route: string, p0: object, p1: (req?: any) => any): void; + + put(route: string, p0: (req?: any) => any): void; + put(route: string, p0: object, p1: (req?: any) => any): void; + + patch(route: string, p0: (req?: any) => any): void; + patch(route: string, p0: object, p1: (req?: any) => any): void; + + delete(route: string, p0: (req?: any) => any): void; + delete(route: string, p0: object, p1: (req?: any) => any): void; + + options(route: string, p0: (req?: any) => any): void; + options(route: string, p0: object, p1: (req?: any) => any): void; + + any(route: string, p0: (req?: any) => any): void; + any(route: string, p0: object, p1: (req?: any) => any): void; + + handler(event: object, context: object): Promise; +} + +export = OpenApi; diff --git a/types/openapi-factory/openapi-factory-tests.ts b/types/openapi-factory/openapi-factory-tests.ts new file mode 100644 index 0000000000..13e1e0e7cc --- /dev/null +++ b/types/openapi-factory/openapi-factory-tests.ts @@ -0,0 +1,25 @@ +import * as OpenApiFactory from 'openapi-factory'; + +const api = new OpenApiFactory({}); + +api.setAuthorizer((req: any) => req); +api.onEvent((req: any) => req); +api.onSchedule((req: any) => req); + +api.head('/v1/test', () => 'success'); +api.get('/v1/test', () => 'success'); +api.post('/v1/test', () => 'success'); +api.put('/v1/test', () => 'success'); +api.patch('/v1/test', () => 'success'); +api.delete('/v1/test', () => 'success'); +api.options('/v1/test', () => 'success'); +api.any('/v1/test2', () => 'success'); + +api.head('/v2/test', {test: true}, () => 'success'); +api.get('/v2/test', {test: true}, () => 'success'); +api.post('/v2/test', {test: true}, () => 'success'); +api.put('/v2/test', {test: true}, () => 'success'); +api.patch('/v2/test', {test: true}, () => 'success'); +api.delete('/v2/test', {test: true}, () => 'success'); +api.options('/v2/test', {test: true}, () => 'success'); +api.any('/v2/test2', {test: true}, () => 'success'); diff --git a/types/openapi-factory/tsconfig.json b/types/openapi-factory/tsconfig.json new file mode 100644 index 0000000000..e8528e8e84 --- /dev/null +++ b/types/openapi-factory/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", + "openapi-factory-tests.ts" + ] +} diff --git a/types/openapi-factory/tslint.json b/types/openapi-factory/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/openapi-factory/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 7bba952b5759fceb1b6307c807482380600047b5 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 26 Nov 2018 18:29:53 +0100 Subject: [PATCH 0073/2268] [openapi-factory] fix http methods param typings --- types/openapi-factory/index.d.ts | 52 +++++++++++-------- .../openapi-factory/openapi-factory-tests.ts | 36 +++++++------ 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/types/openapi-factory/index.d.ts b/types/openapi-factory/index.d.ts index 6cb22f7194..e41958e6df 100644 --- a/types/openapi-factory/index.d.ts +++ b/types/openapi-factory/index.d.ts @@ -5,43 +5,53 @@ // TypeScript Version: 2.2 declare namespace OpenApi { - interface OpenApiOptions { + interface ApiOptions { requestMiddleware?: () => any; responseMiddleware?: () => any; errorMiddleware?: () => any; } + + interface HttpMethodOptions { + rawBody?: boolean; + } + + interface HttpResponse { + statusCode?: number; + headers?: object; + body?: (object | string); + } } declare class OpenApi { - constructor(options: OpenApi.OpenApiOptions, overrideLogger?: () => void); + constructor(options: OpenApi.ApiOptions, overrideLogger?: () => void); - setAuthorizer(authorizerFunc: (req?: any) => any): void; - onEvent(onEventFunc: (req?: any) => any): void; - onSchedule(onScheduleFunc: (req?: any) => any): void; + setAuthorizer(authorizerFunc: (req?: any) => Promise): void; + onEvent(onEventFunc: (req?: any) => Promise): void; + onSchedule(onScheduleFunc: (req?: any) => Promise): void; - head(route: string, p0: (req?: any) => any): void; - head(route: string, p0: object, p1: (req?: any) => any): void; + head(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + head(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: any) => any): void; - get(route: string, p0: (req?: any) => any): void; - get(route: string, p0: object, p1: (req?: any) => any): void; + get(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + get(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - post(route: string, p0: (req?: any) => any): void; - post(route: string, p0: object, p1: (req?: any) => any): void; + post(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + post(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - put(route: string, p0: (req?: any) => any): void; - put(route: string, p0: object, p1: (req?: any) => any): void; + put(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + put(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - patch(route: string, p0: (req?: any) => any): void; - patch(route: string, p0: object, p1: (req?: any) => any): void; + patch(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + patch(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - delete(route: string, p0: (req?: any) => any): void; - delete(route: string, p0: object, p1: (req?: any) => any): void; + delete(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + delete(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - options(route: string, p0: (req?: any) => any): void; - options(route: string, p0: object, p1: (req?: any) => any): void; + options(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + options(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; - any(route: string, p0: (req?: any) => any): void; - any(route: string, p0: object, p1: (req?: any) => any): void; + any(route: string, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; + any(route: string, options: OpenApi.HttpMethodOptions, handler: (req?: object) => (OpenApi.HttpResponse | Promise)): void; handler(event: object, context: object): Promise; } diff --git a/types/openapi-factory/openapi-factory-tests.ts b/types/openapi-factory/openapi-factory-tests.ts index 13e1e0e7cc..ad24a5021d 100644 --- a/types/openapi-factory/openapi-factory-tests.ts +++ b/types/openapi-factory/openapi-factory-tests.ts @@ -6,20 +6,24 @@ api.setAuthorizer((req: any) => req); api.onEvent((req: any) => req); api.onSchedule((req: any) => req); -api.head('/v1/test', () => 'success'); -api.get('/v1/test', () => 'success'); -api.post('/v1/test', () => 'success'); -api.put('/v1/test', () => 'success'); -api.patch('/v1/test', () => 'success'); -api.delete('/v1/test', () => 'success'); -api.options('/v1/test', () => 'success'); -api.any('/v1/test2', () => 'success'); +const testReponse = { + statusCode: 200 +}; -api.head('/v2/test', {test: true}, () => 'success'); -api.get('/v2/test', {test: true}, () => 'success'); -api.post('/v2/test', {test: true}, () => 'success'); -api.put('/v2/test', {test: true}, () => 'success'); -api.patch('/v2/test', {test: true}, () => 'success'); -api.delete('/v2/test', {test: true}, () => 'success'); -api.options('/v2/test', {test: true}, () => 'success'); -api.any('/v2/test2', {test: true}, () => 'success'); +api.head('/v1/test', () => testReponse); +api.get('/v1/test', () => testReponse); +api.post('/v1/test', () => testReponse); +api.put('/v1/test', () => testReponse); +api.patch('/v1/test', () => testReponse); +api.delete('/v1/test', () => testReponse); +api.options('/v1/test', () => testReponse); +api.any('/v1/test2', () => testReponse); + +api.head('/v2/test', { rawBody: true }, () => testReponse); +api.get('/v2/test', { rawBody: true }, () => testReponse); +api.post('/v2/test', { rawBody: true }, () => testReponse); +api.put('/v2/test', { rawBody: true }, () => testReponse); +api.patch('/v2/test', { rawBody: true }, () => testReponse); +api.delete('/v2/test', { rawBody: true }, () => testReponse); +api.options('/v2/test', { rawBody: true }, () => testReponse); +api.any('/v2/test2', { rawBody: true }, () => testReponse); From 7a69b991ef4979496e1030d8fe0de0dd9b52b805 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 26 Nov 2018 18:47:18 +0100 Subject: [PATCH 0074/2268] fix() --- types/mixpanel-browser/index.d.ts | 30 ++++++++++++++++--- .../mixpanel-browser-tests.ts | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/types/mixpanel-browser/index.d.ts b/types/mixpanel-browser/index.d.ts index ff4daf4240..c976330177 100644 --- a/types/mixpanel-browser/index.d.ts +++ b/types/mixpanel-browser/index.d.ts @@ -42,7 +42,7 @@ export interface Config { persistence: Persistence; persistence_name: string; cookie_name: string; - loaded: (mixpanel: MixPanel) => void; + loaded: (mixpanel: Mixpanel) => void; store_google: boolean; save_referrer: boolean; test: boolean; @@ -76,7 +76,7 @@ export interface People { delete_user(): void; } -export interface MixPanel { +export interface Mixpanel { alias(alias: string, original?: string): void; clear_opt_in_out_tracking(options?: Partial): void; disable(events?: string[]): void; @@ -86,7 +86,7 @@ export interface MixPanel { has_opted_in_tracking(options?: Partial): boolean; has_opted_out_tracking(options?: Partial): boolean; identify(unique_id?: string): any; - init(token: string, config?: Partial, name?: string): MixPanel; + init(token: string, config?: Partial, name?: string): Mixpanel; opt_in_tracking(options?: Partial): void; opt_out_tracking(options?: Partial): void; push(item: PushItem): void; @@ -102,4 +102,26 @@ export interface MixPanel { people: People; } -export const mixpanel: MixPanel; +export function alias(alias: string, original?: string): void; +export function clear_opt_in_out_tracking(options?: Partial): void; +export function disable(events?: string[]): void; +export function get_config(prop_name?: string): any; +export function get_distinct_id(): any; +export function get_property(property_name: string): any; +export function has_opted_in_tracking(options?: Partial): boolean; +export function has_opted_out_tracking(options?: Partial): boolean; +export function identify(unique_id?: string): any; +export function init(token: string, config?: Partial, name?: string): Mixpanel; +export function opt_in_tracking(options?: Partial): void; +export function opt_out_tracking(options?: Partial): void; +export function push(item: PushItem): void; +export function register(props: Dict, days?: number): void; +export function register_once(props: Dict, default_value?: any, days?: number): void; +export function reset(): void; +export function set_config(config: Partial): void; +export function time_event(event_name: string): void; +export function track(event_name: string, properties?: Dict, callback?: () => void): void; +export function track_forms(query: string, event_name: string, properties?: Dict | (() => void)): void; +export function track_links(query: string, event_name: string, properties?: Dict | (() => void)): void; +export function unregister(property: string): void; +export const people: People; diff --git a/types/mixpanel-browser/mixpanel-browser-tests.ts b/types/mixpanel-browser/mixpanel-browser-tests.ts index 046b96db5c..e43c7cd47e 100644 --- a/types/mixpanel-browser/mixpanel-browser-tests.ts +++ b/types/mixpanel-browser/mixpanel-browser-tests.ts @@ -1,4 +1,4 @@ -import { mixpanel } from 'mixpanel-browser'; +import mixpanel = require('mixpanel-browser'); const lib = mixpanel.init('new token', { secure_cookie: true }, 'library_name'); lib.track('event name'); From 70d843fd2fd329ad7e3ab49364cfa5bf437643cb Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Mon, 26 Nov 2018 19:50:25 +0100 Subject: [PATCH 0075/2268] Add Typings for microservice-utilities --- types/microservice-utilities/index.d.ts | 84 +++++++++++++++++++ .../microservice-utilities-tests.ts | 13 +++ types/microservice-utilities/tsconfig.json | 23 +++++ types/microservice-utilities/tslint.json | 3 + 4 files changed, 123 insertions(+) create mode 100644 types/microservice-utilities/index.d.ts create mode 100644 types/microservice-utilities/microservice-utilities-tests.ts create mode 100644 types/microservice-utilities/tsconfig.json create mode 100644 types/microservice-utilities/tslint.json diff --git a/types/microservice-utilities/index.d.ts b/types/microservice-utilities/index.d.ts new file mode 100644 index 0000000000..e8ccb9284e --- /dev/null +++ b/types/microservice-utilities/index.d.ts @@ -0,0 +1,84 @@ +// Type definitions for microservice-utilities 0.1 +// Project: https://github.com/Cimpress-MCP/microservice-utilities.js +// Definitions by: Daan Boerlage +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Authorizer + */ + +export interface AuthorizerConfiguration { + jwkKeyListUrl: string; + authorizerContextResolver?: string; +} + +export interface AuthorizerPolicy { + principalId: string; + policyDocument: object; +} + +export class Authorizer { + constructor(logFunction: (msg: any) => void, configuration: AuthorizerConfiguration); + getPolicy(request: object): Promise; +} + +/** + * PlatformClient + */ + +export interface PlatformClientConfiguration { + client: object; +} + +export interface PlatformClientResponse { + data?: any; + status: number; + statusText: string; + headers: any; + config: object; + request?: any; +} + +export class PlatformClient { + constructor(logFunction: (msg: any) => void, tokenResolverFunction?: Promise<() => string>, configuration?: PlatformClientConfiguration) + get(url: string, headers?: object, type?: string): Promise; + post(url: string, data: object, headers?: object): Promise; + put(url: string, data: object, headers?: object): Promise; + patch(url: string, data: object, headers?: object): Promise; + delete(url: string, headers?: object): Promise; + head(url: string, headers?: object): Promise; + options(url: string, headers?: object): Promise; +} + +/** + * RequestLogger + */ + +export interface RequestLoggerConfiguration { + logFunction?: (msg: any) => void; + extendErrorObjects?: boolean; + jsonSpace?: number; +} + +export class RequestLogger { + constructor(configuration?: RequestLoggerConfiguration); + log(msg: any): void; +} + +/** + * ServiceTokenProvider + */ + +export interface ServiceTokenProviderConfiguration { + clientId: string; + encryptedClientSecret: string; + audience: string; + tokenEndpoint: string; +} + +export class ServiceTokenProvider { + constructor(httpClient: object, kmsClient: object, configuration?: ServiceTokenProviderConfiguration); + getToken(): Promise; + getTokenWithoutCache(): Promise; +} diff --git a/types/microservice-utilities/microservice-utilities-tests.ts b/types/microservice-utilities/microservice-utilities-tests.ts new file mode 100644 index 0000000000..3563e7fa8e --- /dev/null +++ b/types/microservice-utilities/microservice-utilities-tests.ts @@ -0,0 +1,13 @@ +import { Authorizer, PlatformClient, RequestLogger, ServiceTokenProvider } from 'microservice-utilities'; + +const authorizer = new Authorizer((msg: any) => msg, {jwkKeyListUrl: 'aaa'}); +const authorizerPolicy = authorizer.getPolicy({test: true}); + +const platformClient = new PlatformClient((msg: any) => msg); +platformClient.get('https://www.typescriptlang.org/'); +platformClient.post('https://www.typescriptlang.org/', {testData: 'abc'}); + +const serviceTokenProvider = new ServiceTokenProvider(platformClient, {}); + +const requestLogger = new RequestLogger({jsonSpace: 4}); +requestLogger.log('hello world'); diff --git a/types/microservice-utilities/tsconfig.json b/types/microservice-utilities/tsconfig.json new file mode 100644 index 0000000000..1e1845c7e8 --- /dev/null +++ b/types/microservice-utilities/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", + "microservice-utilities-tests.ts" + ] +} diff --git a/types/microservice-utilities/tslint.json b/types/microservice-utilities/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/microservice-utilities/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 858e1001360b89474fbe9968516819be770acc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Mon, 26 Nov 2018 21:34:25 +0100 Subject: [PATCH 0076/2268] Updated typings for yargs, inferring the shape of the parsed arguments. --- types/yargs/index.d.ts | 308 ++++++++++++++++++++----------------- types/yargs/tsconfig.json | 2 +- types/yargs/yargs-tests.ts | 41 ++++- 3 files changed, 212 insertions(+), 139 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index c32bcc0b11..1a025b738f 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -6,6 +6,7 @@ // Jeff Kenney // Jimi (Dimitris) Charalampidis // Teddy Cross +// Steffen Viken Valvåg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -14,220 +15,234 @@ // Convention: // Use 'union types' when: -// - parameter types have similar signature type (i.e. 'string | string[]') +// - parameter types have similar signature type (i.e. 'string | ReadonlyArray') // - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys']) // An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters // have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter -// has the same semantic meaning with declaring an overload method by using `commands: string[]`, thus -// it's prefered to use `command: string | string[]` +// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray`, +// thus it's preferred to use `command: string | ReadonlyArray` // Use parameterless declaration instead of declaring all parameters optional, // when all parameters are optional and more than one declare namespace yargs { - interface Argv { - (): Arguments; - (args: string[], cwd?: string): Arguments; + // The type parameter T is the expected shape of the parsed arguments. + // Arguments is those arguments plus _ and $0, and an indexer falling + // back to any for unknown arguments. + // + // For the return type / argv property, we create a mapped type over + // Arguments to simplify the inferred type signature in client code. + interface Argv { + (): { [K in keyof Arguments]: Arguments[K] }; + (args: ReadonlyArray, cwd?: string): { [K in keyof Arguments]: Arguments[K] }; - alias(shortName: string | string[], longName: string | string[]): Argv; - alias(aliases: { [shortName: string]: string | string[] }): Argv; + /* Aliases for previously declared arguments can inherit the types of those arguments. */ + alias(shortName: K1, longName: K2): Argv; + alias(shortName: K2, longName: K1): Argv; + + alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; + alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; - argv: Arguments; + argv: { [K in keyof Arguments]: Arguments[K] }; - array(key: string | string[]): Argv; + array(key: K | ReadonlyArray): Argv; - boolean(key: string | string[]): Argv; + boolean(key: K | ReadonlyArray): Argv; - check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; + check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - choices(key: string, values: Choices): Argv; - choices(choices: { [argName: string]: Choices }): Argv; + choices>(key: K, values: C): Argv; + choices }>(choices: C): Argv; - coerce(key: string | string[], func: (arg: any) => any): Argv; - coerce(opts: { [key: string]: (arg: any) => any; }): Argv; + /* For previously declared arguments, we can infer the parameter type of the coercion function. */ + coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv; + coerce any }>(opts: O): Argv }>; - command(command: string | string[], description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | string[], description: string, builder?: { [key: string]: Options }, handler?: (args: Arguments) => void): Argv; - command(command: string | string[], description: string, module: CommandModule): Argv; - command(command: string | string[], showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | string[], showInHelp: false, builder?: { [key: string]: Options }, handler?: (args: Arguments) => void): Argv; - command(command: string | string[], showInHelp: false, module: CommandModule): Argv; - command(module: CommandModule): Argv; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; + coerce any }>(opts: O): Argv }>; + + command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; + command(module: CommandModule): Argv; // Advanced API - commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; + commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; - completion(): Argv; - completion(cmd: string, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, func?: SyncCompletionFunction): Argv; - completion(cmd: string, description?: string, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, description?: string, func?: SyncCompletionFunction): Argv; + completion(): Argv; + completion(cmd: string, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, func?: SyncCompletionFunction): Argv; + completion(cmd: string, description?: string, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, description?: string, func?: SyncCompletionFunction): Argv; - config(): Argv; - config(key: string | string[], description?: string, parseFn?: (configPath: string) => object): Argv; - config(key: string | string[], parseFn: (configPath: string) => object): Argv; - config(explicitConfigurationObject: object): Argv; + config(): Argv; + config(key: string | ReadonlyArray, description?: string, parseFn?: (configPath: string) => object): Argv; + config(key: string | ReadonlyArray, parseFn: (configPath: string) => object): Argv; + config(explicitConfigurationObject: object): Argv; - conflicts(key: string, value: string | string[]): Argv; - conflicts(conflicts: { [key: string]: string | string[] }): Argv; + conflicts(key: string, value: string | ReadonlyArray): Argv; + conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; - count(key: string | string[]): Argv; + count(key: K | ReadonlyArray): Argv; - default(key: string, value: any, description?: string): Argv; - default(defaults: { [key: string]: any }, description?: string): Argv; + default(key: K, value: V, description?: string): Argv; + default(defaults: D, description?: string): Argv; /** * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - demand(key: string | string[], msg: string): Argv; - demand(key: string | string[], required?: boolean): Argv; - demand(positionals: number, msg: string): Argv; - demand(positionals: number, required?: boolean): Argv; - demand(positionals: number, max: number, msg?: string): Argv; + demand(key: string | ReadonlyArray, msg: string): Argv; + demand(key: string | ReadonlyArray, required?: boolean): Argv; + demand(positionals: number, msg: string): Argv; + demand(positionals: number, required?: boolean): Argv; + demand(positionals: number, max: number, msg?: string): Argv; - demandOption(key: string | string[], msg?: string): Argv; - demandOption(key: string | string[], demand?: boolean): Argv; + demandOption(key: string | ReadonlyArray, msg?: string): Argv; + demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; - demandCommand(): Argv; - demandCommand(min: number, minMsg?: string): Argv; - demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; + demandCommand(): Argv; + demandCommand(min: number, minMsg?: string): Argv; + demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; - describe(key: string | string[], description: string): Argv; - describe(descriptions: { [key: string]: string }): Argv; + describe(key: string | ReadonlyArray, description: string): Argv; + describe(descriptions: { [key: string]: string }): Argv; - detectLocale(detect: boolean): Argv; + detectLocale(detect: boolean): Argv; - env(): Argv; - env(prefix: string): Argv; - env(enable: boolean): Argv; + env(): Argv; + env(prefix: string): Argv; + env(enable: boolean): Argv; - epilog(msg: string): Argv; + epilog(msg: string): Argv; - epilogue(msg: string): Argv; + epilogue(msg: string): Argv; - example(command: string, description: string): Argv; + example(command: string, description: string): Argv; - exitProcess(enabled: boolean): Argv; + exitProcess(enabled: boolean): Argv; - fail(func: (msg: string, err: Error) => any): Argv; + fail(func: (msg: string, err: Error) => any): Argv; - getCompletion(args: string[], done: (completions: string[]) => void): Argv; + getCompletion(args: ReadonlyArray, done: (completions: ReadonlyArray) => void): Argv; - global(key: string | string[]): Argv; + global(key: string | ReadonlyArray): Argv; - group(key: string | string[], groupName: string): Argv; + group(key: string | ReadonlyArray, groupName: string): Argv; - hide(key: string): Argv; + hide(key: string): Argv; - help(): Argv; - help(enableExplicit: boolean): Argv; - help(option: string, enableExplicit: boolean): Argv; - help(option: string, description?: string, enableExplicit?: boolean): Argv; + help(): Argv; + help(enableExplicit: boolean): Argv; + help(option: string, enableExplicit: boolean): Argv; + help(option: string, description?: string, enableExplicit?: boolean): Argv; - implies(key: string, value: string | string[]): Argv; - implies(implies: { [key: string]: string | string[] }): Argv; + implies(key: string, value: string | ReadonlyArray): Argv; + implies(implies: { [key: string]: string | ReadonlyArray }): Argv; locale(): string; - locale(loc: string): Argv; + locale(loc: string): Argv; - middleware(callbacks: MiddlewareFunction | MiddlewareFunction[]): Argv; + middleware(callbacks: MiddlewareFunction | ReadonlyArray>): Argv; - nargs(key: string, count: number): Argv; - nargs(nargs: { [key: string]: number }): Argv; + nargs(key: string, count: number): Argv; + nargs(nargs: { [key: string]: number }): Argv; - normalize(key: string | string[]): Argv; + normalize(key: K | ReadonlyArray): Argv; - number(key: string | string[]): Argv; + number(key: K | ReadonlyArray): Argv; - option(key: string, options: Options): Argv; - option(options: { [key: string]: Options }): Argv; + option(key: K, options: O): Argv }>; + option(options: O): Argv>; - options(key: string, options: Options): Argv; - options(options: { [key: string]: Options }): Argv; + options(key: K, options: O): Argv }>; + options(options: O): Argv>; - parse(): Arguments; - parse(arg: string | string[], context?: object, parseCallback?: ParseCallback): Arguments; + parse(): Arguments; + parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): Arguments; - pkgConf(key: string | string[], cwd?: string): Argv; + pkgConf(key: string | ReadonlyArray, cwd?: string): Argv; /** * 'positional' should be called in a command's builder function, and is not * available on the top-level yargs instance. If so, it will throw an error. */ - positional(key: string, opt: PositionalOptions): Argv; + positional(key: string, opt: PositionalOptions): Argv; - recommendCommands(): Argv; + recommendCommands(): Argv; /** * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - require(key: string, msg: string): Argv; - require(key: string, required: boolean): Argv; - require(keys: number[], msg: string): Argv; - require(keys: number[], required: boolean): Argv; - require(positionals: number, required: boolean): Argv; - require(positionals: number, msg: string): Argv; + require(key: string, msg: string): Argv; + require(key: string, required: boolean): Argv; + require(keys: ReadonlyArray, msg: string): Argv; + require(keys: ReadonlyArray, required: boolean): Argv; + require(positionals: number, required: boolean): Argv; + require(positionals: number, msg: string): Argv; /** * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - required(key: string, msg: string): Argv; - required(key: string, required: boolean): Argv; - required(keys: number[], msg: string): Argv; - required(keys: number[], required: boolean): Argv; - required(positionals: number, required: boolean): Argv; - required(positionals: number, msg: string): Argv; + required(key: string, msg: string): Argv; + required(key: string, required: boolean): Argv; + required(keys: ReadonlyArray, msg: string): Argv; + required(keys: ReadonlyArray, required: boolean): Argv; + required(positionals: number, required: boolean): Argv; + required(positionals: number, msg: string): Argv; - requiresArg(key: string | string[]): Argv; + requiresArg(key: string | ReadonlyArray): Argv; /** * @deprecated since version 6.6.0 * Use '.global()' instead */ - reset(): Argv; + reset(): Argv; - scriptName($0: string): Argv; + scriptName($0: string): Argv; - showCompletionScript(): Argv; + showCompletionScript(): Argv; - showHidden(option?: string | boolean): Argv; - showHidden(option: string, description?: string): Argv; + showHidden(option?: string | boolean): Argv; + showHidden(option: string, description?: string): Argv; - showHelp(consoleLevel?: string): Argv; + showHelp(consoleLevel?: string): Argv; - showHelpOnFail(enable: boolean, message?: string): Argv; + showHelpOnFail(enable: boolean, message?: string): Argv; - skipValidation(key: string | string[]): Argv; + skipValidation(key: string | ReadonlyArray): Argv; - strict(): Argv; + strict(): Argv; - string(key: string | string[]): Argv; + string(key: K | ReadonlyArray): Argv; // Intended to be used with '.wrap()' terminalWidth(): number; - updateLocale(obj: { [key: string]: string }): Argv; + updateLocale(obj: { [key: string]: string }): Argv; - updateStrings(obj: { [key: string]: string }): Argv; + updateStrings(obj: { [key: string]: string }): Argv; - usage(message: string): Argv; - usage(command: string | string[], description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | string[], showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | string[], description: string, builder?: { [key: string]: Options }, handler?: (args: Arguments) => void): Argv; - usage(commands: string | string[], showInHelp: boolean, builder?: { [key: string]: Options }, handler?: (args: Arguments) => void): Argv; + usage(message: string): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: O, handler?: (args: Arguments>) => void): Argv; - version(): Argv; - version(version: string): Argv; - version(enable: boolean): Argv; - version(optionKey: string, version: string): Argv; - version(optionKey: string, description: string, version: string): Argv; + version(): Argv; + version(version: string): Argv; + version(enable: boolean): Argv; + version(optionKey: string, version: string): Argv; + version(optionKey: string, description: string, version: string): Argv; - wrap(columns: number | null): Argv; + wrap(columns: number | null): Argv; } - interface Arguments { + type Arguments = T & { /** Non-option arguments */ _: string[]; /** The script name or node command */ @@ -238,21 +253,21 @@ declare namespace yargs { interface RequireDirectoryOptions { recurse?: boolean; - extensions?: string[]; + extensions?: ReadonlyArray; visit?: (commandObject: any, pathToFile?: string, filename?: string) => any; include?: RegExp | ((pathToFile: string) => boolean); exclude?: RegExp | ((pathToFile: string) => boolean); } interface Options { - alias?: string | string[]; + alias?: string | ReadonlyArray; array?: boolean; boolean?: boolean; choices?: Choices; coerce?: (arg: any) => any; config?: boolean; configParser?: (configPath: string) => object; - conflicts?: string | string[] | { [key: string]: string | string[] }; + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; count?: boolean; default?: any; defaultDescription?: string; @@ -268,7 +283,7 @@ declare namespace yargs { global?: boolean; group?: string; hidden?: boolean; - implies?: string | string[] | { [key: string]: string | string[] }; + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; nargs?: number; normalize?: boolean; number?: boolean; @@ -289,32 +304,51 @@ declare namespace yargs { } interface PositionalOptions { - alias?: string | string[]; + alias?: string | ReadonlyArray; choices?: Choices; coerce?: (arg: any) => any; - conflicts?: string | string[] | { [key: string]: string | string[] }; + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; default?: any; desc?: string; describe?: string; description?: string; - implies?: string | string[] | { [key: string]: string | string[] }; + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; normalize?: boolean; type?: PositionalOptionsType; } - interface CommandModule { - aliases?: string[] | string; - builder?: CommandBuilder; - command?: string[] | string; + type InferredOptionType = + O extends { type: "array" } ? string[] : + O extends { type: "boolean" } ? boolean : + O extends { type: "number" } ? number : + O extends { type: "string" } ? string : + O extends { type: "count" } ? number : + O extends { array: true } ? string[] : + O extends { boolean: true } ? boolean : + O extends { number: true } ? number : + O extends { string: true } ? string : + O extends { normalize: true } ? string : + O extends { choices: Array } ? C : + O extends { default: infer D } ? D : + O extends { coerce: (arg: any) => infer T } ? T : + any; + + type InferredOptionTypes = + { [K in keyof O]: InferredOptionType }; + + interface CommandModule { + aliases?: ReadonlyArray | string; + builder?: CommandBuilder; + command?: ReadonlyArray | string; describe?: string | false; - handler: (args: any) => void; + handler: (args: Argv) => void; } - type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; - type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv); + type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; + type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv); type SyncCompletionFunction = (current: string, argv: any) => string[]; - type AsyncCompletionFunction = (current: string, argv: any, done: (completion: string[]) => void) => void; - type MiddlewareFunction = (args: Arguments) => void; + type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; + type MiddlewareFunction = (args: Arguments) => void; type Choices = Array; type PositionalOptionsType = "boolean" | "number" | "string"; } diff --git a/types/yargs/tsconfig.json b/types/yargs/tsconfig.json index 003b792854..dd10c56ee2 100644 --- a/types/yargs/tsconfig.json +++ b/types/yargs/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index d8b301dc1c..8452b4ec34 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -424,7 +424,7 @@ function Argv$commandDirWithOptions() { .commandDir('.', { recurse: false, extensions: ['js'], - visit: (commandObject: any, pathToFile: string, filename: string) => void 0, + visit: (commandObject: any, pathToFile?: string, filename?: string) => void 0, include: /.*\.js$/, exclude: /.*\.spec.js$/, }) @@ -666,3 +666,42 @@ function Argv$scriptName() { const ya = yargs .scriptName("my-script"); } + +function Argv$inferOptionTypes() { + const argv1 = yargs + .option("u", { type: "string" }) + .alias("u", "url") + .argv; + + argv1.u; // string + argv1.url; // string + + const argv2 = yargs + .option("verbose", { default: false }) + .alias("v", "verbose") + .argv; + + argv2.v; // boolean + argv2.verbose; // boolean + + const argv3 = yargs + .option({ + count: { number: true }, + date: { coerce: Date.parse } + }) + .alias("c", "count") + .argv; + + argv3.c; // number + argv3.count; // number + argv3.date; // number + + const argv4 = yargs + .string(["u", "url"]) + .alias("url", "uri") + .argv; + + argv4.u; // string + argv4.url; // string + argv4.uri; // string +} \ No newline at end of file From 2a1f1b31261f4bf65e8560a9f1aa8aab599f393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Mon, 26 Nov 2018 23:09:18 +0100 Subject: [PATCH 0077/2268] Fix lint errors. --- types/yargs/index.d.ts | 11 +++++------ types/yargs/yargs-tests.ts | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 1a025b738f..fce6d279a2 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -8,7 +8,7 @@ // Teddy Cross // Steffen Viken Valvåg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.8 // The following TSLint rules have been disabled: // unified-signatures: Because there is useful information in the argument names of the overloaded signatures @@ -38,7 +38,7 @@ declare namespace yargs { /* Aliases for previously declared arguments can inherit the types of those arguments. */ alias(shortName: K1, longName: K2): Argv; alias(shortName: K2, longName: K1): Argv; - + alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; @@ -62,7 +62,7 @@ declare namespace yargs { command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; - command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; + command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; command(command: string | ReadonlyArray, showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; @@ -249,7 +249,7 @@ declare namespace yargs { $0: string; /** All remaining options */ [argName: string]: any; - } + }; interface RequireDirectoryOptions { recurse?: boolean; @@ -333,8 +333,7 @@ declare namespace yargs { O extends { coerce: (arg: any) => infer T } ? T : any; - type InferredOptionTypes = - { [K in keyof O]: InferredOptionType }; + type InferredOptionTypes = { [K in keyof O]: InferredOptionType }; interface CommandModule { aliases?: ReadonlyArray | string; diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 8452b4ec34..f2b2ad2ada 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -672,7 +672,7 @@ function Argv$inferOptionTypes() { .option("u", { type: "string" }) .alias("u", "url") .argv; - + argv1.u; // string argv1.url; // string @@ -691,7 +691,7 @@ function Argv$inferOptionTypes() { }) .alias("c", "count") .argv; - + argv3.c; // number argv3.count; // number argv3.date; // number @@ -704,4 +704,4 @@ function Argv$inferOptionTypes() { argv4.u; // string argv4.url; // string argv4.uri; // string -} \ No newline at end of file +} From a17f0a03801b459f54be89dcc57828be2a8662fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Mon, 26 Nov 2018 23:22:14 +0100 Subject: [PATCH 0078/2268] Use $ExpectType, and add more tests. --- types/yargs/yargs-tests.ts | 63 ++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index f2b2ad2ada..f32023ec99 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -673,16 +673,20 @@ function Argv$inferOptionTypes() { .alias("u", "url") .argv; - argv1.u; // string - argv1.url; // string + // $ExpectType string + argv1.u; + // $ExpectType string + argv1.url; const argv2 = yargs .option("verbose", { default: false }) .alias("v", "verbose") .argv; - argv2.v; // boolean - argv2.verbose; // boolean + // $ExpectType boolean + argv2.v; + // $ExpectType boolean + argv2.verbose; const argv3 = yargs .option({ @@ -692,16 +696,55 @@ function Argv$inferOptionTypes() { .alias("c", "count") .argv; - argv3.c; // number - argv3.count; // number - argv3.date; // number + // $ExpectType number + argv3.c; + // $ExpectType number + argv3.count; + // $ExpectType number + argv3.date; const argv4 = yargs .string(["u", "url"]) .alias("url", "uri") .argv; - argv4.u; // string - argv4.url; // string - argv4.uri; // string + // $ExpectType string + argv4.u; + // $ExpectType string + argv4.url; + // $ExpectType string + argv4.uri; + // $ExpectType any + argv4.bogus; + + type Color = "red" | "blue" | "green"; + const colors: Color[] = ["red", "blue", "green"]; + + const argv5 = yargs + .array("array") + .boolean("boolean") + .choices("color", colors) + .count("count") + .default("date", new Date()) + .normalize("normalize") + .number("number") + .string("string") + .argv; + + // $ExpectType string[] + argv5.array; + // $ExpectType boolean + argv5.boolean; + // $ExpectType Color + argv5.color; + // $ExpectType number + argv5.count; + // $ExpectType Date + argv5.date; + // $ExpectType string + argv5.normalize; + // $ExpectType number + argv5.number; + // $ExpectType string + argv5.string; } From 9fa2b6599f6309a7e33e5b5ab1387537ed68d9df Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Mon, 26 Nov 2018 22:18:35 +0100 Subject: [PATCH 0079/2268] [react-redux] extended ThunkActionCreator testsuite to check all overloads --- types/react-redux/react-redux-tests.tsx | 59 ++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/types/react-redux/react-redux-tests.tsx b/types/react-redux/react-redux-tests.tsx index f47683047e..554ace09ff 100644 --- a/types/react-redux/react-redux-tests.tsx +++ b/types/react-redux/react-redux-tests.tsx @@ -120,12 +120,61 @@ function MapDispatchWithThunkActionCreators() { } class TestComponent extends React.Component {} - const Test = connect( - null, - ({ simpleAction, thunkAction }), - )(TestComponent); + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + const mapDispatchToProps = { simpleAction, thunkAction }; - const verify = ; + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; +} + +function MapManualDispatchThatLooksLikeThunk() { + interface OwnProps { + foo: string; + } + interface TestComponentProps extends OwnProps { + remove: (item: string) => () => object; + } + class TestComponent extends React.Component { + render() { + return
; + } + } + + const mapStateToProps = ({ foo }: { foo: string }) => ({ foo }); + function mapDispatchToProps(dispatch: Dispatch) { + return { + remove(item: string) { + return () => dispatch({ type: 'REMOVE_ITEM', item }); + } + }; + } + + const Test1 = connect(null, mapDispatchToProps)(TestComponent); + const Test2 = connect(mapStateToProps, mapDispatchToProps)(TestComponent); + const Test3 = connect( + null, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const Test4 = connect( + mapStateToProps, mapDispatchToProps, null, { storeKey: 'somekey' } + )(TestComponent); + const verify =
+ ; + + ; + +
; } function MapStateAndDispatchObject() { From 8cbf6d938de2e838a4f3cc9695576958ed55f4c3 Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Mon, 26 Nov 2018 22:19:18 +0100 Subject: [PATCH 0080/2268] [react-redux] fixed type definitions to pass extended tests --- types/react-redux/index.d.ts | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index bf65d89fd5..dc8a9af912 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -160,7 +160,12 @@ export interface Connect { ( mapStateToProps: null | undefined, - mapDispatchToProps: MapDispatchToPropsParam + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< WithThunkActionCreators, TOwnProps @@ -168,7 +173,12 @@ export interface Connect { ( mapStateToProps: MapStateToPropsParam, - mapDispatchToProps: MapDispatchToPropsParam + mapDispatchToProps: MapDispatchToPropsNonObject + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< TStateProps & WithThunkActionCreators, TOwnProps @@ -208,7 +218,14 @@ export interface Connect { ( mapStateToProps: null | undefined, - mapDispatchToProps: MapDispatchToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options<{}, TStateProps, TOwnProps> + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: null | undefined, + mapDispatchToProps: TDispatchProps, mergeProps: null | undefined, options: Options<{}, TStateProps, TOwnProps> ): InferableComponentEnhancerWithProps< @@ -218,7 +235,14 @@ export interface Connect { ( mapStateToProps: MapStateToPropsParam, - mapDispatchToProps: MapDispatchToPropsParam, + mapDispatchToProps: MapDispatchToPropsNonObject, + mergeProps: null | undefined, + options: Options + ): InferableComponentEnhancerWithProps; + + ( + mapStateToProps: MapStateToPropsParam, + mapDispatchToProps: TDispatchProps, mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps< @@ -248,10 +272,12 @@ export type MapDispatchToProps = MapDispatchToPropsFunction | TDispatchProps; export type MapDispatchToPropsFactory = - (dispatch: Dispatch, ownProps: TOwnProps) => MapDispatchToProps; + (dispatch: Dispatch, ownProps: TOwnProps) => MapDispatchToPropsFunction; export type MapDispatchToPropsParam = MapDispatchToPropsFactory | MapDispatchToProps; +export type MapDispatchToPropsNonObject = MapDispatchToPropsFactory | MapDispatchToPropsFunction; + export type MergeProps = (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps) => TMergedProps; From c93b56a72c3506c019dcffce25d7f4cb21214b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Mon, 26 Nov 2018 23:49:04 +0100 Subject: [PATCH 0081/2268] Updated comments. --- types/yargs/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index fce6d279a2..1c40eea4c5 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -25,9 +25,9 @@ // when all parameters are optional and more than one declare namespace yargs { - // The type parameter T is the expected shape of the parsed arguments. - // Arguments is those arguments plus _ and $0, and an indexer falling - // back to any for unknown arguments. + // The type parameter T is the expected shape of the parsed options. + // Arguments is those options plus _ and $0, and an indexer falling + // back to any for unknown options. // // For the return type / argv property, we create a mapped type over // Arguments to simplify the inferred type signature in client code. @@ -35,7 +35,7 @@ declare namespace yargs { (): { [K in keyof Arguments]: Arguments[K] }; (args: ReadonlyArray, cwd?: string): { [K in keyof Arguments]: Arguments[K] }; - /* Aliases for previously declared arguments can inherit the types of those arguments. */ + // Aliases for previously declared options can inherit the types of those options. alias(shortName: K1, longName: K2): Argv; alias(shortName: K2, longName: K1): Argv; @@ -53,7 +53,7 @@ declare namespace yargs { choices>(key: K, values: C): Argv; choices }>(choices: C): Argv; - /* For previously declared arguments, we can infer the parameter type of the coercion function. */ + // For previously declared options, we can infer the parameter type of the coercion function. coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv; coerce any }>(opts: O): Argv }>; From 3d7b580823acbcbfc756c8c5d0503124325940a2 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Mon, 26 Nov 2018 16:10:39 -0800 Subject: [PATCH 0082/2268] Add office-js-preview files --- types/office-js-preview/index.d.ts | 14532 ++++++++++++++++++++++++++- 1 file changed, 13975 insertions(+), 557 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 54d0e2711c..88ca7361b0 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -252,7 +252,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -288,7 +288,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -326,7 +326,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -356,7 +356,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -390,7 +390,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -421,7 +421,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
- * + * * * * @@ -476,7 +476,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
OneNote Y Y
- * + * * * * @@ -540,7 +540,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
OneNote Y Y
- * + * * * * @@ -551,7 +551,7 @@ declare namespace Office { */ asyncContext: any; /** - * Gets an {@link Office.Error} object that provides a description of the error, if any error occurred. + * Gets an object that may provide additional information if an error occurred. * * @remarks * @@ -566,6 +566,37 @@ declare namespace Office { * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
* + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Outlook Y (Mailbox Preview)
+ * + * *Supported APIs* + * + * `Office.context.mailbox.item.getCallbackTokenAsync`, `Office.context.mailbox.item.getUserIdentityTokenAsync` + * + * *Supported errors* + * + * + * + * + *
`AsyncResult.error.name` `AsyncResult.error.message` Description of diagnostics object returned
HTTPRequestFailure The request has failed. Please look at the diagnostics object for the HTTP error code. The HTTP error code in a JSON object e.g., `{"HTTPCode":"401"}`
InternalServerErrorThe Exchange server returned an error. Please look at the diagnostics object for more information.The error message from the Exchange server in a JSON object e.g., `{"ErrorText": "The mailbox database is temporarily unavailable"}`
+ */ + diagnostics: any; + /** + * Gets an {@link Office.Error} object that provides a description of the error, if any error occurred. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. + * An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see + * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * * * * @@ -620,7 +651,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -657,9 +688,9 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * - * - * + * + * + * *
Office for iPad
Excel Y
Word Y
Office for iPad
Excel Y
Word Y
*/ commerceAllowed: boolean; @@ -682,7 +713,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -720,7 +751,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -745,7 +776,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * + * * * * @@ -825,7 +856,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
- * + * * * * @@ -854,7 +885,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for iPad
Office for iPad
Excel Y
PowerPoint Y
Word Y
- * + * * * * @@ -905,8 +936,8 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Outlook Y (Mailbox 1.3)
Office for Windows desktop Office Online (in browser) Office for iPad
Outlook Y (Mailbox 1.3)
*/ source:Source; @@ -938,7 +969,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -1035,6 +1066,10 @@ declare namespace Office { * * * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Outlook Y (Mailbox 1.3)
PowerPoint Y Y Y
12007A dialog box is already opened from the task pane. A task pane add-in can only have one dialog box open at a time.
12009The user chose to ignore the dialog box. This error can occur in online versions of Office, where users may choose not to allow an add-in to present a dialog.
* * In the callback function passed to the displayDialogAsync method, you can use the properties of the AsyncResult object to return the @@ -1083,8 +1118,8 @@ declare namespace Office { * * - Called from a UI-less command button: No effect. Any dialog opened by displayDialogAsync will remain open. * - * - Called from a taskpane: The taskpane will close. Any dialog opened by displayDialogAsync will also close. - * If the taskpane supports pinning and was pinned by the user, it will be un-pinned. + * - Called from a task pane: The task pane will close. Any dialog opened by displayDialogAsync will also close. + * If the task pane supports pinning and was pinned by the user, it will be un-pinned. * * - Called from a module extension: No effect. */ @@ -1212,7 +1247,7 @@ declare namespace Office { * * Example: `[{cells: Office.Table.Data, format: {fontColor: "yellow"}}, {cells: {row: 3, column: 4}, format: {borderColor: "white", fontStyle: "bold"}}]` */ - cellFormat?: Array + cellFormat?: RangeFormatConfiguration[] /** * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. */ @@ -1220,7 +1255,7 @@ declare namespace Office { /** * Only for table bindings in content add-ins for Access. Array of strings. Specifies the column names. */ - columns?: Array + columns?: string[] /** * Only for table bindings in content add-ins for Access. Specifies the pre-defined string "thisRow" to get data in the currently selected row. */ @@ -1250,17 +1285,17 @@ declare namespace Office { */ interface RangeFormatConfiguration { /** - * Specifies the range. Example of using Office.Table enum: Office.Table.All. Example of using RangeCoordinates: \{row: 3, column: 4\} specifies + * Specifies the range. Example of using Office.Table enum: Office.Table.All. Example of using RangeCoordinates: `{row: 3, column: 4}` specifies * the cell in the 3rd (zero-based) row in the 4th (zero-based) column. */ cells: Office.Table | RangeCoordinates /** - * Specifies the formatting as key-value pairs. Example: \{borderColor: "white", fontStyle: "bold"\} + * Specifies the formatting as key-value pairs. Example: `{borderColor: "white", fontStyle: "bold"}` */ format: object } /** - * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: \{row: 3, column: 4\} specifies the cell in the 3rd + * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: `{row: 3, column: 4}` specifies the cell in the 3rd * (zero-based) row in the 4th (zero-based) column. */ interface RangeCoordinates { @@ -1334,7 +1369,7 @@ declare namespace Office { /** * The names of the columns involved in the binding. */ - columns?: Array + columns?: string[] /** * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. */ @@ -1405,9 +1440,9 @@ declare namespace Office { * Use only with binding type table and when a TableData object is passed for the data parameter. An array of objects that specify a range of * columns, rows, or cells and specify, as key-value pairs, the cell formatting to apply to that range. * - * Example: `[\{cells: Office.Table.Data, format: \{fontColor: "yellow"\}\}, \{cells: \{row: 3, column: 4\}, format: \{borderColor: "white", fontStyle: "bold"\}\}]` + * Example: `[{cells: Office.Table.Data, format: {fontColor: "yellow"}}, {cells: {row: 3, column: 4}, format: {borderColor: "white", fontStyle: "bold"}}]` */ - cellFormat?: Array + cellFormat?: RangeFormatConfiguration[] /** * Explicitly sets the shape of the data object. If not supplied is inferred from the data type. */ @@ -1476,7 +1511,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -1543,10 +1578,10 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop
Office for Windows desktop
Excel Y
Outlook Y (in preview)
PowerPoint Y
- * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y
*/ function select(expression: string, callback?: (result: AsyncResult) => void): Binding; @@ -1565,8 +1600,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
PowerPoint Y Y Y Y
*/ enum ActiveView { @@ -1593,10 +1628,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ enum BindingType { @@ -1632,7 +1667,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -1681,7 +1716,7 @@ declare namespace Office { SlideRange, /** * Data is returned or set as an image stream. - * Note: Only applies to data in Excel, Word and PowerPoint. + * Note: Only applies to data in Excel, Word, and PowerPoint. */ Image } @@ -1702,11 +1737,11 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
- * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Project Y
Word Y Y Y
*/ enum DocumentMode { @@ -1735,8 +1770,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ enum CustomXMLNodeType { @@ -1789,7 +1824,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -1811,7 +1846,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Outlook Y Y Y
PowerPoint Y Y
- * + * * *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
*/ @@ -1847,10 +1882,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ BindingDataChanged, @@ -1870,10 +1905,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ BindingSelectionChanged, @@ -1898,16 +1933,16 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
*/ DocumentSelectionChanged, /** - * Triggers when the selected Outlook item is changed. + * Triggers when a different Outlook item is selected for viewing while the task pane is pinned. * - * [Api set: Mailbox 1.1] + * [Api set: Mailbox 1.5] */ ItemChanged, /** @@ -1959,7 +1994,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -1992,10 +2027,10 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
- * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ enum FileType { @@ -2027,10 +2062,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
*/ enum FilterType { @@ -2058,7 +2093,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -2106,7 +2141,7 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
- * + * * *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
*/ @@ -2143,7 +2178,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -2178,10 +2213,10 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y
Word Y Y
- * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Project Y
Word Y Y
*/ enum ValueFormat { @@ -2199,7 +2234,7 @@ declare namespace Office { * Represents a binding to a section of the document. * * @remarks - *
Requirement SetsMatrixBinding, TableBinding, TextBinding
+ *
Requirement SetsMatrixBindings, TableBindings, TextBindings
* * The Binding object exposes the functionality possessed by all bindings regardless of type. * @@ -2219,10 +2254,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ interface Binding { @@ -2506,10 +2541,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ document: Document; @@ -2547,10 +2582,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* @param itemName Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." * @param bindingType The {@link Office.BindingType} for the data. The method returns null if the selected object cannot be coerced into the specified type. @@ -2578,9 +2613,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
* * @param bindingType Specifies the type of the binding object to create. Required. @@ -2613,10 +2648,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param bindingType Specifies the type of the binding object to create. Required. @@ -2642,10 +2677,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2671,10 +2706,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param id Specifies the unique name of the binding object. Required. @@ -2701,10 +2736,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param id Specifies the unique name to be used to identify the binding object. Required. @@ -2729,8 +2764,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface CustomXmlNode { @@ -2852,8 +2887,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface CustomXmlPart { @@ -2944,8 +2979,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface NodeDeletedEventArgs { @@ -2981,8 +3016,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface NodeInsertedEventArgs { @@ -3012,8 +3047,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface NodeReplacedEventArgs { @@ -3052,8 +3087,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y
*/ interface CustomXmlParts { @@ -3103,8 +3138,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ interface CustomXmlPrefixMappings { @@ -3173,10 +3208,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ bindings: Bindings; @@ -3195,8 +3230,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Word Y Y Y Y
*/ customXmlParts: CustomXmlParts; @@ -3215,11 +3250,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ mode: DocumentMode; @@ -3238,11 +3273,12 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * < + * < + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
OneNote Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ settings: Settings; @@ -3261,7 +3297,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * * @@ -3287,11 +3323,12 @@ declare namespace Office { * * *Supported hosts, by platform* *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y
- * - * - * - * - * + * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
OneNote Y
PowerPoint Y Y Y Y
Project Y
Word Y Y Y Y
* * @param eventType For a Document object event, the eventType parameter can be specified as `Office.EventType.Document.SelectionChanged` or @@ -3319,10 +3356,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
PowerPoint Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3346,13 +3381,13 @@ declare namespace Office { * The fileType parameter can be specified by using the {@link Office.FileType} enumeration or text values. But the possible values vary with * the host: * - * Excel Online, Win32, Mac, and iOS: `Office.FileType.Compressed` + * Excel for Windows desktop, iPad, and Excel Online: `Office.FileType.Compressed` + * + * Excel for Mac: `Office.FileType.Compressed`, `Office.FileType.Pdf` * - * PowerPoint on Windows desktop, Mac, and iPad, and PowerPoint Online: `Office.FileType.Compressed`, `Office.FileType.Pdf` + * PowerPoint for Windows desktop, Mac, iPad, and PowerPoint Online: `Office.FileType.Compressed`, `Office.FileType.Pdf` * - * Word on Windows desktop, Word on Mac, and Word Online: `Office.FileType.Compressed`, `Office.FileType.Pdf`, `Office.FileType.Text` - * - * Word on iPad: `Office.FileType.Compressed`, `Office.FileType.Text` + * Word for Windows desktop, Mac, iPad, and Word Online: `Office.FileType.Compressed`, `Office.FileType.Pdf`, `Office.FileType.Text` * * **Support details** * @@ -3364,10 +3399,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param fileType The format in which the file will be returned @@ -3394,10 +3429,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3445,15 +3480,15 @@ declare namespace Office { * Supported coercionType * * - * Excel, Excel Online, PowerPoint, PowerPoint Online, Word, and Word Online + * Excel, PowerPoint, Project, and Word * `Office.CoercionType.Text` (string) * * - * Excel, Word, and Word Online + * Excel and Word * `Office.CoercionType.Matrix` (array of arrays) * * - * Access, Excel, Word, and Word Online + * Access, Excel, and Word * `Office.CoercionType.Table` (TableData object) * * @@ -3461,7 +3496,7 @@ declare namespace Office { * `Office.CoercionType.Html` * * - * Word and Word Online + * Word * `Office.CoercionType.Ooxml` (Office Open XML) * * @@ -3480,12 +3515,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Project Y Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Project Y
Word Y Y Y Y
* * @param coercionType The type of data structure to return. See the remarks section for each host's supported coercion types. @@ -3527,10 +3561,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y
* * @param id The identifier of the object or location to go to. @@ -3556,10 +3590,12 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
OneNote Y
PowerPoint Y Y Y Y
Project Y
Word Y Y Y Y
* * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. @@ -3608,15 +3644,15 @@ declare namespace Office { * Supported coercionType * * - * Excel, Excel Online, PowerPoint, PowerPoint Online, Word, and Word Online + * Excel, PowerPoint, Project, and Word * `Office.CoercionType.Text` (string) * * - * Excel, Word, and Word Online + * Excel and Word * `Office.CoercionType.Matrix` (array of arrays) * * - * Access, Excel, Word, and Word Online + * Access, Excel, and Word * `Office.CoercionType.Table` (TableData object) * * @@ -3624,7 +3660,7 @@ declare namespace Office { * `Office.CoercionType.Html` * * - * Word and Word Online + * Word * `Office.CoercionType.Ooxml` (Office Open XML) * * @@ -3643,11 +3679,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Project Y
Word Y Y Y Y
* * @param data The data to be set. Either a string or {@link Office.CoercionType} value, 2d array or TableData object. @@ -3699,8 +3735,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3724,8 +3760,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getResourceFieldAsync(resourceId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3747,8 +3783,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3770,8 +3806,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3795,8 +3831,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3822,8 +3858,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskAsync(taskId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3847,8 +3883,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskFieldAsync(taskId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3872,8 +3908,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getWSSUrlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3924,8 +3960,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getMaxTaskIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3951,8 +3987,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getResourceByIndexAsync(resourceIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -3978,8 +4014,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskByIndexAsync(taskIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -4006,8 +4042,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -4034,8 +4070,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -4069,9 +4105,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ interface File { @@ -4187,9 +4224,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
Word Y Y Y Y
*/ interface MatrixBinding extends Binding { @@ -4282,8 +4319,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y
*/ addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; @@ -4303,11 +4341,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param settingName The case-sensitive name of the setting to retrieve. @@ -4363,11 +4401,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Excel Y Y
PowerPoint Y Y
Word Y Y
* * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}. @@ -4396,11 +4434,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param settingName The case-sensitive name of the setting to remove. @@ -4432,10 +4470,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y
* * @param eventType Specifies the type of event to remove. Required. @@ -4489,11 +4526,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param options Provides options for saving settings. @@ -4525,11 +4562,11 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * - * + * + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
PowerPoint Y Y Y Y
Word Y Y Y Y
* * @param settingName The case-sensitive name of the setting to set or create. @@ -4568,9 +4605,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
*/ interface SettingsChangedEventArgs { @@ -4601,7 +4638,7 @@ declare namespace Office { * * *Supported hosts, by platform* * - * + * * * *
Office for Windows desktop Office Online (in browser) Office for iPad
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
@@ -4653,10 +4690,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ columnCount: number; @@ -4675,10 +4712,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ hasHeaders: boolean; @@ -4710,10 +4747,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
*/ rowCount: number; @@ -4743,15 +4780,16 @@ declare namespace Office { * * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. * An empty cell indicates that the Office host application doesn't support this method. - * + * * For more information about Office host application and server requirements, see * {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. * * *Supported hosts, by platform* * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. @@ -4788,10 +4826,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. @@ -4816,10 +4854,10 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * - * + * + * + * < + * < *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -4842,8 +4880,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -4857,7 +4895,7 @@ declare namespace Office { * * **Returned format structure** * - * Each JavaScript object in the return value array has this form: `\{cells:\{ cell_range \}, format:\{ format_definition \}\}` + * Each JavaScript object in the return value array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values: * @@ -4869,27 +4907,27 @@ declare namespace Office { * Description * * - * \{row: n\} + * `{row: n}` * Specifies the range that is the zero-based nth row of data in the table. * * - * \{column: n\} + * `{column: n}` * Specifies the range that is the zero-based nth column of data in the table. * * - * \{row: i, column: j\} + * `{row: i, column: j}` * Specifies the single cell that is the ith row and jth column of the table. * * - * Office.Table.All + * `Office.Table.All` * Specifies the entire table, including column headers, data, and totals (if any). * * - * Office.Table.Data + * `Office.Table.Data` * Specifies only the data in the table (no headers and totals). * * - * Office.Table.Headers + * `Office.Table.Headers` * Specifies only the header row. * * @@ -4915,7 +4953,7 @@ declare namespace Office { * The value you pass as the cellFormat parameter is an array that contains a list of one or more JavaScript objects that specify which cells * to target (`cells:`) and the formats (`format:`) to apply to them. * - * Each JavaScript object in the cellFormat array has this form: `\{cells:\{ cell_range \}, format:\{ format_definition \}\}` + * Each JavaScript object in the cellFormat array has this form: `{cells:{ cell_range }, format:{ format_definition }}` * * The `cells:` property specifies the range you want format using one of the following values: * @@ -4927,27 +4965,27 @@ declare namespace Office { * Description * * - * \{row: n\} + * `{row: n}` * Specifies the range that is the zero-based nth row of data in the table. * * - * \{column: n\} + * `{column: n}` * Specifies the range that is the zero-based nth column of data in the table. * * - * \{row: i, column: j\} + * `{row: i, column: j}` * Specifies the single cell that is the ith row and jth column of the table. * * - * Office.Table.All + * `Office.Table.All` * Specifies the entire table, including column headers, data, and totals (if any). * * - * Office.Table.Data + * `Office.Table.Data` * Specifies only the data in the table (no headers and totals). * * - * Office.Table.Headers + * `Office.Table.Headers` * Specifies only the header row. * * @@ -4963,22 +5001,22 @@ declare namespace Office { * * `//Set cells: font color to green and size to 15 points.` * - * `format: \{fontColor : "green", fontSize : 15\}` + * `format: {fontColor : "green", fontSize : 15}` * * `//Set cells: border to dotted blue.` * - * `format: \{borderStyle: "dotted", borderColor: "blue"\}` + * `format: {borderStyle: "dotted", borderColor: "blue"}` * * `//Set cells: background to red and alignment to centered.` * - * `format: \{backgroundColor: "red", alignHorizontal: "center"\}` + * `format: {backgroundColor: "red", alignHorizontal: "center"}` * * * You can specify number formats by specifying the number formatting "code" string in the `numberFormat:` property. * The number format strings you can specify correspond to those you can set in Excel using the Custom category on the Number tab of the Format Cells dialog box. * This example shows how to format a number as a percentage with two decimal places: * - * `format: \{numberFormat:"0.00%"\}` + * `format: {numberFormat:"0.00%"}` * * For more detail, see how to {@link https://support.office.com/article/create-or-delete-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4 | Create a custom number format}. * @@ -5008,8 +5046,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
* * @param cellFormat An array that contains one or more JavaScript objects that specify which cells to target and the formatting to apply to them. @@ -5060,8 +5098,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
* * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. @@ -5138,8 +5176,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
*/ enum Table { @@ -5175,9 +5213,9 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * - * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Excel Y Y Y Y
Word Y Y Y Y
*/ interface TextBinding extends Binding { } @@ -5198,8 +5236,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ enum ProjectProjectFields { @@ -5274,8 +5312,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ enum ProjectResourceFields { @@ -6101,8 +6139,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ enum ProjectTaskFields { @@ -7263,8 +7301,8 @@ declare namespace Office { * * *Supported hosts, by platform* * - * - * + * + * *
Office for Windows desktop Office Online (in browser)
Project Y
Office for Windows desktop Office Online (in browser)
Project Y
*/ enum ProjectViewTypes { @@ -7376,7 +7414,12 @@ declare namespace Office { /** * The content of the attachment is returned as a string representing an .eml formatted file. */ - Eml = "eml" + Eml = "eml", + + /** + * The content of the attachment is returned as a string representing an .icalendar formatted file. + */ + ICalendar = "iCalendar" } /** * Specifies whether an attachment was added to or removed from an item. @@ -8574,8 +8617,13 @@ declare namespace Office { content: string; /** * The string format to use for an attachment's content. - * For file attachments, the formatting is a base64-encoded string. - * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * + * For file attachments, the formatting is a base64-encoded string. + * + * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * + * For item attachments that represent calendar items, the formatting is a string representing an .icalendar file. + * * For cloud attachments, the formatting is a URL string. */ format: Office.MailboxEnums.AttachmentContentFormat; @@ -9024,7 +9072,7 @@ declare namespace Office { /** * An array of strings containing the mailing and street addresses associated with the contact. Nullable. */ - addresses: Array; + addresses: string[]; /** * A string containing the name of the business associated with the contact. Nullable. */ @@ -9032,7 +9080,7 @@ declare namespace Office { /** * An array of strings containing the SMTP email addresses associated with the contact. Nullable, */ - emailAddresses: Array; + emailAddresses: string[]; /** * A string containing the name of the person associated with the contact. Nullable. */ @@ -9040,11 +9088,11 @@ declare namespace Office { /** * An array containing a PhoneNumber object for each phone number associated with the contact. Nullable. */ - phoneNumbers: Array; + phoneNumbers: PhoneNumber[]; /** * An array of strings containing the Internet URLs associated with the contact. Nullable. */ - urls: Array; + urls: string[]; } /** * The CustomProperties object represents custom properties that are specific to a particular item and specific to a mail add-in for Outlook. @@ -15367,7 +15415,8 @@ declare namespace Office { * isRest: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is false. * asyncContext: Any state data that is passed to the asynchronous method. * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the asyncResult.value property. + * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. + * If there was an error, then the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. */ getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (result: AsyncResult) => void): void; /** @@ -15394,7 +15443,8 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read * * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. - * The token is provided as a string in the asyncResult.value property. + * The token is provided as a string in the `asyncResult.value` property. + * If there was an error, then the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. */ getCallbackTokenAsync(callback: (result: AsyncResult) => void): void; /** @@ -15421,7 +15471,8 @@ declare namespace Office { * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose and read * * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of - * type Office.AsyncResult. The token is provided as a string in the asyncResult.value property. + * type Office.AsyncResult. The token is provided as a string in the `asyncResult.value` property. + * If there was an error, then the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext Optional. Any state data that is passed to the asynchronous method. */ getCallbackTokenAsync(callback: (result: AsyncResult) => void, userContext?: any): void; @@ -15443,7 +15494,8 @@ declare namespace Office { * * @param callback When the method completes, the function passed in the callback parameter is called with a single parameter of * type Office.AsyncResult. - * The token is provided as a string in the asyncResult.value property. + * The token is provided as a string in the `asyncResult.value` property. + * If there was an error, then the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. * @param userContext Optional. Any state data that is passed to the asynchronous method.| */ getUserIdentityTokenAsync(callback: (result: AsyncResult) => void, userContext?: any): void; @@ -17486,7 +17538,7 @@ declare namespace OfficeExtension { * If there was an error, this contains all trace messages that were executed before the error occurred. * These messages can help you monitor the program execution sequence and detect the case of the error. */ - traceMessages: Array; + traceMessages: string[]; /** Debug info (useful for detailed logging of the error, i.e., via `JSON.stringify(...)`). */ debugInfo: DebugInfo; /** Inner error, if applicable. */ @@ -17962,6 +18014,23 @@ declare namespace Excel { */ settings: Excel.SettingCollection; } + /** + * + * Provides information about the workbook AutoSave setting changed event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorkbookAutoSaveSettingChangedEventArgs { + /** + * + * Represents the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorkbookAutoSaveSettingChanged"; + } /** * * Provides information about the worksheet that raised the Changed event. @@ -18019,6 +18088,61 @@ declare namespace Excel { */ getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; } + /** + * + * Provides information about the worksheet format change event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetFormatChangedEventArgs { + /** + * + * Gets the range address that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address: string; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetFormatChanged"; + /** + * + * Gets the id of the worksheet in which the data changed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + /** + * + * Gets the range that represents the changed area of a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + getRange(ctx: Excel.RequestContext): Excel.Range; + /** + * + * Gets the range that represents the changed area of a specific worksheet. It might return null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; + } /** * * Provides information about the table that raised the Changed event. @@ -18083,6 +18207,64 @@ declare namespace Excel { */ getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range; } + /** + * + * Provides information about the table that raised the filter applied event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableFilteredEventArgs { + /** + * + * Represents the id of the table in which the filter is applied.. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableId: string; + /** + * + * Represents the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "TableFiltered"; + /** + * + * Represents the id of the worksheet which contains the table. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the filter applied event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetFilteredEventArgs { + /** + * + * Represents the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetFiltered"; + /** + * + * Represents the id of the worksheet in which the filter is applied. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } /** * * Provides information about the worksheet that raised the Activated event. @@ -18409,6 +18591,162 @@ declare namespace Excel { */ worksheetId: string; } + /** + * + * Provides information about the table that raised the OnAdded event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableAddedEventArgs { + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the id of the table that is added. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "TableAdded"; + /** + * + * Gets the id of the worksheet in which the table is added. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * + * Provides information about the table that raised the OnDeleted event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableDeletedEventArgs { + /** + * + * Specifies the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Specifies the id of the table that is deleted. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableId: string; + /** + * + * Specifies the name of the table that is deleted. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tableName: string; + /** + * + * Specifies the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "TableDeleted"; + /** + * + * Specifies the id of the worksheet in which the table is deleted. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * + * Provides information about the shape that raised the Activated event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeActivatedEventArgs { + /** + * + * Gets the id of the shape that is activated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shapeId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "ShapeActivated"; + /** + * + * Gets the id of the worksheet in which the shape is activated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * + * Provides information about the shape that raised the Deactivated event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeDeactivatedEventArgs { + /** + * + * Gets the id of the shape that is deactivated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shapeId: string; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "ShapeDeactivated"; + /** + * + * Gets the id of the worksheet in which the shape is deactivated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } /** * * Represents the Excel Runtime class. @@ -18416,6 +18754,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.5] */ class Runtime extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Turn on/off JavaScript events in current taskpane or content add-in. @@ -18458,6 +18798,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Runtime; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Runtime object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RuntimeData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RuntimeData; } /** @@ -18467,6 +18811,26 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the Iterative Calculation settings. + On Excel for Windows and Excel for Mac, the settings will apply to the Excel Application. + On Excel Online and Excel for other platforms, the settings will apply to the active workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly iterativeCalculation: Excel.IterativeCalculation; + /** + * + * Returns a number about the version of Excel Calculation Engine that the workbook was last fully recalculated by. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly calculationEngineVersion: number; /** * * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. @@ -18474,6 +18838,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * + * Returns a CalculationState that indicates the calculation state of the application. See Excel.CalculationState for details. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly calculationState: Excel.CalculationState | "Done" | "Calculating" | "Pending"; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -18513,6 +18885,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ suspendApiCalculationUntilNextSync(): void; + /** + * + * Suspends sceen updating until the next "context.sync()" is called. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + suspendScreenUpdatingUntilNextSync(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -18534,8 +18914,87 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ApplicationData; } + /** + * + * Represents the Iterative Calculation settings. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class IterativeCalculation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * True if Excel will use iteration to resolve circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled: boolean; + /** + * + * Returns or sets the maximum amount of change between each iteration as Excel resolves circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxChange: number; + /** + * + * Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxIteration: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.IterativeCalculation): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.IterativeCalculationUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.IterativeCalculation): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.IterativeCalculation` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.IterativeCalculation` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.IterativeCalculation` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.IterativeCalculationLoadOptions): Excel.IterativeCalculation; + load(option?: string | string[]): Excel.IterativeCalculation; + load(option?: { + select?: string; + expand?: string; + }): Excel.IterativeCalculation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.IterativeCalculation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.IterativeCalculationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.IterativeCalculationData; + } /** * * Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. @@ -18543,6 +19002,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class Workbook extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the Excel application instance that contains this workbook. Read-only. @@ -18557,6 +19018,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly bindings: Excel.BindingCollection; + /** + * + * Represents a collection of Comments associated with the workbook. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly comments: Excel.CommentCollection; /** * * Represents the collection of custom XML parts contained by this workbook. Read-only. @@ -18634,6 +19103,40 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly worksheets: Excel.WorksheetCollection; + /** + * + * True if the workbook is in auto save mode. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly autoSave: boolean; + /** + * + * Returns a number about the version of Excel Calculation Engine. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly calculationEngineVersion: number; + /** + * + * True if all charts in the workbook are tracking the actual data points to which they are attached. + False if the charts track the index of the data points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + chartDataPointTrack: boolean; + /** + * + * True if no changes have been made to the specified workbook since it was last saved. + You can set this property to True if you want to close a modified workbook without either saving it or being prompted to save it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDirty: boolean; /** * * Gets the workbook name. Read-only. @@ -18641,6 +19144,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly name: string; + /** + * + * True if the workbook has ever been saved locally or online. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly previouslySaved: boolean; /** * * True if the workbook is open in Read-only mode. Read-only. @@ -18648,6 +19159,23 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ readonly readOnly: boolean; + /** + * + * True if the workbook uses the 1904 date system. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + use1904DateSystem: boolean; + /** + * + * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. + Data will permanently lose accuracy when switching this property from false to true. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + usePrecisionAsDisplayed: boolean; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -18662,6 +19190,25 @@ declare namespace Excel { set(properties: Interfaces.WorkbookUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Workbook): void; + /** + * + * Close current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: Excel.CloseBehavior): void; + /** + * + * Close current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param closeBehavior workbook close behavior. + */ + close(closeBehavior?: "Save" | "SkipSave"): void; /** * * Gets the currently active cell from the workbook. @@ -18669,6 +19216,31 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ getActiveCell(): Excel.Range; + /** + * + * Gets the currently active chart in the workbook. If there is no active chart, will throw exception when invoke this statement + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getActiveChart(): Excel.Chart; + /** + * + * Gets the currently active chart in the workbook. If there is no active chart, will return null object + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getActiveChartOrNullObject(): Excel.Chart; + /** + * + * True if the workbook is being edited by multiple users (co-authoring). + Please be aware there might be some delay between when the workbook status changes and when the changes are reflected on the result of the method. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getIsActiveCollabSession(): OfficeExtension.ClientResult; /** * * Gets the currently selected single range from the workbook. If there are multiple ranges selected, this method will throw an error. @@ -18676,6 +19248,33 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ getSelectedRange(): Excel.Range; + /** + * + * Gets the currently selected one or more ranges from the workbook. Unlike getSelectedRange(), this method returns a RangeAreas object that represents all the selected ranges. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getSelectedRanges(): Excel.RangeAreas; + /** + * + * Save current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param saveBehavior workbook save behavior. + */ + save(saveBehavior?: Excel.SaveBehavior): void; + /** + * + * Save current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param saveBehavior workbook save behavior. + */ + save(saveBehavior?: "Save" | "Prompt"): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -18697,6 +19296,16 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Workbook; + /** + * + * Occurs when AutoSave setting is changed on the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onAutoSaveSettingChanged: OfficeExtension.EventHandlers; /** * * Occurs when the selection in the document is changed. @@ -18706,6 +19315,10 @@ declare namespace Excel { * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Workbook object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.WorkbookData; } /** @@ -18715,6 +19328,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class WorkbookProtection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Indicates if the workbook is protected. Read-Only. @@ -18761,6 +19376,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.WorkbookProtection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.WorkbookProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookProtectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.WorkbookProtectionData; } /** @@ -18770,6 +19389,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class WorkbookCreated extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -18790,6 +19411,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.WorkbookCreated; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.WorkbookCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorkbookCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.WorkbookCreatedData; } /** @@ -18797,11 +19422,18 @@ declare namespace Excel { * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. * * [Api set: ExcelApi 1.1] - * - * @remarks - * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-worksheets | how-to guide on working with worksheets} has detailed walkthroughs and code samples. */ class Worksheet extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the AutoFilter object of the worksheet. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly autoFilter: Excel.AutoFilter; /** * * Returns collection of charts that are part of the worksheet. Read-only. @@ -18816,6 +19448,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly freezePanes: Excel.WorksheetFreezePanes; + /** + * + * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly horizontalPageBreaks: Excel.PageBreakCollection; /** * * Collection of names scoped to the current worksheet. Read-only. @@ -18823,6 +19463,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ readonly names: Excel.NamedItemCollection; + /** + * + * Gets the PageLayout object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly pageLayout: Excel.PageLayout; /** * * Collection of PivotTables that are part of the worksheet. Read-only. @@ -18837,6 +19485,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly protection: Excel.WorksheetProtection; + /** + * + * Returns the collection of all the Shape objects on the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shapes: Excel.ShapeCollection; /** * * Collection of tables that are part of the worksheet. Read-only. @@ -18844,6 +19500,23 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly tables: Excel.TableCollection; + /** + * + * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly verticalPageBreaks: Excel.PageBreakCollection; + /** + * + * Gets or sets the enableCalculation property of the worksheet. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableCalculation: boolean; /** * * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. @@ -18969,6 +19642,30 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ delete(): void; + /** + * + * Finds all occurrences of the given string based on the criteria specified and returns them as a RangeAreas object, comprising one or more rectangular ranges. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param criteria Additional Criteria. + * @returns A RangeArea object, comprising one or more rectangular ranges, that matches the search criteria. If no cells meet this criteria, an ItemNotFound error will be thrown. + */ + findAll(text: string, criteria: Excel.WorksheetSearchCriteria): Excel.RangeAreas; + /** + * + * Finds all occurrences of the given string based on the criteria specified and returns them as a RangeAreas object, comprising one or more rectangular ranges. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param criteria Additional Criteria. + * @returns A RangeArea object, comprising one or more rectangular ranges, that matches the search criteria. If there are no matches, this function will return a null object. + */ + findAllOrNullObject(text: string, criteria: Excel.WorksheetSearchCriteria): Excel.RangeAreas; /** * * Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it stays within the worksheet grid. @@ -19036,6 +19733,16 @@ declare namespace Excel { * @param columnCount Number of columns to include in the range. */ getRangeByIndexes(startRow: number, startColumn: number, rowCount: number, columnCount: number): Excel.Range; + /** + * + * Gets the RangeAreas object, representing one or more blocks of rectangular ranges, specified by the address or name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param address Optional. A string containing the comma-separated addresses or names of the individual ranges. For example, "A1:B2, A5:B5". If not specified, an RangeArea object for the entire worksheet is returned. + */ + getRanges(address?: string): Excel.RangeAreas; /** * * The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the entire worksheet is blank, this function will return the top left cell (i.e. it will *not* throw an error). @@ -19054,6 +19761,19 @@ declare namespace Excel { * @param valuesOnly Optional. Considers only cells with values as used cells. */ getUsedRangeOrNullObject(valuesOnly?: boolean): Excel.Range; + /** + * + * Finds and replaces the given string based on the criteria specified within the current worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param replacement String to replace the original with. + * @param criteria Additional Replace Criteria. + * @returns The number of replacements performed. + */ + replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -19111,6 +19831,26 @@ declare namespace Excel { * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when filter is applied on a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * + * Occurs when format changed on a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; /** * * Occurs when the selection changes on a specific worksheet. @@ -19120,6 +19860,10 @@ declare namespace Excel { * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Worksheet object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.WorksheetData; } /** @@ -19129,6 +19873,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class WorksheetCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Worksheet[]; /** @@ -19140,6 +19886,33 @@ declare namespace Excel { * @param name Optional. The name of the worksheet to be added. If specified, name should be unqiue. If not specified, Excel determines the name of the new worksheet. */ add(name?: string): Excel.Worksheet; + /** + * + * Inserts the specified worksheets of a workbook into the current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64File Required. Base64 string representing the source workbook. + * @param sheetNamesToInsert Optional. The speified worksheet names to insert. By default it will insert all worksheets from the source workbook. + * @param positionType Optional. Insert position type, see Excel.WorksheetPositionType for details. Default is "Start". + * @param relativeTo Optional. The referencing worksheet object or worksheet name/id in the current workbook. Default is null and based on the postionType parameter it will insert worksheets at the start or end of the current workbook. + * @returns An array where each item represents the Id of the new inserted worksheet. + */ + addFromBase64(base64File: string, sheetNamesToInsert?: string[], positionType?: Excel.WorksheetPositionType, relativeTo?: Worksheet | string): OfficeExtension.ClientResult; + /** + * + * Inserts the specified worksheets of a workbook into the current workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param base64File Required. Base64 string representing the source workbook. + * @param sheetNamesToInsert Optional. The speified worksheet names to insert. By default it will insert all worksheets from the source workbook. + * @param positionType Optional. Insert position type, see Excel.WorksheetPositionType for details. Default is "Start". + * @param relativeTo Optional. The referencing worksheet object or worksheet name/id in the current workbook. Default is null and based on the postionType parameter it will insert worksheets at the start or end of the current workbook. + * @returns An array where each item represents the Id of the new inserted worksheet. + */ + addFromBase64(base64File: string, sheetNamesToInsert?: string[], positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Worksheet | string): OfficeExtension.ClientResult; /** * * Gets the currently active worksheet in the workbook. @@ -19237,6 +20010,16 @@ declare namespace Excel { * @eventproperty */ readonly onCalculated: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet in the workbook is changed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onChanged: OfficeExtension.EventHandlers; /** * * Occurs when any worksheet in the workbook is deactivated. @@ -19255,6 +20038,40 @@ declare namespace Excel { * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet's filter is applied in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * + * Occurs when any worksheet in the workbook has format changed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the selection changes on any worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.WorksheetCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.WorksheetCollectionData; } /** @@ -19264,6 +20081,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class WorksheetProtection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Sheet protection options. Read-only. @@ -19318,6 +20137,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.WorksheetProtection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.WorksheetProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetProtectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.WorksheetProtectionData; } /** @@ -19430,6 +20253,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class WorksheetFreezePanes extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Sets the frozen cells in the active worksheet view. @@ -19482,6 +20307,10 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ unfreeze(): void; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.WorksheetFreezePanes object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.WorksheetFreezePanesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; @@ -19491,11 +20320,10 @@ declare namespace Excel { * Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc. * * [Api set: ExcelApi 1.1] - * - * @remarks - * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-ranges | how-to guide on working with ranges} has detailed walkthroughs, images, and code samples. */ class Range extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Collection of ConditionalFormats that intersect the range. Read-only. @@ -19597,6 +20425,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ formulasR1C1: any[][]; + /** + * + * Represents if all cells have a spill border. + Returns true if all cells have a spill border, or false if all cells do not have a spill border. + Returns null if there are cells both with and without spill borders within the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly hasSpill: boolean; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -19625,6 +20463,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly isEntireRow: boolean; + /** + * + * Represents the data type state of each cell. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly linkedDataTypeState: Excel.LinkedDataTypeState[][]; /** * * Represents Excel's number format code for the given range. @@ -19732,6 +20578,52 @@ declare namespace Excel { * @param applyTo Optional. Determines the type of clear action. See Excel.ClearApplyTo for details. */ clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; + /** + * + * Converts the range cells with datatypes into text. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + convertDataTypeToText(): void; + /** + * + * Converts the range cells into linked datatype in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param serviceID The Service ID which will be used to query the data. + * @param languageCulture Language Culture to query the service for. + */ + convertToLinkedDataType(serviceID: number, languageCulture: string): void; + /** + * + * Copies cell data or formatting from the source range or RangeAreas to the current range. + The destination range can be of different size than the source range or RangeAreas. The destination will be expanded automatically if it is smaller than the source. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param sourceRange The source range or RangeAreas to copy from. When the source RangeAreas has multiple ranges, it must in the outline form which can be created by removing full rows or columns from a rectangular range. + * @param copyType The type of cell data or formatting to copy over. Default is "All". + * @param skipBlanks True if to skip blank cells in the source range. Default is false. + * @param transpose True if to transpose the cells in the destination range. Default is false. + */ + copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean): void; + /** + * + * Copies cell data or formatting from the source range or RangeAreas to the current range. + The destination range can be of different size than the source range or RangeAreas. The destination will be expanded automatically if it is smaller than the source. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param sourceRange The source range or RangeAreas to copy from. When the source RangeAreas has multiple ranges, it must in the outline form which can be created by removing full rows or columns from a rectangular range. + * @param copyType The type of cell data or formatting to copy over. Default is "All". + * @param skipBlanks True if to skip blank cells in the source range. Default is false. + * @param transpose True if to transpose the cells in the destination range. Default is false. + */ + copyFrom(sourceRange: Range | RangeAreas | string, copyType?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean): void; /** * * Deletes the cells associated with the range. @@ -19750,6 +20642,33 @@ declare namespace Excel { * @param shift Specifies which way to shift the cells. See Excel.DeleteShiftDirection for details. */ delete(shift: "Up" | "Left"): void; + /** + * + * Finds the given string based on the criteria specified. + If the current range is larger than a single cell, then the search will be limited to that range, else the search will cover the entire sheet starting after that cell. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param criteria Additional Criteria. + * @returns The Range which matched the search criteria. + */ + find(text: string, criteria: Excel.SearchCriteria): Excel.Range; + /** + * + * Finds the given string based on the criteria specified. + If the current range is larger than a single cell, then the search will be limited to that range, else the search will cover the entire sheet starting after that cell. + If there are no matches, this function will return a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param criteria Additional Criteria. + * @returns The Range which matched the search criteria. + */ + findOrNullObject(text: string, criteria: Excel.SearchCriteria): Excel.Range; /** * * Gets a Range object with the same top-left cell as the current Range object, but with the specified numbers of rows and columns. @@ -19913,6 +20832,68 @@ declare namespace Excel { * @param count Optional. The number of rows to include in the resulting range. In general, use a positive number to create a range outside the current range. You can also use a negative number to create a range within the current range. The default value is 1. */ getRowsBelow(count?: number): Excel.Range; + /** + * + * Gets the RangeAreas object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value. + If no special cells are found, an ItemNotFound error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; + /** + * + * Gets the RangeAreas object, comprising one or more rectangular ranges, that represents all the cells that match the specified type and value. + If no special cells are found, an ItemNotFound error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCells(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Comments" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; + /** + * + * Gets the RangeAreas object, comprising one or more ranges, that represents all the cells that match the specified type and value. + If no special cells are found, a null object will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; + /** + * + * Gets the RangeAreas object, comprising one or more ranges, that represents all the cells that match the specified type and value. + If no special cells are found, a null object will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCellsOrNullObject(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Comments" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; + /** + * + * Gets the range object containing the anchor cell for a cell getting spilled into. Fails if applied to a range with more than one cell. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getSpillParent(): Excel.Range; + /** + * + * Gets the range object containing the spill range when called on an anchor cell. Fails if applied to a range with more than one cell. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getSpillingToRange(): Excel.Range; /** * * Returns a Range object that represents the surrounding region for the top-left cell in this range. A surrounding region is a range bounded by any combination of blank rows and blank columns relative to this range. @@ -19920,6 +20901,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ getSurroundingRegion(): Excel.Range; + /** + * + * Gets a scoped collection of tables that overlap with the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param fullyContained If true, returns only tables that are fully contained within the range bounds. The default value is false. + */ + getTables(fullyContained?: boolean): Excel.TableScopedCollection; /** * * Returns the used range of the given range object. If there are no used cells within the range, this function will throw an ItemNotFound error. @@ -19972,6 +20963,31 @@ declare namespace Excel { * @param across Optional. Set true to merge cells in each row of the specified range as separate merged cells. The default value is false. */ merge(across?: boolean): void; + /** + * + * Removes duplicate values from the range specified by the columns. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param columns The columns inside the range that may contain duplicates. At least one column needs to be specified. Zero-indexed. + * @param includesHeader True if the input data contains header. Default is false. + * @returns The resulting object that contains the number of rows removed and the number of remaining unique rows. + */ + removeDuplicates(columns: number[], includesHeader: boolean): Excel.RemoveDuplicatesResult; + /** + * + * Finds and replaces the given string based on the criteria specified within the current range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text String to find. + * @param replacement String to replace the original with. + * @param criteria Additional Replace Criteria. + * @returns The number of replacements performed. + */ + replaceAll(text: string, replacement: string, criteria: Excel.ReplaceCriteria): OfficeExtension.ClientResult; /** * * Selects the specified range in the Excel UI. @@ -19979,6 +20995,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ select(): void; + /** + * + * Set a range to be recalculated when the next recalculation occurs. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setDirty(): void; /** * * Displays the card for an active cell if it has rich value content. @@ -20022,6 +21046,10 @@ declare namespace Excel { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Excel.Range; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeData; } /** @@ -20075,6 +21103,452 @@ declare namespace Excel { */ textToDisplay?: string; } + /** + * + * RangeAreas represents a collection of one or more rectangular ranges in the same worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangeAreas extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns a collection of rectangular ranges that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly areas: Excel.RangeCollection; + /** + * + * Returns a collection of ConditionalFormats that intersect with any cells in this RangeAreas object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly conditionalFormats: Excel.ConditionalFormatCollection; + /** + * + * Returns a dataValidation object for all ranges in the RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly dataValidation: Excel.DataValidation; + /** + * + * Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly format: Excel.RangeFormat; + /** + * + * Returns the worksheet for the current RangeAreas. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly worksheet: Excel.Worksheet; + /** + * + * Returns the RageAreas reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g. "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly address: string; + /** + * + * Returns the RageAreas reference in the user locale. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly addressLocal: string; + /** + * + * Returns the number of rectangular ranges that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly areaCount: number; + /** + * + * Returns the number of cells in the RangeAreas object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly cellCount: number; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire columns (e.g., "A:C, Q:Z"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isEntireColumn: boolean; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire rows (e.g., "1:3, 5:7"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isEntireRow: boolean; + /** + * + * Represents the style for all ranges in this RangeAreas object. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.RangeAreas): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeAreasUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.RangeAreas): void; + /** + * + * Calculates all cells in the RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculate(): void; + /** + * + * Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param applyTo Optional. Determines the type of clear action. See Excel.ClearApplyTo for details. Default is "All". + */ + clear(applyTo?: Excel.ClearApplyTo): void; + /** + * + * Clears values, format, fill, border, etc on each of the areas that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param applyTo Optional. Determines the type of clear action. See Excel.ClearApplyTo for details. Default is "All". + */ + clear(applyTo?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void; + /** + * + * Converts all cells in the RangeAreas with datatypes into text. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + convertDataTypeToText(): void; + /** + * + * Converts all cells in the RangeAreas into linked datatype. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param serviceID The Service ID which will be used to query the data. + * @param languageCulture Language Culture to query the service for. + */ + convertToLinkedDataType(serviceID: number, languageCulture: string): void; + /** + * + * Copies cell data or formatting from the source range or RangeAreas to the current RangeAreas. + The destination rangeAreas can be of different size than the source range or RangeAreas. The destination will be expanded automatically if it is smaller than the source. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param sourceRange The source range or RangeAreas to copy from. When the source RangeAreas has multiple ranges, it must be in the outline form which can be created by removing full rows or columns from a rectangular range. + * @param copyType The type of cell data or formatting to copy over. Default is "All". + * @param skipBlanks True if to skip blank cells in the source range or RangeAreas. Default is false. + * @param transpose True if to transpose the cells in the destination RangeAreas. Default is false. + */ + copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean, transpose?: boolean): void; + /** + * + * Copies cell data or formatting from the source range or RangeAreas to the current RangeAreas. + The destination rangeAreas can be of different size than the source range or RangeAreas. The destination will be expanded automatically if it is smaller than the source. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param sourceRange The source range or RangeAreas to copy from. When the source RangeAreas has multiple ranges, it must be in the outline form which can be created by removing full rows or columns from a rectangular range. + * @param copyType The type of cell data or formatting to copy over. Default is "All". + * @param skipBlanks True if to skip blank cells in the source range or RangeAreas. Default is false. + * @param transpose True if to transpose the cells in the destination RangeAreas. Default is false. + */ + copyFrom(sourceRange: Range | RangeAreas | string, copyType?: "All" | "Formulas" | "Values" | "Formats", skipBlanks?: boolean, transpose?: boolean): void; + /** + * + * Returns a RangeAreas object that represents the entire columns of the RangeAreas (for example, if the current RangeAreas represents cells "B4:E11, H2", it returns a RangeAreas that represents columns "B:E, H:H"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getEntireColumn(): Excel.RangeAreas; + /** + * + * Returns a RangeAreas object that represents the entire rows of the RangeAreas (for example, if the current RangeAreas represents cells "B4:E11", it returns a RangeAreas that represents rows "4:11"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getEntireRow(): Excel.RangeAreas; + /** + * + * Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. If no intersection is found, an ItemNotFound error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param anotherRange The range, RangeAreas object or range address that will be used to determine the intersection. + */ + getIntersection(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; + /** + * + * Returns the RangeAreas object that represents the intersection of the given ranges or RangeAreas. If no intersection is found, a null object is returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param anotherRange The range, RangeAreas, or address that will be used to determine the intersection. + */ + getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string): Excel.RangeAreas; + /** + * + * Returns an RangeAreas object that is shifted by the specific row and column offset. The dimension of the returned RangeAreas will match the original object. If the resulting RangeAreas is forced outside the bounds of the worksheet grid, an error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param rowOffset The number of rows (positive, negative, or 0) by which the RangeAreas is to be offset. Positive values are offset downward, and negative values are offset upward. + * @param columnOffset The number of columns (positive, negative, or 0) by which the RangeAreas is to be offset. Positive values are offset to the right, and negative values are offset to the left. + */ + getOffsetRangeAreas(rowOffset: number, columnOffset: number): Excel.RangeAreas; + /** + * + * Returns a RangeAreas object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; + /** + * + * Returns a RangeAreas object that represents all the cells that match the specified type and value. Throws an error if no special cells are found that match the criteria. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCells(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Comments" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; + /** + * + * Returns a RangeAreas object that represents all the cells that match the specified type and value. Returns a null object if no special cells are found that match the criteria. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas; + /** + * + * Returns a RangeAreas object that represents all the cells that match the specified type and value. Returns a null object if no special cells are found that match the criteria. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cellType The type of cells to include. + * @param cellValueType If cellType is either Constants or Formulas, this argument is used to determine which types of cells to include in the result. These values can be combined together to return more than one type. The default is to select all constants or formulas, no matter what the type. + */ + getSpecialCellsOrNullObject(cellType: "ConditionalFormats" | "DataValidations" | "Blanks" | "Comments" | "Constants" | "Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueType?: "All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"): Excel.RangeAreas; + /** + * + * Returns a scoped collection of tables that overlap with any range in this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param fullyContained If true, returns only tables that are fully contained within the range bounds. Default is false. + */ + getTables(fullyContained?: boolean): Excel.TableScopedCollection; + /** + * + * Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object. + If there are no used cells within the RangeAreas, the ItemNotFound error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param valuesOnly Whether to only consider cells with values as used cells. Default is false. + */ + getUsedRangeAreas(valuesOnly?: boolean): Excel.RangeAreas; + /** + * + * Returns the used RangeAreas that comprises all the used areas of individual rectangular ranges in the RangeAreas object. + If there are no used cells within the RangeAreas, a null object will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param valuesOnly Whether to only consider cells with values as used cells. + */ + getUsedRangeAreasOrNullObject(valuesOnly?: boolean): Excel.RangeAreas; + /** + * + * Sets the RangeAreas to be recalculated when the next recalculation occurs. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + setDirty(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeAreas` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeAreas` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeAreas` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeAreasLoadOptions): Excel.RangeAreas; + load(option?: string | string[]): Excel.RangeAreas; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeAreas; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Excel.RangeAreas; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Excel.RangeAreas; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeAreas object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeAreasData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.RangeAreasData; + } + /** + * + * Represents the search criteria to be used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SearchCriteria { + /** + * + * Specifies whether the match needs to be complete or partial. Default is false (partial). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completeMatch?: boolean; + /** + * + * Specifies whether the match is case sensitive. Default is false (insensitive). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + matchCase?: boolean; + /** + * + * Specifies the search direction. Default is forward. See Excel.SearchDirection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + searchDirection?: Excel.SearchDirection | "Forward" | "Backwards"; + } + /** + * + * Represents the worksheet search criteria to be used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetSearchCriteria { + /** + * + * Specifies whether the match needs to be complete or partial. Default is false (partial). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completeMatch?: boolean; + /** + * + * Specifies whether the match is case sensitive. Default is false (insensitive). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + matchCase?: boolean; + } + /** + * + * Represents the replace criteria to be used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ReplaceCriteria { + /** + * + * Specifies whether the match needs to be complete or partial. Default is false (partial). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + completeMatch?: boolean; + /** + * + * Specifies whether the match is case sensitive. Default is false (insensitive). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + matchCase?: boolean; + } /** * * RangeView represents a set of visible cells of the parent range. @@ -20082,6 +21556,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ class RangeView extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents a collection of range views associated with the range. Read-only. @@ -20208,6 +21684,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RangeView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeViewData; } /** @@ -20217,6 +21697,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ class RangeViewCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RangeView[]; /** @@ -20253,6 +21735,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; load(option?: string | string[]): Excel.RangeViewCollection; load(option?: OfficeExtension.LoadOption): Excel.RangeViewCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.RangeViewCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeViewCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.RangeViewCollectionData; } /** @@ -20262,6 +21748,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ class SettingCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Setting[]; /** @@ -20326,6 +21814,10 @@ declare namespace Excel { * @eventproperty */ readonly onSettingsChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.SettingCollectionData; } /** @@ -20335,6 +21827,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ class Setting extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; private static DateJSONPrefix; private static DateJSONSuffix; private static replaceStringDateWithDate(value); @@ -20394,6 +21888,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Setting; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Setting object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.SettingData; } /** @@ -20403,6 +21901,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class NamedItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.NamedItem[]; /** @@ -20472,6 +21972,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; load(option?: string | string[]): Excel.NamedItemCollection; load(option?: OfficeExtension.LoadOption): Excel.NamedItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.NamedItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.NamedItemCollectionData; } /** @@ -20481,6 +21985,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class NamedItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns an object containing values and types of the named item. Read-only. @@ -20607,6 +22113,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.NamedItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.NamedItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.NamedItemData; } /** @@ -20616,6 +22126,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class NamedItemArrayValues extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the types for each item in the named item array @@ -20651,6 +22163,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.NamedItemArrayValues; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.NamedItemArrayValues object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.NamedItemArrayValuesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.NamedItemArrayValuesData; } /** @@ -20660,6 +22176,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class Binding extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents binding identifier. Read-only. @@ -20741,6 +22259,10 @@ declare namespace Excel { * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Binding object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.BindingData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.BindingData; } /** @@ -20750,6 +22272,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class BindingCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Binding[]; /** @@ -20879,6 +22403,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; load(option?: string | string[]): Excel.BindingCollection; load(option?: OfficeExtension.LoadOption): Excel.BindingCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.BindingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.BindingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.BindingCollectionData; } /** @@ -20888,6 +22416,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class TableCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Table[]; /** @@ -20959,6 +22489,16 @@ declare namespace Excel { load(option?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; load(option?: string | string[]): Excel.TableCollection; load(option?: OfficeExtension.LoadOption): Excel.TableCollection; + /** + * + * Occurs when new table is added in a workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onAdded: OfficeExtension.EventHandlers; /** * * Occurs when data changes on any table in a workbook, or a worksheet. @@ -20968,18 +22508,111 @@ declare namespace Excel { * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the specified table is deleted in a workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * + * Occurs when filter is applied on any table in a workbook, or a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.TableCollectionData; } + /** + * + * Represents a scoped collection of tables. For each table its top-left corner is considered its anchor location and the tables are sorted top to bottom and then left to right. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class TableScopedCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Table[]; + /** + * + * Gets the number of tables in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets the first table in the collection. The tables in the collection are sorted top to bottom and left to right, such that top left table is the first table in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getFirst(): Excel.Table; + /** + * + * Gets a table by Name or ID. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key Name or ID of the table to be retrieved. + */ + getItem(key: string): Excel.Table; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TableScopedCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TableScopedCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TableScopedCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TableScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableScopedCollection; + load(option?: string | string[]): Excel.TableScopedCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableScopedCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.TableScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.TableScopedCollectionData; + } /** * * Represents an Excel table. * * [Api set: ExcelApi 1.1] - * - * @remarks - * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-tables | how-to guide on working with tables} has detailed walkthroughs, images, and code samples. */ class Table extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the AutoFilter object of the table. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly autoFilter: Excel.AutoFilter; /** * * Represents a collection of all the columns in the table. Read-only. @@ -21106,6 +22739,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ clearFilters(): void; + /** + * + * Changes the table to use the default table style. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clearStyle(): void; /** * * Converts the table into a normal range of cells. All data is preserved. @@ -21185,6 +22826,16 @@ declare namespace Excel { * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when filter is applied on a specific table. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onFiltered: OfficeExtension.EventHandlers; /** * * Occurs when the selection changes on a specific table. @@ -21194,6 +22845,10 @@ declare namespace Excel { * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TableData; } /** @@ -21203,6 +22858,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class TableColumnCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TableColumn[]; /** @@ -21275,6 +22932,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; load(option?: string | string[]): Excel.TableColumnCollection; load(option?: OfficeExtension.LoadOption): Excel.TableColumnCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.TableColumnCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableColumnCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.TableColumnCollectionData; } /** @@ -21284,6 +22945,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class TableColumn extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Retrieve the filter applied to the column. Read-only. @@ -21389,6 +23052,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.TableColumn; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TableColumn object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableColumnData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TableColumnData; } /** @@ -21403,6 +23070,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class TableRowCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.TableRow[]; /** @@ -21466,6 +23135,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; load(option?: string | string[]): Excel.TableRowCollection; load(option?: OfficeExtension.LoadOption): Excel.TableRowCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.TableRowCollectionData; } /** @@ -21480,6 +23153,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class TableRow extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. @@ -21543,6 +23218,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.TableRow; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TableRowData; } /** @@ -21552,6 +23231,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class DataValidation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Error alert when user enters invalid data. @@ -21617,6 +23298,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ clear(): void; + /** + * + * Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will throw an ItemNotFound error. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getInvalidCells(): Excel.RangeAreas; + /** + * + * Returns a RangeAreas, comprising one or more rectangular ranges, with invalid cell values. If all cell values are valid, this function will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getInvalidCellsOrNullObject(): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -21638,6 +23335,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.DataValidation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.DataValidation object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataValidationData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.DataValidationData; } /** @@ -21697,6 +23398,59 @@ declare namespace Excel { */ wholeNumber?: Excel.BasicDataValidation; } + /** + * + * Represents the results from the removeDuplicates method on range + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RemoveDuplicatesResult extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Number of duplicated rows removed by the operation. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly removed: number; + /** + * + * Number of remaining unique rows present in the resulting range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly uniqueRemaining: number; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RemoveDuplicatesResult` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RemoveDuplicatesResult` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RemoveDuplicatesResult` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RemoveDuplicatesResultLoadOptions): Excel.RemoveDuplicatesResult; + load(option?: string | string[]): Excel.RemoveDuplicatesResult; + load(option?: { + select?: string; + expand?: string; + }): Excel.RemoveDuplicatesResult; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RemoveDuplicatesResult object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RemoveDuplicatesResultData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.RemoveDuplicatesResultData; + } /** * * Represents the Basic Type data validation criteria. @@ -21779,11 +23533,12 @@ declare namespace Excel { inCellDropDown: boolean; /** * - * The source of the list for data validation. The value is a string, which can either be a range reference (e.g. `"=Names!$A$1:$A$3"`) or a comma-separated list of the values themselves. + * Source of the list for data validation + When setting the value, it can be passed in as a Excel Range object, or a string that contains comma separated number, boolean or date. * * [Api set: ExcelApi 1.8] */ - source: string; + source: string | Range; } /** * @@ -21872,6 +23627,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class RangeFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Collection of border objects that apply to the overall range. Read-only. @@ -21900,6 +23657,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly protection: Excel.FormatProtection; + /** + * + * Indicates if text is automatically indented when text alignment is set to equal distribution. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoIndent: boolean; /** * * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. @@ -21914,6 +23679,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ horizontalAlignment: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * An integer from 0 to 250 that indicates the indent level. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + indentLevel: number; + /** + * + * The reading order for the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. @@ -21921,6 +23702,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ rowHeight: number; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shrinkToFit: boolean; /** * * Gets or sets the text orientation of all the cells within the range. @@ -22013,6 +23802,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RangeFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeFormatData; } /** @@ -22022,6 +23815,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class FormatProtection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. @@ -22071,6 +23866,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.FormatProtection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.FormatProtection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FormatProtectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.FormatProtectionData; } /** @@ -22080,6 +23879,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class RangeFill extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") @@ -22087,6 +23888,42 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color: string; + /** + * + * Gets or sets the pattern of a Range. See Excel.FillPattern for details. LinearGradient and RectangularGradient are not supported. + A null value indicates that the entire range doesn't have uniform pattern setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pattern: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * + * Sets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + Gets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternColor: string; + /** + * + * Returns or sets a double that lightens or darkens a pattern color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the pattern tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternTintAndShade: number; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade: number; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -22129,6 +23966,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RangeFill; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFillData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeFillData; } /** @@ -22138,6 +23979,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class RangeBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). @@ -22159,6 +24002,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ style: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the border doesn't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade: number; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. @@ -22201,6 +24053,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RangeBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeBorderData; } /** @@ -22210,6 +24066,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class RangeBorderCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RangeBorder[]; /** @@ -22219,6 +24077,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly count: number; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Borders, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire border collections don't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade: number; /** * * Gets a border object using its name. @@ -22264,6 +24131,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; load(option?: string | string[]): Excel.RangeBorderCollection; load(option?: OfficeExtension.LoadOption): Excel.RangeBorderCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.RangeBorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeBorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.RangeBorderCollectionData; } /** @@ -22273,6 +24144,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class RangeFont extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the bold status of font. @@ -22308,6 +24181,45 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ size: number; + /** + * + * Represents the strikethrough status of font. A null value indicates that the entire range doesn't have uniform Strikethrough setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + strikethrough: boolean; + /** + * + * Represents the Subscript status of font. + Returns True if all the fonts of the range are Subscript. + Returns False if all the fonts of the range are Superscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + subscript: boolean; + /** + * + * Represents the Superscript status of font. + Returns True if all the fonts of the range are Superscript. + Returns False if all the fonts of the range are Subscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + superscript: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Font, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire range doesn't have uniform font tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade: number; /** * * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. @@ -22350,6 +24262,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RangeFont; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeFontData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RangeFontData; } /** @@ -22359,6 +24275,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Chart[]; /** @@ -22479,6 +24397,10 @@ declare namespace Excel { * @eventproperty */ readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ChartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ChartCollectionData; } /** @@ -22486,11 +24408,10 @@ declare namespace Excel { * Represents a chart object in a workbook. * * [Api set: ExcelApi 1.1] - * - * @remarks - * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-charts | how-to guide on working with charts} has detailed walkthroughs, images, and code samples. */ class Chart extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents chart axes. Read-only. @@ -22519,6 +24440,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly legend: Excel.ChartLegend; + /** + * + * Encapsulates the options for the pivot chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly pivotOptions: Excel.ChartPivotOptions; /** * * Represents the plotArea for the chart. @@ -22549,7 +24478,8 @@ declare namespace Excel { readonly worksheet: Excel.Worksheet; /** * - * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to the level of where the category labels are being sourced from. Read/Write. + * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to + the level of where the category labels are being sourced from. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -22612,7 +24542,8 @@ declare namespace Excel { plotVisibleOnly: boolean; /** * - * Returns or sets a ChartSeriesNameLevel enumeration constant referring to the level of where the series names are being sourced from. Read/Write. + * Returns or sets a ChartSeriesNameLevel enumeration constant referring to + the level of where the series names are being sourced from. Read/Write. * * [Api set: ExcelApi 1.8] */ @@ -22668,6 +24599,14 @@ declare namespace Excel { set(properties: Interfaces.ChartUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Chart): void; + /** + * + * Activate the chart in the Excel UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + activate(): void; /** * * Deletes the chart object. @@ -22768,8 +24707,96 @@ declare namespace Excel { * @eventproperty */ readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Chart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartData; } + /** + * + * Encapsulates the options for the pivot chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartPivotOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents whether to display axis field buttons on a PivotChart. + The ShowAxisFieldButtons property corresponds to the Show Axis Field Buttons command on the Field Buttons drop-down list of the Analyze tab, which is available when a PivotChart is selected. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAxisFieldButtons: boolean; + /** + * + * Represents whether to display legend field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLegendFieldButtons: boolean; + /** + * + * Represents whether to display report filter field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showReportFilterFieldButtons: boolean; + /** + * + * Represents whether to display show value field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showValueFieldButtons: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartPivotOptions): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartPivotOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartPivotOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartPivotOptions` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartPivotOptions` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartPivotOptions` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartPivotOptionsLoadOptions): Excel.ChartPivotOptions; + load(option?: string | string[]): Excel.ChartPivotOptions; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPivotOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartPivotOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPivotOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartPivotOptionsData; + } /** * * Encapsulates the format properties for the overall chart area. @@ -22777,6 +24804,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAreaFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format of chart area, which includes color, linestyle, and weight. Read-only. @@ -22798,6 +24827,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly font: Excel.ChartFont; + /** + * + * Returns or sets an integer that represents the color scheme for the chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + colorScheme: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * + * True if the chart area of the chart has rounded corners. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + roundedCorners: boolean; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -22833,6 +24878,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAreaFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAreaFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAreaFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAreaFormatData; } /** @@ -22842,6 +24891,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartSeriesCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartSeries[]; /** @@ -22895,6 +24946,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; load(option?: string | string[]): Excel.ChartSeriesCollection; load(option?: OfficeExtension.LoadOption): Excel.ChartSeriesCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ChartSeriesCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ChartSeriesCollectionData; } /** @@ -22904,6 +24959,24 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartSeries extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Encapsulates the bin options only for histogram chart and pareto chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly binOptions: Excel.ChartBinOptions; + /** + * + * Encapsulates the options for the Box & Whisker chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly boxwhiskerOptions: Excel.ChartBoxwhiskerOptions; /** * * Represents a collection of all dataLabels in the series. @@ -22918,6 +24991,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ readonly format: Excel.ChartSeriesFormat; + /** + * + * Encapsulates the options for the Map chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly mapOptions: Excel.ChartMapOptions; /** * * Represents a collection of all points in the series. Read-only. @@ -22932,6 +25013,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly trendlines: Excel.ChartTrendlineCollection; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly xerrorBars: Excel.ChartErrorBars; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly yerrorBars: Excel.ChartErrorBars; /** * * Returns or sets the group for the specified series. Read/Write @@ -22939,6 +25036,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the scale factor for bubbles in the specified chart group. Can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bubbleScale: number; /** * * Represents the chart type of a series. See Excel.ChartType for details. @@ -22983,6 +25088,86 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ gapWidth: number; + /** + * + * Returns or sets the Color for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumColor: string; + /** + * + * Returns or sets the type for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumValue: number; + /** + * + * Returns or sets the Color for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointColor: string; + /** + * + * Returns or sets the type for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointValue: number; + /** + * + * Returns or sets the Color for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumColor: string; + /** + * + * Returns or sets the type for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumType: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumValue: number; + /** + * + * Returns or sets series gradient style of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientStyle: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * * Boolean value representing if the series has data labels or not. @@ -22990,6 +25175,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ hasDataLabels: boolean; + /** + * + * Returns or sets the fill color for negative data points in a series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + invertColor: string; /** * * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. @@ -23039,6 +25232,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ overlap: number; + /** + * + * Returns or sets series parent label strategy area of a treemap chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentLabelStrategy: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * * Represents the plot order of a chart series within the chart group. @@ -23053,6 +25254,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ secondPlotSize: number; + /** + * + * Returns or sets if connector lines show in a waterfall chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showConnectorLines: boolean; + /** + * + * True if Microsoft Excel show leaderlines for each datalabel in series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLeaderLines: boolean; /** * * Boolean value representing if the series has a shadow or not. @@ -23073,7 +25290,15 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] */ - splitType: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + splitType: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + splitValue: number; /** * * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. @@ -23150,6 +25375,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartSeries; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartSeries object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartSeriesData; } /** @@ -23159,6 +25388,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartSeriesFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the fill format of a chart series, which includes background formating information. Read-only. @@ -23208,6 +25439,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartSeriesFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartSeriesFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartSeriesFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartSeriesFormatData; } /** @@ -23217,6 +25452,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartPointsCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartPoint[]; /** @@ -23260,6 +25497,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; load(option?: string | string[]): Excel.ChartPointsCollection; load(option?: OfficeExtension.LoadOption): Excel.ChartPointsCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ChartPointsCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointsCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ChartPointsCollectionData; } /** @@ -23269,6 +25510,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartPoint extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the data label of a chart point. Read-only. @@ -23360,6 +25603,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartPoint; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartPoint object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartPointData; } /** @@ -23369,6 +25616,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartPointFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format of a chart data point, which includes color, style, and weight information. Read-only. @@ -23418,6 +25667,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartPointFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartPointFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPointFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartPointFormatData; } /** @@ -23427,6 +25680,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAxes extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the category axis in a chart. Read-only. @@ -23503,6 +25758,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAxes; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAxes object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAxesData; } /** @@ -23512,6 +25771,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAxis extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of a chart object, which includes line and font formatting. Read-only. @@ -23603,6 +25864,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ readonly left: number; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat: boolean; /** * * Represents the base of the logarithm when using logarithmic scales. @@ -23696,7 +25965,7 @@ declare namespace Excel { position: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * - * Represents the specified axis position where the other axis crosses at. You should use the SetPositionAt(double) method to set this property. + * Represents the specified axis position where the other axis crosses at. Read Only. Set to this property should use SetPositionAt(double) method. * * [Api set: ExcelApi 1.8] */ @@ -23840,6 +26109,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAxis; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAxis object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAxisData; } /** @@ -23849,6 +26122,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAxisFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents chart fill formatting. Read-only. @@ -23905,6 +26180,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAxisFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAxisFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAxisFormatData; } /** @@ -23914,6 +26193,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAxisTitle extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of chart axis title. Read-only. @@ -23979,6 +26260,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAxisTitle; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAxisTitle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisTitleData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAxisTitleData; } /** @@ -23988,6 +26273,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartAxisTitleFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format, which includes color, linestyle, and weight. @@ -24044,6 +26331,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartAxisTitleFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartAxisTitleFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartAxisTitleFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartAxisTitleFormatData; } /** @@ -24053,6 +26344,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartDataLabels extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the format of chart data labels, which includes fill and font formatting. Read-only. @@ -24062,18 +26355,27 @@ declare namespace Excel { readonly format: Excel.ChartDataLabelFormat; /** * - * Represents whether data labels automatically generate appropriate text based on context. + * Represents whether data labels automatically generates appropriate text based on context. * * [Api set: ExcelApi 1.8] */ autoText: boolean; /** * - * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. This property is valid only when TextOrientation of data label is 0. + * Represents the horizontal alignment for chart data label. See Excel.ChartTextHorizontalAlignment for details. + This property is valid only when TextOrientation of data label is 0. * * [Api set: ExcelApi 1.8] */ horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat: boolean; /** * * Represents the format code for data labels. @@ -24146,7 +26448,8 @@ declare namespace Excel { textOrientation: number; /** * - * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. This property is valid only when TextOrientation of data label is -90, 90, or 180. + * Represents the vertical alignment of chart data label. See Excel.ChartTextVerticalAlignment for details. + This property is valid only when TextOrientation of data label is 90, -90 or 180. * * [Api set: ExcelApi 1.8] */ @@ -24186,6 +26489,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartDataLabels; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartDataLabels object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelsData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartDataLabelsData; } /** @@ -24195,6 +26502,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartDataLabel extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the format of chart data label. @@ -24238,6 +26547,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat: boolean; /** * * String value that represents the format code for data label. @@ -24372,6 +26689,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartDataLabel; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartDataLabel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartDataLabelData; } /** @@ -24381,6 +26702,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartDataLabelFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format, which includes color, linestyle, and weight. Read-only. @@ -24437,8 +26760,162 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartDataLabelFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartDataLabelFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartDataLabelFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartDataLabelFormatData; } + /** + * + * This object represents the attributes for chart error bars object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartErrorBars extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the formatting of chart ErrorBars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly format: Excel.ChartErrorBarsFormat; + /** + * + * Represents whether have the end style cap for the error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + endStyleCap: boolean; + /** + * + * Represents which error-bar parts to include. See Excel.ChartErrorBarsInclude for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + include: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * + * Represents the range marked by error bars. See Excel.ChartErrorBarsType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * + * Represents whether shown error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartErrorBars): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartErrorBarsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartErrorBars): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartErrorBars` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartErrorBars` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartErrorBars` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartErrorBarsLoadOptions): Excel.ChartErrorBars; + load(option?: string | string[]): Excel.ChartErrorBars; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartErrorBars; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartErrorBars object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartErrorBarsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartErrorBarsData; + } + /** + * + * Encapsulates the format properties for chart error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartErrorBarsFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly line: Excel.ChartLineFormat; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartErrorBarsFormat): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartErrorBarsFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartErrorBarsFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartErrorBarsFormat` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartErrorBarsFormat` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartErrorBarsFormat` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions): Excel.ChartErrorBarsFormat; + load(option?: string | string[]): Excel.ChartErrorBarsFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartErrorBarsFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartErrorBarsFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartErrorBarsFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartErrorBarsFormatData; + } /** * * Represents major or minor gridlines on a chart axis. @@ -24446,6 +26923,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartGridlines extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of chart gridlines. Read-only. @@ -24495,6 +26974,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartGridlines; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartGridlines object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartGridlinesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartGridlinesData; } /** @@ -24504,6 +26987,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartGridlinesFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents chart line formatting. Read-only. @@ -24546,6 +27031,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartGridlinesFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartGridlinesFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartGridlinesFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartGridlinesFormatData; } /** @@ -24555,6 +27044,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartLegend extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. @@ -24660,6 +27151,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartLegend; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartLegend object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartLegendData; } /** @@ -24669,6 +27164,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartLegendEntry extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the height of the legendEntry on the chart Legend. @@ -24746,6 +27243,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartLegendEntry; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartLegendEntry object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendEntryData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartLegendEntryData; } /** @@ -24755,6 +27256,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartLegendEntryCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartLegendEntry[]; /** @@ -24791,6 +27294,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.ChartLegendEntryCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartLegendEntryCollection; load(option?: string | string[]): Excel.ChartLegendEntryCollection; load(option?: OfficeExtension.LoadOption): Excel.ChartLegendEntryCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ChartLegendEntryCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendEntryCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ChartLegendEntryCollectionData; } /** @@ -24800,6 +27307,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartLegendFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format, which includes color, linestyle, and weight. Read-only. @@ -24856,8 +27365,87 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartLegendFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartLegendFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLegendFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartLegendFormatData; } + /** + * + * Encapsulates the properties for Map chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartMapOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns or sets series map labels strategy of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + labelStrategy: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * + * Returns or sets series map area of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * + * Returns or sets series projection type of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + projectionType: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartMapOptions): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartMapOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartMapOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartMapOptions` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartMapOptions` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartMapOptions` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartMapOptionsLoadOptions): Excel.ChartMapOptions; + load(option?: string | string[]): Excel.ChartMapOptions; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartMapOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartMapOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartMapOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartMapOptionsData; + } /** * * Represents a chart title object of a chart. @@ -24865,6 +27453,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartTitle extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of a chart title, which includes fill and font formatting. Read-only. @@ -25010,6 +27600,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTitle; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTitle object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTitleData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTitleData; } /** @@ -25019,6 +27613,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartFormatString extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the font attributes, such as font name, font size, color, etc. of chart characters object. @@ -25061,6 +27657,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartFormatString; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartFormatString object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFormatStringData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartFormatStringData; } /** @@ -25070,6 +27670,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartTitleFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format of chart title, which includes color, linestyle, and weight. Read-only. @@ -25126,6 +27728,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTitleFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTitleFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTitleFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTitleFormatData; } /** @@ -25135,6 +27741,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartFill extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ @@ -25155,6 +27763,10 @@ declare namespace Excel { * @param color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). */ setSolidColor(color: string): void; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFillData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; @@ -25166,6 +27778,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of borders in the chart. @@ -25229,8 +27843,210 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartBorderData; } + /** + * + * Encapsulates the bon options only for histogram chart and pareto chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartBinOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns or sets if bin overflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowOverflow: boolean; + /** + * + * Returns or sets if bin underflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowUnderflow: boolean; + /** + * + * Returns or sets count of bin of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + count: number; + /** + * + * Returns or sets bin overflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + overflowValue: number; + /** + * + * Returns or sets bin type of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * + * Returns or sets bin underflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underflowValue: number; + /** + * + * Returns or sets bin width value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartBinOptions): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartBinOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartBinOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartBinOptions` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartBinOptions` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartBinOptions` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartBinOptionsLoadOptions): Excel.ChartBinOptions; + load(option?: string | string[]): Excel.ChartBinOptions; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartBinOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartBinOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBinOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartBinOptionsData; + } + /** + * + * Represents the properties for Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ChartBoxwhiskerOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns or sets quartile calculation type of a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + quartileCalculation: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * + * Returns or sets if inner points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showInnerPoints: boolean; + /** + * + * Returns or sets if mean line showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanLine: boolean; + /** + * + * Returns or sets if mean marker showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanMarker: boolean; + /** + * + * Returns or sets if outlier points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showOutlierPoints: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ChartBoxwhiskerOptions): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ChartBoxwhiskerOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ChartBoxwhiskerOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ChartBoxwhiskerOptions` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ChartBoxwhiskerOptions` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ChartBoxwhiskerOptions` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions): Excel.ChartBoxwhiskerOptions; + load(option?: string | string[]): Excel.ChartBoxwhiskerOptions; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartBoxwhiskerOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartBoxwhiskerOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartBoxwhiskerOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ChartBoxwhiskerOptionsData; + } /** * * Encapsulates the formatting options for line elements. @@ -25238,6 +28054,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartLineFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of lines in the chart. @@ -25301,6 +28119,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartLineFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartLineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartLineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartLineFormatData; } /** @@ -25310,6 +28132,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ class ChartFont extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the bold status of font. @@ -25387,6 +28211,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartFont; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartFontData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartFontData; } /** @@ -25396,6 +28224,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartTrendline extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of a chart trendline. @@ -25515,6 +28345,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTrendline; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTrendline object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTrendlineData; } /** @@ -25524,6 +28358,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartTrendlineCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ChartTrendline[]; /** @@ -25578,6 +28414,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.ChartTrendlineCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartTrendlineCollection; load(option?: string | string[]): Excel.ChartTrendlineCollection; load(option?: OfficeExtension.LoadOption): Excel.ChartTrendlineCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ChartTrendlineCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ChartTrendlineCollectionData; } /** @@ -25587,6 +28427,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class ChartTrendlineFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents chart line formatting. Read-only. @@ -25629,6 +28471,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTrendlineFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTrendlineFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTrendlineFormatData; } /** @@ -25638,6 +28484,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class ChartTrendlineLabel extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the format of chart trendline label. @@ -25681,6 +28529,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat: boolean; /** * * String value that represents the format code for trendline label. @@ -25759,6 +28615,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTrendlineLabel; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTrendlineLabel object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineLabelData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTrendlineLabelData; } /** @@ -25768,6 +28628,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class ChartTrendlineLabelFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border format, which includes color, linestyle, and weight. @@ -25824,6 +28686,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartTrendlineLabelFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartTrendlineLabelFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartTrendlineLabelFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartTrendlineLabelFormatData; } /** @@ -25833,6 +28699,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class ChartPlotArea extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the formatting of a chart plotArea. @@ -25938,6 +28806,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartPlotArea; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartPlotArea object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPlotAreaData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartPlotAreaData; } /** @@ -25947,6 +28819,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class ChartPlotAreaFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the border attributes of a chart plotArea. @@ -25996,6 +28870,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ChartPlotAreaFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ChartPlotAreaFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ChartPlotAreaFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ChartPlotAreaFormatData; } /** @@ -26005,6 +28883,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class RangeSort extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Perform a sort operation. @@ -26031,6 +28911,10 @@ declare namespace Excel { * @param method Optional. The ordering method used for Chinese characters. */ apply(fields: Excel.SortField[], matchCase?: boolean, hasHeaders?: boolean, orientation?: "Rows" | "Columns", method?: "PinYin" | "StrokeCount"): void; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RangeSort object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeSortData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; @@ -26042,6 +28926,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class TableSort extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the current conditions used to last sort the table. Read-only. @@ -26120,6 +29006,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.TableSort; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TableSort object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TableSortData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TableSortData; } /** @@ -26171,6 +29061,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ sortOn?: Excel.SortOn | "Value" | "CellColor" | "FontColor" | "Icon"; + /** + * + * Represents the subfield that is the target property name of a rich value to sort on. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + subField?: string; } /** * @@ -26179,6 +29076,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class Filter extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The currently applied filter on the given column. Read-only. @@ -26335,6 +29234,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Filter; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Filter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.FilterData; } /** @@ -26396,6 +29299,13 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ operator?: Excel.FilterOperator | "And" | "Or"; + /** + * + * The property used by the filter to do rich filter on richvalues. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + subField?: string; /** * * The set of values to be used as part of "values" filtering. @@ -26426,6 +29336,120 @@ declare namespace Excel { */ specificity: Excel.FilterDatetimeSpecificity | "Year" | "Month" | "Day" | "Hour" | "Minute" | "Second"; } + /** + * + * Represents the AutoFilter object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class AutoFilter extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Array that holds all filter criterias in an autofiltered range. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly criteria: Excel.FilterCriteria[]; + /** + * + * Indicates if the AutoFilter is enabled or not. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly enabled: boolean; + /** + * + * Indicates if the AutoFilter has filter criteria. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isDataFiltered: boolean; + /** + * + * Applies AutoFilter on a range and filters the column if column index and filter criteria are specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param range The range where the AutoFilter will apply on. + * @param columnIndex The column index which the AutoFilter will apply on, start from 0. + * @param criteria The filter criteria. + */ + apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria): void; + /** + * + * Clears the criteria if AutoFilter has filters + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clearCriteria(): void; + /** + * + * Returns the Range object that represents the range to which the AutoFilter applies. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getRange(): Excel.Range; + /** + * + * If there is Range object associated with the AutoFilter, this method returns it. + Otherwise, this method returns a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getRangeOrNullObject(): Excel.Range; + /** + * + * Applies the specified Autofilter object currently on the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + reapply(): void; + /** + * + * Removes the AutoFilter for the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + remove(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.AutoFilter` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.AutoFilter` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.AutoFilter` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.AutoFilterLoadOptions): Excel.AutoFilter; + load(option?: string | string[]): Excel.AutoFilter; + load(option?: { + select?: string; + expand?: string; + }): Excel.AutoFilter; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.AutoFilter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.AutoFilterData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.AutoFilterData; + } /** * * Represents a cell icon. @@ -26446,7 +29470,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.2] */ - set: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + set: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes" | "LinkedEntityFinanceIcon" | "LinkedEntityMapIcon"; } /** * @@ -26457,6 +29481,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.5] */ class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomXmlPart[]; /** @@ -26519,6 +29545,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; load(option?: string | string[]): Excel.CustomXmlPartScopedCollection; load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.CustomXmlPartScopedCollectionData; } /** @@ -26528,6 +29558,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.5] */ class CustomXmlPartCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomXmlPart[]; /** @@ -26592,6 +29624,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; load(option?: string | string[]): Excel.CustomXmlPartCollection; load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.CustomXmlPartCollectionData; } /** @@ -26601,6 +29637,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.5] */ class CustomXmlPart extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The custom XML part's ID. Read-only. @@ -26659,6 +29697,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.CustomXmlPart; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.CustomXmlPart object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.CustomXmlPartData; } /** @@ -26668,6 +29710,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ class PivotTableCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotTable[]; /** @@ -26732,6 +29776,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; load(option?: string | string[]): Excel.PivotTableCollection; load(option?: OfficeExtension.LoadOption): Excel.PivotTableCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.PivotTableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.PivotTableCollectionData; } /** @@ -26739,11 +29787,10 @@ declare namespace Excel { * Represents an Excel PivotTable. * * [Api set: ExcelApi 1.3] - * - * @remarks - * Our {@link https://docs.microsoft.com/office/dev/add-ins/excel/excel-add-ins-pivottables | how-to guide on working with PivotTables} has detailed walkthroughs, images, and code samples. */ class PivotTable extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The Column Pivot Hierarchies of the PivotTable. @@ -26807,6 +29854,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ name: string; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useCustomSortLists: boolean; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -26856,6 +29911,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PivotTable; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PivotTable object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotTableData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PivotTableData; } /** @@ -26865,6 +29924,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotLayout extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * True if the field list should be shown or hidden from the UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableFieldList: boolean; /** * * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. @@ -26907,6 +29976,19 @@ declare namespace Excel { set(properties: Interfaces.PivotLayoutUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.PivotLayout): void; + /** + * + * Gets the cell in the PivotTable's data body that contains the value for the intersection of the specified dataHierarchy, rowItems, and columnItems. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param dataHierarchy The dataHierarchy that provides the data item to find. + * @param rowItems The PivotItems from the row axis that make up the value to find. + * @param columnItems The PivotItems from the column axis that make up the value to find. + * @returns A range specifying a single cell that contains the value specified. + */ + getCell(dataHierarchy: DataPivotHierarchy | string, rowItems: Array, columnItems: Array): Excel.Range; /** * * Returns the range where the PivotTable's column labels reside. @@ -26921,6 +30003,17 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ getDataBodyRange(): Excel.Range; + /** + * + * Gets the DataHierarchy that is used to calculate the value in a specified range within the PivotTable. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cell A single cell within the PivotTable data body to get the data hieararchy for. + * @returns The DataPivotHierarchy object used to calculate the value in the specified cell. + */ + getDataHierarchy(cell: Range | string): Excel.DataPivotHierarchy; /** * * Returns the range of the PivotTable's filter area. @@ -26928,6 +30021,29 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ getFilterAxisRange(): Excel.Range; + /** + * + * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param axis The axis to get the PivotItems from. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body to get the PivotItems for. + * @returns A collection of PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: Excel.PivotAxis, cell: Range | string): OfficeExtension.ClientResult; + /** + * + * Gets the PivotItems from an axis that make up the value in a specified range within the PivotTable. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param axis The axis to get the PivotItems from. Must be either "row" or "column." + * @param cell A single cell within the PivotTable's data body to get the PivotItems for. + * @returns A collection of PivotItems that are used to calculate the values in the specified row. + */ + getPivotItems(axis: "Unknown" | "Row" | "Column" | "Data" | "Filter", cell: Range | string): OfficeExtension.ClientResult; /** * * Returns the range the PivotTable exists on, excluding the filter area. @@ -26942,6 +30058,27 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ getRowLabelRange(): Excel.Range; + /** + * + * Sets an autosort using the specified cell to automatically select all criteria and context for the sort. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param cell A single cell to use get the criteria from for applying the autosort. + * @param sortby The direction of the sort. + */ + setAutosortOnCell(cell: Range | string, sortby: Excel.SortBy): void; + /** + * + * Sets an autosort using the specified cell to automatically select all criteria and context for the sort. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param cell A single cell to use get the criteria from for applying the autosort. + * @param sortby The direction of the sort. + */ + setAutosortOnCell(cell: Range | string, sortby: "Ascending" | "Descending"): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -26963,6 +30100,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PivotLayout; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PivotLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotLayoutData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PivotLayoutData; } /** @@ -26972,6 +30113,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotHierarchyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotHierarchy[]; /** @@ -27017,6 +30160,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.PivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotHierarchyCollection; load(option?: string | string[]): Excel.PivotHierarchyCollection; load(option?: OfficeExtension.LoadOption): Excel.PivotHierarchyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.PivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.PivotHierarchyCollectionData; } /** @@ -27026,6 +30173,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotHierarchy extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the PivotFields associated with the PivotHierarchy. @@ -27082,6 +30231,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PivotHierarchy; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PivotHierarchyData; } /** @@ -27091,6 +30244,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class RowColumnPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.RowColumnPivotHierarchy[]; /** @@ -27151,6 +30306,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.RowColumnPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RowColumnPivotHierarchyCollection; load(option?: string | string[]): Excel.RowColumnPivotHierarchyCollection; load(option?: OfficeExtension.LoadOption): Excel.RowColumnPivotHierarchyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.RowColumnPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RowColumnPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.RowColumnPivotHierarchyCollectionData; } /** @@ -27160,6 +30319,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class RowColumnPivotHierarchy extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the PivotFields associated with the RowColumnPivotHierarchy. @@ -27230,6 +30391,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.RowColumnPivotHierarchy; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.RowColumnPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RowColumnPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.RowColumnPivotHierarchyData; } /** @@ -27239,6 +30404,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class FilterPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.FilterPivotHierarchy[]; /** @@ -27299,6 +30466,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.FilterPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.FilterPivotHierarchyCollection; load(option?: string | string[]): Excel.FilterPivotHierarchyCollection; load(option?: OfficeExtension.LoadOption): Excel.FilterPivotHierarchyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.FilterPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.FilterPivotHierarchyCollectionData; } /** @@ -27308,6 +30479,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class FilterPivotHierarchy extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the PivotFields associated with the FilterPivotHierarchy. @@ -27385,6 +30558,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.FilterPivotHierarchy; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.FilterPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FilterPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.FilterPivotHierarchyData; } /** @@ -27394,6 +30571,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class DataPivotHierarchyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.DataPivotHierarchy[]; /** @@ -27453,6 +30632,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.DataPivotHierarchyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.DataPivotHierarchyCollection; load(option?: string | string[]): Excel.DataPivotHierarchyCollection; load(option?: OfficeExtension.LoadOption): Excel.DataPivotHierarchyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.DataPivotHierarchyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataPivotHierarchyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.DataPivotHierarchyCollectionData; } /** @@ -27462,6 +30645,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class DataPivotHierarchy extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the PivotFields associated with the DataPivotHierarchy. @@ -27553,6 +30738,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.DataPivotHierarchy; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.DataPivotHierarchy object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataPivotHierarchyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.DataPivotHierarchyData; } /** @@ -27588,6 +30777,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotFieldCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotField[]; /** @@ -27633,6 +30824,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.PivotFieldCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotFieldCollection; load(option?: string | string[]): Excel.PivotFieldCollection; load(option?: OfficeExtension.LoadOption): Excel.PivotFieldCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.PivotFieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotFieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.PivotFieldCollectionData; } /** @@ -27642,6 +30837,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotField extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the PivotFields associated with the PivotField. @@ -27699,7 +30896,38 @@ declare namespace Excel { * * @param sortby Represents whether the sorting is done in an ascending or descending order. */ - sortByLabels(sortby: Excel.SortBy): void; + sortByLabels(sortby: SortBy): void; + /** + * + * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when + there are multiple values from the same DataPivotHierarchy. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param sortby Represents whether the sorting is done in an ascending or descending order. + * @param valuesHierarchy Specifies the values to be used for sorting. + * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the + items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, + the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis + you want to sort on, this can be empty. + */ + sortByValues(sortby: Excel.SortBy, valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; + /** + * + * Sorts the PivotField by specified values in a given scope. The scope defines which specific values will be used to sort when + there are multiple values from the same DataPivotHierarchy. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @param sortby Represents whether the sorting is done in an ascending or descending order. + * @param valuesHierarchy Specifies the values to be used for sorting. + * @param pivotItemScope The items that should be used for the scope of the sorting. These will be the + items that make up the row or column that you want to sort on. If a string is used instead of a PivotItem, + the string represents the ID of the PivotItem. If there are no items other than data hierarchy on the axis + you want to sort on, this can be empty. + */ + sortByValues(sortby: "Ascending" | "Descending", valuesHierarchy: Excel.DataPivotHierarchy, pivotItemScope?: Array): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -27721,6 +30949,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PivotField; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PivotField object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotFieldData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PivotFieldData; } /** @@ -27730,6 +30962,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.PivotItem[]; /** @@ -27775,6 +31009,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.PivotItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotItemCollection; load(option?: string | string[]): Excel.PivotItemCollection; load(option?: OfficeExtension.LoadOption): Excel.PivotItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.PivotItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.PivotItemCollectionData; } /** @@ -27784,6 +31022,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ class PivotItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Id of the PivotItem. @@ -27847,6 +31087,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PivotItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PivotItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PivotItemData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PivotItemData; } /** @@ -27875,6 +31119,22 @@ declare namespace Excel { variance?: boolean; varianceP?: boolean; } + /** + * + * Represents the criteria for the top/bottom values filter. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PivotFilterTopBottomCriterion { + invalid = "Invalid", + topItems = "TopItems", + topPercent = "TopPercent", + topSum = "TopSum", + bottomItems = "BottomItems", + bottomPercent = "BottomPercent", + bottomSum = "BottomSum", + } /** * * Represents the sort direction. @@ -27952,7 +31212,7 @@ declare namespace Excel { product = "Product", /** * - * Aggregate using the count of numbers in the data, equivalent to the COUNTA function. + * Aggregate using the count of numbers in the data, equivalent to the COUNT function. * */ countNumbers = "CountNumbers", @@ -28086,6 +31346,45 @@ declare namespace Excel { */ index = "Index", } + /** + * + * The ShowAs Calculation function for the Data Pivot Field. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PivotAxis { + /** + * + * The axis or region is unknown or unsupported. + * + */ + unknown = "Unknown", + /** + * + * The row axis. + * + */ + row = "Row", + /** + * + * The column axis. + * + */ + column = "Column", + /** + * + * The data axis. + * + */ + data = "Data", + /** + * + * The filter axis. + * + */ + filter = "Filter", + } /** * * Represents workbook properties. @@ -28093,6 +31392,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class DocumentProperties extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of custom properties of the workbook. Read only. @@ -28212,6 +31513,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.DocumentProperties; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.DocumentPropertiesData; } /** @@ -28221,6 +31526,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class CustomProperty extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the key of the custom property. Read only. @@ -28284,6 +31591,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.CustomProperty; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.CustomPropertyData; } /** @@ -28293,6 +31604,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.CustomProperty[]; /** @@ -28355,6 +31668,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.CustomPropertyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomPropertyCollection; load(option?: string | string[]): Excel.CustomPropertyCollection; load(option?: OfficeExtension.LoadOption): Excel.CustomPropertyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.CustomPropertyCollectionData; } /** @@ -28364,6 +31681,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalFormatCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.ConditionalFormat[]; /** @@ -28435,6 +31754,10 @@ declare namespace Excel { load(option?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; load(option?: string | string[]): Excel.ConditionalFormatCollection; load(option?: OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ConditionalFormatCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ConditionalFormatCollectionData; } /** @@ -28444,6 +31767,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the cell value conditional format properties if the current conditional format is a CellValue type. @@ -28630,6 +31955,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ getRangeOrNullObject(): Excel.Range; + /** + * + * Returns the RangeAreas, comprising one or more rectangular ranges, the conditonal format is applied to. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getRanges(): Excel.RangeAreas; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -28651,6 +31984,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalFormatData; } /** @@ -28660,6 +31997,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class DataBarConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Representation of all values to the left of the axis in an Excel data bar. Read-only. @@ -28752,6 +32091,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.DataBarConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.DataBarConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataBarConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.DataBarConditionalFormatData; } /** @@ -28761,6 +32104,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalDataBarPositiveFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). @@ -28818,6 +32163,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalDataBarPositiveFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalDataBarPositiveFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalDataBarPositiveFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalDataBarPositiveFormatData; } /** @@ -28827,6 +32176,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalDataBarNegativeFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). @@ -28891,6 +32242,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalDataBarNegativeFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalDataBarNegativeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalDataBarNegativeFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalDataBarNegativeFormatData; } /** @@ -28922,6 +32277,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class CustomConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. @@ -28971,6 +32328,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.CustomConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.CustomConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CustomConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.CustomConditionalFormatData; } /** @@ -28980,6 +32341,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalFormatRule extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The formula, if required, to evaluate the conditional format rule on. @@ -29036,6 +32399,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalFormatRule; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalFormatRule object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalFormatRuleData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalFormatRuleData; } /** @@ -29045,6 +32412,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class IconSetConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula, and operator will be ignored when set. @@ -29072,7 +32441,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.6] */ - style: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + style: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes" | "LinkedEntityFinanceIcon" | "LinkedEntityMapIcon"; /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * * @remarks @@ -29108,6 +32477,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.IconSetConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.IconSetConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.IconSetConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.IconSetConditionalFormatData; } /** @@ -29153,6 +32526,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ColorScaleConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The criteria of the color scale. Midpoint is optional when using a two point color scale. @@ -29202,6 +32577,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ColorScaleConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ColorScaleConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ColorScaleConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ColorScaleConditionalFormatData; } /** @@ -29269,6 +32648,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class TopBottomConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. @@ -29318,6 +32699,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.TopBottomConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TopBottomConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TopBottomConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TopBottomConditionalFormatData; } /** @@ -29349,6 +32734,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class PresetCriteriaConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. @@ -29398,6 +32785,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.PresetCriteriaConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PresetCriteriaConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PresetCriteriaConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.PresetCriteriaConditionalFormatData; } /** @@ -29422,6 +32813,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class TextConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. @@ -29471,6 +32864,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.TextConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TextConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.TextConditionalFormatData; } /** @@ -29502,6 +32899,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class CellValueConditionalFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. @@ -29551,6 +32950,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.CellValueConditionalFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.CellValueConditionalFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CellValueConditionalFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.CellValueConditionalFormatData; } /** @@ -29589,6 +32992,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalRangeFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Collection of border objects that apply to the overall conditional format range. Read-only. @@ -29652,6 +33057,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalRangeFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalRangeFormat object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalRangeFormatData; } /** @@ -29661,6 +33070,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalRangeFont extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the bold status of font. @@ -29738,6 +33149,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalRangeFont; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalRangeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFontData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalRangeFontData; } /** @@ -29747,6 +33162,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalRangeFill extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). @@ -29796,6 +33213,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalRangeFill; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalRangeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeFillData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalRangeFillData; } /** @@ -29805,6 +33226,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). @@ -29861,6 +33284,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.ConditionalRangeBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ConditionalRangeBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.ConditionalRangeBorderData; } /** @@ -29870,6 +33297,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorderCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the bottom border. Read-only. @@ -29952,8 +33381,20 @@ declare namespace Excel { load(option?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; load(option?: string | string[]): Excel.ConditionalRangeBorderCollection; load(option?: OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ConditionalRangeBorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ConditionalRangeBorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.ConditionalRangeBorderCollectionData; } + /** + * [Api set: CustomFunctions 1.1] + * @beta + */ + interface CustomFunctionEventArgs { + higherTicks: number; + lowerTicks: number; + } /** * * An object encapsulating a style's format and other properties. @@ -29961,6 +33402,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class Style extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * A Border collection of four Border objects that represent the style of the four borders. @@ -30164,6 +33607,10 @@ declare namespace Excel { select?: string; expand?: string; }): Excel.Style; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Style object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Excel.Interfaces.StyleData; } /** @@ -30173,6 +33620,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class StyleCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Excel.Style[]; /** @@ -30211,8 +33660,751 @@ declare namespace Excel { load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; load(option?: string | string[]): Excel.StyleCollection; load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Excel.Interfaces.StyleCollectionData; } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class PageLayout extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Header and footer configuration for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly headersFooters: Excel.HeaderFooterGroup; + /** + * + * Gets or sets the worksheet's black and white print option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + blackAndWhite: boolean; + /** + * + * Gets or sets the worksheet's bottom page margin to use for printing in points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin: number; + /** + * + * Gets or sets the worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHorizontally: boolean; + /** + * + * Gets or sets the worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerVertically: boolean; + /** + * + * Gets or sets the worksheet's draft mode option. If true the sheet will be printed without graphics. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + draftMode: boolean; + /** + * + * Gets or sets the worksheet's first page number to print. Null value represents "auto" page numbering. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPageNumber: number | ""; + /** + * + * Gets or sets the worksheet's footer margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + footerMargin: number; + /** + * + * Gets or sets the worksheet's header margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headerMargin: number; + /** + * + * Gets or sets the worksheet's left margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin: number; + /** + * + * Gets or sets the worksheet's orientation of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * + * Gets or sets the worksheet's paper size of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + paperSize: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; + /** + * + * Gets or sets whether the worksheet's comments should be displayed when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printComments: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * + * Gets or sets the worksheet's print errors option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printErrors: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * + * Gets or sets the worksheet's print gridlines flag. This flag determines whether gridlines will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printGridlines: boolean; + /** + * + * Gets or sets the worksheet's print headings flag. This flag determines whether headings will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printHeadings: boolean; + /** + * + * Gets or sets the worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printOrder: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * + * Gets or sets the worksheet's right margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin: number; + /** + * + * Gets or sets the worksheet's top margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin: number; + /** + * + * Gets or sets the worksheet's print zoom options. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zoom: Excel.PageLayoutZoomOptions; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.PageLayout): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.PageLayoutUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.PageLayout): void; + /** + * + * Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, an ItemNotFound error will be thrown. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintArea(): Excel.RangeAreas; + /** + * + * Gets the RangeAreas object, comprising one or more rectangular ranges, that represents the print area for the worksheet. If there is no print area, a null object will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintAreaOrNullObject(): Excel.RangeAreas; + /** + * + * Gets the range object representing the title columns. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintTitleColumns(): Excel.Range; + /** + * + * Gets the range object representing the title columns. If not set, this will return a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintTitleColumnsOrNullObject(): Excel.Range; + /** + * + * Gets the range object representing the title rows. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintTitleRows(): Excel.Range; + /** + * + * Gets the range object representing the title rows. If not set, this will return a null object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getPrintTitleRowsOrNullObject(): Excel.Range; + /** + * + * Sets the worksheet's print area. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param printArea The range, or RangeAreas of the content to print. + */ + setPrintArea(printArea: Range | RangeAreas | string): void; + /** + * + * Sets the worksheet's page margins with units. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set, margins not provided will remain unchanged. + */ + setPrintMargins(unit: Excel.PrintMarginUnit, marginOptions: Excel.PageLayoutMarginOptions): void; + /** + * + * Sets the worksheet's page margins with units. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param unit Measurement unit for the margins provided. + * @param marginOptions Margin values to set, margins not provided will remain unchanged. + */ + setPrintMargins(unit: "Points" | "Inches" | "Centimeters", marginOptions: Excel.PageLayoutMarginOptions): void; + /** + * + * Sets the columns that contain the cells to be repeated at the left of each page of the worksheet for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param printTitleColumns The columns to be repeated to the left of each page, range must span the entire column to be valid. + */ + setPrintTitleColumns(printTitleColumns: Range | string): void; + /** + * + * Sets the rows that contain the cells to be repeated at the top of each page of the worksheet for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param printTitleRows The rows to be repeated at the top of each page, range must span the entire row to be valid. + */ + setPrintTitleRows(printTitleRows: Range | string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PageLayout` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PageLayout` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PageLayout` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PageLayoutLoadOptions): Excel.PageLayout; + load(option?: string | string[]): Excel.PageLayout; + load(option?: { + select?: string; + expand?: string; + }): Excel.PageLayout; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PageLayout object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageLayoutData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.PageLayoutData; + } + /** + * + * Represents page zoom properties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface PageLayoutZoomOptions { + /** + * + * Number of pages to fit horizontally. This value can be null if percentage scale is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalFitToPages?: number; + /** + * + * Print page scale value can be between 10 and 400. This value can be null if fit to page tall or wide is specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + scale?: number; + /** + * + * Number of pages to fit vertically. This value can be null if percentage scale is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalFitToPages?: number; + } + /** + * + * Represents the options in page layout margins. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface PageLayoutMarginOptions { + /** + * + * Represents the page layout bottom margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottom?: number; + /** + * + * Represents the page layout footer margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + footer?: number; + /** + * + * Represents the page layout header margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + header?: number; + /** + * + * Represents the page layout left margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; + /** + * + * Represents the page layout right margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + right?: number; + /** + * + * Represents the page layout top margin in the unit specified to use for printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class HeaderFooter extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Gets or sets the center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerFooter: string; + /** + * + * Gets or sets the center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHeader: string; + /** + * + * Gets or sets the left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftFooter: string; + /** + * + * Gets or sets the left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftHeader: string; + /** + * + * Gets or sets the right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightFooter: string; + /** + * + * Gets or sets the right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightHeader: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.HeaderFooter): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.HeaderFooterUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.HeaderFooter): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.HeaderFooter` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.HeaderFooter` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.HeaderFooter` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.HeaderFooterLoadOptions): Excel.HeaderFooter; + load(option?: string | string[]): Excel.HeaderFooter; + load(option?: { + select?: string; + expand?: string; + }): Excel.HeaderFooter; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.HeaderFooter object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.HeaderFooterData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.HeaderFooterData; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class HeaderFooterGroup extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly defaultForAllPages: Excel.HeaderFooter; + /** + * + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly evenPages: Excel.HeaderFooter; + /** + * + * The first page header/footer, for all other pages general or even/odd is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly firstPage: Excel.HeaderFooter; + /** + * + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly oddPages: Excel.HeaderFooter; + /** + * + * Gets or sets the state of which headers/footers are set. See Excel.HeaderFooterState for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + state: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; + /** + * + * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetMargins: boolean; + /** + * + * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetScale: boolean; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.HeaderFooterGroup): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.HeaderFooterGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.HeaderFooterGroup): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.HeaderFooterGroup` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.HeaderFooterGroup` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.HeaderFooterGroup` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.HeaderFooterGroupLoadOptions): Excel.HeaderFooterGroup; + load(option?: string | string[]): Excel.HeaderFooterGroup; + load(option?: { + select?: string; + expand?: string; + }): Excel.HeaderFooterGroup; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.HeaderFooterGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.HeaderFooterGroupData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.HeaderFooterGroupData; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class PageBreak extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the column index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly columnIndex: number; + /** + * + * Represents the row index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly rowIndex: number; + /** + * + * Deletes a page break object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * + * Gets the first cell after the page break. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getStartCell(): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PageBreak` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PageBreak` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PageBreak` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PageBreakLoadOptions): Excel.PageBreak; + load(option?: string | string[]): Excel.PageBreak; + load(option?: { + select?: string; + expand?: string; + }): Excel.PageBreak; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.PageBreak object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageBreakData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.PageBreakData; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class PageBreakCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.PageBreak[]; + /** + * + * Adds a page break before the top-left cell of the range specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param pageBreakRange The range immediately after the page break to be added. + */ + add(pageBreakRange: Range | string): Excel.PageBreak; + /** + * + * Gets the number of page breaks in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a page break object via the index. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index of the page break. + */ + getItem(index: number): Excel.PageBreak; + /** + * + * Resets all manual page breaks in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + removePageBreaks(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.PageBreakCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.PageBreakCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.PageBreakCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.PageBreakCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PageBreakCollection; + load(option?: string | string[]): Excel.PageBreakCollection; + load(option?: OfficeExtension.LoadOption): Excel.PageBreakCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.PageBreakCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.PageBreakCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.PageBreakCollectionData; + } /** * * Represents a collection of all the Data Connections that are part of the workbook or worksheet. @@ -30220,6 +34412,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ class DataConnectionCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Refreshes all the Data Connections in the collection. @@ -30227,10 +34421,1459 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ refreshAll(): void; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.DataConnectionCollection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.DataConnectionCollectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class RangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Range[]; + /** + * + * Returns the number of ranges in the RangeCollection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns the range object based on its position in the RangeCollection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the range object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Range; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.RangeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.RangeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.RangeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.RangeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeCollection; + load(option?: string | string[]): Excel.RangeCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.RangeCollectionData; + } + /** + * + * Represents a collection of comment objects that are part of the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class CommentCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Comment[]; + /** + * + * Gets the number of comments in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a comment identified by its ID. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param commentId The identifier for the comment. + */ + getItem(commentId: string): Excel.Comment; + /** + * + * Gets a comment based on its position in the collection. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param index Index value of the object to be retrieved. Zero-indexed. + */ + getItemAt(index: number): Excel.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CommentCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CommentCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CommentCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CommentCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentCollection; + load(option?: string | string[]): Excel.CommentCollection; + load(option?: OfficeExtension.LoadOption): Excel.CommentCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.CommentCollectionData; + } + /** + * + * Represents a cell comment object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class Comment extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents a collection of reply objects associated with the comment. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly replies: Excel.CommentReplyCollection; + /** + * + * Represents the comment identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Represents whether it is a comment thread or reply. Always return true here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isParent: boolean; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Comment` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Comment` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Comment` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CommentLoadOptions): Excel.Comment; + load(option?: string | string[]): Excel.Comment; + load(option?: { + select?: string; + expand?: string; + }): Excel.Comment; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.CommentData; + } + /** + * + * Represents a collection of comment reply objects that are part of the comment. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class CommentReplyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.CommentReply[]; + /** + * + * Creates a comment reply for comment. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param content The comment content. + * @param contentType Optional. Type of the comment content + */ + add(content: string, contentType?: Excel.ContentType): Excel.CommentReply; + /** + * + * Creates a comment reply for comment. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param content The comment content. + * @param contentType Optional. Type of the comment content + */ + add(content: string, contentType?: "Plain"): Excel.CommentReply; + /** + * + * Returns a comment reply identified by its ID. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param commentReplyId The identifier for the comment reply. + */ + getItem(commentReplyId: string): Excel.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CommentReplyCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CommentReplyCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CommentReplyCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CommentReplyCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CommentReplyCollection; + load(option?: string | string[]): Excel.CommentReplyCollection; + load(option?: OfficeExtension.LoadOption): Excel.CommentReplyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.CommentReplyCollectionData; + } + /** + * + * Represents a cell comment reply object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class CommentReply extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the comment reply identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Represents whether it is a comment thread or reply. Always return false here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isParent: boolean; + /** + * + * Deletes the comment reply. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.CommentReply` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.CommentReply` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.CommentReply` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.CommentReplyLoadOptions): Excel.CommentReply; + load(option?: string | string[]): Excel.CommentReply; + load(option?: { + select?: string; + expand?: string; + }): Excel.CommentReply; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.CommentReply object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.CommentReplyData; + } + /** + * + * Represents all the shapes in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ShapeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Shape[]; + /** + * + * Adds a geometric shape to worksheet. Returns a Shape object that represents the new shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param geometricShapeType Represents the geometric type of the shape. See Excel.GeometricShapeType for details. + * @param left The distance, in points, from the left side of the shape to the left side of the worksheet. + * @param top The distance, in points, from the top edge of the shape to the top of the worksheet. + * @param width The width, in points, of the shape. + * @param height The height, in points, of the shape. + */ + addGeometricShape(geometricShapeType: Excel.GeometricShapeType, left: number, top: number, width: number, height: number): Excel.Shape; + /** + * + * Adds a geometric shape to worksheet. Returns a Shape object that represents the new shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param geometricShapeType Represents the geometric type of the shape. See Excel.GeometricShapeType for details. + * @param left The distance, in points, from the left side of the shape to the left side of the worksheet. + * @param top The distance, in points, from the top edge of the shape to the top of the worksheet. + * @param width The width, in points, of the shape. + * @param height The height, in points, of the shape. + */ + addGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", left: number, top: number, width: number, height: number): Excel.Shape; + /** + * + * Group a subset of shapes in a worksheet. Returns a Shape object that represents the new group of shapes. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param values An array of shape ID or shape objects. + */ + addGroup(values: Array): Excel.Shape; + /** + * + * Creates an image from a base64 string and adds it to worksheet. Returns the Shape object that represents the new Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param base64ImageString A base64 encoded image in JPEG or PNG formats. + */ + addImage(base64ImageString: string): Excel.Shape; + /** + * + * Creates an SVG from a XML string and adds it to worksheet. Returns a Shape object that represents the new Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xmlImageString An XML string that represents an SVG. + */ + addSVG(xmlImageString: string): Excel.Shape; + /** + * + * Adds a textbox to worksheet by telling it's text content. Returns a Shape object that represents the new text box. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param text Represents the text that will be shown in the created text box. + */ + addTextBox(text?: string): Excel.Shape; + /** + * + * Returns the number of shapes in the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a shape identified by the shape id. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param shapeId The identifier for the shape. + */ + getItem(shapeId: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ShapeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ShapeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ShapeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ShapeCollection; + load(option?: string | string[]): Excel.ShapeCollection; + load(option?: OfficeExtension.LoadOption): Excel.ShapeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.ShapeCollectionData; + } + /** + * + * Represents a generic shape object in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class Shape extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the fill formatting of the shape object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly fill: Excel.ShapeFill; + /** + * + * Returns the geometric shape for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GeometricShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly geometricShape: Excel.GeometricShape; + /** + * + * Returns the shape group for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GroupShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly group: Excel.ShapeGroup; + /** + * + * Returns the image for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly image: Excel.Image; + /** + * + * Returns the textFrame object of a shape. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly textFrame: Excel.TextFrame; + /** + * + * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription: string; + /** + * + * Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle: string; + /** + * + * Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; + /** + * + * Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height: number; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left: number; + /** + * + * Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio: boolean; + /** + * + * Represents the name of the shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly name: string; + /** + * + * Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * + * Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation: number; + /** + * + * The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top: number; + /** + * + * Returns the type of the specified shape. Read-only. See Excel.ShapeType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly type: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group"; + /** + * + * Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible: boolean; + /** + * + * Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width: number; + /** + * + * Returns the position of the specified shape in the z-order, the very bottom shape's z-order value is 0. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly zorderPosition: number; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.Shape): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.Shape): void; + /** + * + * Deletes the Shape + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * + * Moves the shape horizontally by the specified number of points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param increment Specifies how far the shape is to be moved horizontally, in points. A positive value moves the shape to the right; a negative value moves it to the left. If the sheet is RTL, IncrementLeft with a positive value should move the shape to the left instead of right. + */ + incrementLeft(increment: number): void; + /** + * + * Changes the rotation of the shape around the z-axis by the specified number of degrees. + Use the Rotation property to set the absolute rotation of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param increment Specifies how far the shape is to be rotated horizontally, in degrees. A positive value rotates the shape clockwise; a negative value rotates it counterclockwise. + */ + incrementRotation(increment: number): void; + /** + * + * Moves the shape vertically by the specified number of points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param increment Specifies how far the shape is to be moved vertically, in points. A positive value moves the shape down; a negative value moves it up. + */ + incrementTop(increment: number): void; + /** + * + * Saves the shape as a picture and returns the picture in the form of base64 encoded string, using the DPI sets to 96. Only support saves as to Excel.PictureFormat.BMP, Excel.PictureFormat.PNG, Excel.PictureFormat.JPEG and Excel.PictureFormat.GIF. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + saveAsPicture(format: Excel.PictureFormat): OfficeExtension.ClientResult; + /** + * + * Saves the shape as a picture and returns the picture in the form of base64 encoded string, using the DPI sets to 96. Only support saves as to Excel.PictureFormat.BMP, Excel.PictureFormat.PNG, Excel.PictureFormat.JPEG and Excel.PictureFormat.GIF. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + saveAsPicture(format: "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"): OfficeExtension.ClientResult; + /** + * + * Scales the height of the shape by a specified factor. For pictures, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType OriginalSize to scale the shape relative to its original size. CurrentSize to scale it relative to its current size. You can specify OriginalSize for this argument only if the specified shape is a picture. + * @param scaleFrom Optional. One of the constants of ShapeScaleFrom which specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. + */ + scaleHeight(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom): void; + /** + * + * Scales the height of the shape by a specified factor. For pictures, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param scaleFactor Specifies the ratio between the height of the shape after you resize it and the current or original height. + * @param scaleType OriginalSize to scale the shape relative to its original size. CurrentSize to scale it relative to its current size. You can specify OriginalSize for this argument only if the specified shape is a picture. + * @param scaleFrom Optional. One of the constants of ShapeScaleFrom which specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. + */ + scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; + /** + * + * Scales the width of the shape by a specified factor. For pictures, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType OriginalSize to scale the shape relative to its original size. CurrentSize to scale it relative to its current size. You can specify OriginalSize for this argument only if the specified shape is a picture. + * @param scaleFrom Optional. One of the constants of ShapeScaleFrom which specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. + */ + scaleWidth(scaleFactor: number, scaleType: Excel.ShapeScaleType, scaleFrom?: Excel.ShapeScaleFrom): void; + /** + * + * Scales the width of the shape by a specified factor. For pictures, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param scaleFactor Specifies the ratio between the width of the shape after you resize it and the current or original width. + * @param scaleType OriginalSize to scale the shape relative to its original size. CurrentSize to scale it relative to its current size. You can specify OriginalSize for this argument only if the specified shape is a picture. + * @param scaleFrom Optional. One of the constants of ShapeScaleFrom which specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents the shape's upper left corner retains its position. + */ + scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; + /** + * + * Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param value where to move the specified shape relative to the other shapes. See Excel.ShapeZOrder for detail. + */ + setZOrder(value: Excel.ShapeZOrder): void; + /** + * + * Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param value where to move the specified shape relative to the other shapes. See Excel.ShapeZOrder for detail. + */ + setZOrder(value: "BringToFront" | "BringForward" | "SendToBack" | "SendBackward"): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Shape` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Shape` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Shape` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeLoadOptions): Excel.Shape; + load(option?: string | string[]): Excel.Shape; + load(option?: { + select?: string; + expand?: string; + }): Excel.Shape; + /** + * + * Occurs when the shape is activated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onActivated: OfficeExtension.EventHandlers; + /** + * + * Occurs when the shape is activated. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onDeactivated: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeData; + } + /** + * + * Represents a geometric shape object inside a worksheet. A geometric shape can be a line, rectangle, block arrow, equation, flowchart, start, banner, callout or basic shape in Excel. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class GeometricShape extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the shape object for the geometric shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shape: Excel.Shape; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.GeometricShape` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.GeometricShape` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.GeometricShape` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.GeometricShapeLoadOptions): Excel.GeometricShape; + load(option?: string | string[]): Excel.GeometricShape; + load(option?: { + select?: string; + expand?: string; + }): Excel.GeometricShape; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.GeometricShape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.GeometricShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.GeometricShapeData; + } + /** + * + * Represents an image object in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class Image extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the shape object for the image. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shape: Excel.Shape; + /** + * + * Represents the shape identifier for the image object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Returns the format for the image. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly format: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.Image` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.Image` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Image` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ImageLoadOptions): Excel.Image; + load(option?: string | string[]): Excel.Image; + load(option?: { + select?: string; + expand?: string; + }): Excel.Image; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Image object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ImageData; + } + /** + * + * Represents a shape group object inside a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ShapeGroup extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns the shape object for the group. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shape: Excel.Shape; + /** + * + * Returns the shape collection in the group. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly shapes: Excel.GroupShapeCollection; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Ungroups any grouped shapes in the specified shape group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + ungroup(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ShapeGroup` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ShapeGroup` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ShapeGroup` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeGroupLoadOptions): Excel.ShapeGroup; + load(option?: string | string[]): Excel.ShapeGroup; + load(option?: { + select?: string; + expand?: string; + }): Excel.ShapeGroup; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ShapeGroup object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeGroupData; + } + /** + * + * Represents a shape collection inside a shape group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class GroupShapeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Excel.Shape[]; + /** + * + * Returns the number of shapes in the group shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a shape identified by the shape id. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param shapeId The identifier for the shape. + */ + getItem(shapeId: string): Excel.Shape; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.GroupShapeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.GroupShapeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.GroupShapeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.GroupShapeCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.GroupShapeCollection; + load(option?: string | string[]): Excel.GroupShapeCollection; + load(option?: OfficeExtension.LoadOption): Excel.GroupShapeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Excel.GroupShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.GroupShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Excel.Interfaces.GroupShapeCollectionData; + } + /** + * + * Represents the fill formatting for a shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ShapeFill extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the shape fill fore color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + foreColor: string; + /** + * + * Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). For API not supported shape types or special fill type with inconsistent transparencies, return null. For example, gradient fill type could have inconsistent transparencies. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency: number; + /** + * + * Returns the fill type of the shape. Read-only. See Excel.ShapeFillType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly type: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ShapeFill): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ShapeFill): void; + /** + * + * Clears the fill formatting of a shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + clear(): void; + /** + * + * Sets the fill formatting of a shape object to a uniform color, fill type changeing to Solid Fill. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param color A string that represents the fill color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + */ + setSolidColor(color: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ShapeFill` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ShapeFill` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ShapeFill` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeFillLoadOptions): Excel.ShapeFill; + load(option?: string | string[]): Excel.ShapeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.ShapeFill; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ShapeFill object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeFillData; + } + /** + * + * Represents the text frame for a shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class TextFrame extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + readonly textRange: Excel.TextRange; + /** + * + * Gets or sets the auto sizing settings for the text frame. A text frame can be set to auto size the text to fit the text frame, or auto size the text frame to fit the text, or without auto sizing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSize: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * + * Represents the bottom margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin: number; + /** + * + * Specifies whether the TextFrame contains text. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly hasText: boolean; + /** + * + * Represents the horizontal alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalAlignment: Excel.ShapeTextHorizontalAlignType | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed" | "ShapeTextHorizontalAlignType_MaxEnumIDs"; + /** + * + * Represents the horizontal overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalOverflow: Excel.ShapeTextHorzOverflowType | "Overflow" | "Clip" | "ShapeTextHorzOverflowType_MaxEnumIDs"; + /** + * + * Represents the left margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin: number; + /** + * + * Represents the text orientation of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation: Excel.ShapeTextOrientationType | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL" | "ShapeTextOrientationType_MaxEnumIDs"; + /** + * + * Represents the reading order of the text frame, RTL or LTR. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder: Excel.ShapeTextReadingOrder | "LTR" | "RTL"; + /** + * + * Represents the right margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin: number; + /** + * + * Represents the top margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin: number; + /** + * + * Represents the vertical alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalAlignment: Excel.ShapeTextVerticalAlignType | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed" | "ShapeTextVerticalAlignType_MaxEnumIDs"; + /** + * + * Represents the vertical overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalOverflow: Excel.ShapeTextVertOverflowType | "Overflow" | "Ellipsis" | "Clip" | "ShapeTextVertOverflowType_MaxEnumIDs"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TextFrame): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TextFrame): void; + /** + * + * Deletes all the text in the textframe. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + deleteText(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TextFrame` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TextFrame` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TextFrame` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TextFrameLoadOptions): Excel.TextFrame; + load(option?: string | string[]): Excel.TextFrame; + load(option?: { + select?: string; + expand?: string; + }): Excel.TextFrame; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TextFrame object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TextFrameData; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class TextRange extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Returns a ShapeFont object that represents the font attributes for the text range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly font: Excel.ShapeFont; + /** + * + * Represents the plain text content of the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text: string; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.TextRange): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TextRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.TextRange): void; + /** + * + * Returns a TextRange object for characters in the given range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param start Position of the first character in the returned range. + * @param length Optional. The number of characters to be returned. If omitted, it represents the number of characters from "start" to the end of the last paragraph in TextRange. + */ + getCharacters(start: number, length?: number): Excel.TextRange; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.TextRange` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.TextRange` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.TextRange` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.TextRangeLoadOptions): Excel.TextRange; + load(option?: string | string[]): Excel.TextRange; + load(option?: { + select?: string; + expand?: string; + }): Excel.TextRange; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.TextRange object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.TextRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.TextRangeData; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a TextRange in the Shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + class ShapeFont extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Represents the bold status of font. Returns null the TextRange includes both bold and non-bold text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bold: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. Returns null if the TextRange includes text fragments with different colors. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color: string; + /** + * + * Represents the italic status of font. Return null if the TextRange includes both italic and non-italic text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + italic: boolean; + /** + * + * Represents font name (e.g. "Calibri"). If the text is Complex Script or East Asian language, represents corresponding font name; otherwise represents Latin font name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name: string; + /** + * + * Represents font size in points (e.g. 11). Return null if the TextRange includes text fragments with different font sizes. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + size: number; + /** + * + * Type of underline applied to the font. Return null if the TextRange includes text fragments with different underline styles. See Excel.ShapeFontUnderlineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underline: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Excel.ShapeFont): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShapeFontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Excel.ShapeFont): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Excel.ShapeFont` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Excel.ShapeFont` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ShapeFont` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Excel.Interfaces.ShapeFontLoadOptions): Excel.ShapeFont; + load(option?: string | string[]): Excel.ShapeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ShapeFont; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.ShapeFont object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.ShapeFontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Excel.Interfaces.ShapeFontData; + } /** * [Api set: ExcelApi 1.7] */ @@ -30287,6 +35930,15 @@ declare namespace Excel { inside = "Inside", outside = "Outside", } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum CalculationState { + done = "Done", + calculating = "Calculating", + pending = "Pending", + } /** * [Api set: ExcelApi 1.7] */ @@ -30378,6 +36030,17 @@ declare namespace Excel { months = "Months", years = "Years", } + /** + * + * Represents the quartile calculation type of chart series layout, only applicable in Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartBoxQuartileCalculation { + inclusive = "Inclusive", + exclusive = "Exclusive", + } /** * * Specifies the type of the category axis. @@ -30404,6 +36067,19 @@ declare namespace Excel { */ dateAxis = "DateAxis", } + /** + * + * Specifies the bins type of the Histogram chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartBinType { + category = "Category", + auto = "Auto", + binWidth = "BinWidth", + binCount = "BinCount", + } /** * [Api set: ExcelApi 1.7] */ @@ -30437,6 +36113,72 @@ declare namespace Excel { bestFit = "BestFit", callout = "Callout", } + /** + * + * Represents which error-bar parts to include. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartErrorBarsInclude { + both = "Both", + minusValues = "MinusValues", + plusValues = "PlusValues", + } + /** + * + * Represents the range type for error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartErrorBarsType { + fixedValue = "FixedValue", + percent = "Percent", + stDev = "StDev", + stError = "StError", + custom = "Custom", + } + /** + * + * Represents the mapping level of chart series, only applicable in RegionMap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartMapAreaLevel { + automatic = "Automatic", + dataOnly = "DataOnly", + city = "City", + county = "County", + state = "State", + country = "Country", + continent = "Continent", + world = "World", + } + /** + * + * Represents the Gradient Style of chart series, only applicable in RegionMap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartGradientStyle { + twoPhaseColor = "TwoPhaseColor", + threePhaseColor = "ThreePhaseColor", + } + /** + * + * Represents the Gradient Style of chart series, only applicable in RegionMap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartGradientStyleType { + extremeValue = "ExtremeValue", + number = "Number", + percent = "Percent", + } /** * * Represents the position of chart title. @@ -30487,6 +36229,44 @@ declare namespace Excel { automatic = "Automatic", custom = "Custom", } + /** + * + * Represents the region label strategy of chart series layout, only applicable in RegionMap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartMapLabelStrategy { + none = "None", + bestFit = "BestFit", + showAll = "ShowAll", + } + /** + * + * Represents the region projection type of chart series layout, only applicable in RegionMap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartMapProjectionType { + automatic = "Automatic", + mercator = "Mercator", + miller = "Miller", + robinson = "Robinson", + albers = "Albers", + } + /** + * + * Represents the parent lable strategy type of chart series layout, only applicable in Treemap chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ChartParentLabelStrategy { + none = "None", + banner = "Banner", + overlapping = "Overlapping", + } /** * * Specifies whether the series are by rows or by columns. On Desktop, the "auto" option will inspect the source data shape to automatically guess whether the data is by rows or columns; on Excel Online, "auto" will simply default to "columns". @@ -30646,6 +36426,15 @@ declare namespace Excel { rows = "Rows", columns = "Columns", } + /** + * [Api set: ExcelApi 1.8] + */ + enum ChartSplitType { + splitByPosition = "SplitByPosition", + splitByValue = "SplitByValue", + splitByPercentValue = "SplitByPercentValue", + splitByCustomSplit = "SplitByCustomSplit", + } /** * [Api set: ExcelApi 1.8] */ @@ -30679,6 +36468,90 @@ declare namespace Excel { polynomial = "Polynomial", power = "Power", } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeZOrder { + bringToFront = "BringToFront", + bringForward = "BringForward", + sendToBack = "SendToBack", + sendBackward = "SendBackward", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeType { + unknown = "Unknown", + image = "Image", + geometricShape = "GeometricShape", + group = "Group", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeScaleType { + currentSize = "CurrentSize", + originalSize = "OriginalSize", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeScaleFrom { + scaleFromTopLeft = "ScaleFromTopLeft", + scaleFromMiddle = "ScaleFromMiddle", + scaleFromBottomRight = "ScaleFromBottomRight", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeFillType { + noFill = "NoFill", + solid = "Solid", + gradient = "Gradient", + pattern = "Pattern", + pictureAndTexture = "PictureAndTexture", + mixed = "Mixed", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeFontUnderlineStyle { + none = "None", + single = "Single", + double = "Double", + heavy = "Heavy", + dotted = "Dotted", + dottedHeavy = "DottedHeavy", + dash = "Dash", + dashHeavy = "DashHeavy", + dashLong = "DashLong", + dashLongHeavy = "DashLongHeavy", + dotDash = "DotDash", + dotDashHeavy = "DotDashHeavy", + dotDotDash = "DotDotDash", + dotDotDashHeavy = "DotDotDashHeavy", + wavy = "Wavy", + wavyHeavy = "WavyHeavy", + wavyDouble = "WavyDouble", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PictureFormat { + unknown = "UNKNOWN", + bmp = "BMP", + jpeg = "JPEG", + gif = "GIF", + png = "PNG", + svg = "SVG", + } /** * [Api set: ExcelApi 1.1] */ @@ -30989,6 +36862,23 @@ declare namespace Excel { single = "Single", double = "Double", } + /** + * [Api set: CustomFunctions 1.1] + * @beta + */ + enum CustomFunctionType { + invalid = "Invalid", + script = "Script", + webService = "WebService", + } + /** + * [Api set: CustomFunctions 1.1] + * @beta + */ + enum CustomFunctionMetadataFormat { + invalid = "Invalid", + openApi = "OpenApi", + } /** * * Represents Data validation type enum. @@ -31202,6 +37092,8 @@ declare namespace Excel { threeStars = "ThreeStars", threeTriangles = "ThreeTriangles", fiveBoxes = "FiveBoxes", + linkedEntityFinanceIcon = "LinkedEntityFinanceIcon", + linkedEntityMapIcon = "LinkedEntityMapIcon", } /** * [Api set: ExcelApi 1.2] @@ -31268,6 +37160,27 @@ declare namespace Excel { error = "Error", richValue = "RichValue", } + /** + * + * Specifies the search direction. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum SearchDirection { + /** + * + * Search in forward order. + * + */ + forward = "Forward", + /** + * + * Search in reverse order. + * + */ + backwards = "Backwards", + } /** * [Api set: ExcelApi 1.2] */ @@ -31524,6 +37437,18 @@ declare namespace Excel { * */ visualChange = "VisualChange", + /** + * + * WorkbookAutoSaveSettingChanged represents the type of event registered on workbook, and occurs when there is an auto save setting change. + * + */ + workbookAutoSaveSettingChanged = "WorkbookAutoSaveSettingChanged", + /** + * + * WorksheetFormatChanged represents the type of event registered on worksheet, and occurs when there is a format changed. + * + */ + worksheetFormatChanged = "WorksheetFormatChanged", } /** * [Api set: ExcelApi 1.7] @@ -31622,6 +37547,53 @@ declare namespace Excel { portrait = "Portrait", landscape = "Landscape", } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PaperType { + letter = "Letter", + letterSmall = "LetterSmall", + tabloid = "Tabloid", + ledger = "Ledger", + legal = "Legal", + statement = "Statement", + executive = "Executive", + a3 = "A3", + a4 = "A4", + a4Small = "A4Small", + a5 = "A5", + b4 = "B4", + b5 = "B5", + folio = "Folio", + quatro = "Quatro", + paper10x14 = "Paper10x14", + paper11x17 = "Paper11x17", + note = "Note", + envelope9 = "Envelope9", + envelope10 = "Envelope10", + envelope11 = "Envelope11", + envelope12 = "Envelope12", + envelope14 = "Envelope14", + csheet = "Csheet", + dsheet = "Dsheet", + esheet = "Esheet", + envelopeDL = "EnvelopeDL", + envelopeC5 = "EnvelopeC5", + envelopeC3 = "EnvelopeC3", + envelopeC4 = "EnvelopeC4", + envelopeC6 = "EnvelopeC6", + envelopeC65 = "EnvelopeC65", + envelopeB4 = "EnvelopeB4", + envelopeB5 = "EnvelopeB5", + envelopeB6 = "EnvelopeB6", + envelopeItaly = "EnvelopeItaly", + envelopeMonarch = "EnvelopeMonarch", + envelopePersonal = "EnvelopePersonal", + fanfoldUS = "FanfoldUS", + fanfoldStdGerman = "FanfoldStdGerman", + fanfoldLegalGerman = "FanfoldLegalGerman", + } /** * [Api set: ExcelApi 1.7] */ @@ -31704,6 +37676,16 @@ declare namespace Excel { accent6_60 = "Accent6_60", explanatoryText = "ExplanatoryText", } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PrintErrorType { + asDisplayed = "AsDisplayed", + blank = "Blank", + dash = "Dash", + notAvailable = "NotAvailable", + } /** * [Api set: ExcelApi 1.7] */ @@ -31714,6 +37696,631 @@ declare namespace Excel { beginning = "Beginning", end = "End", } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PrintComments { + /** + * + * Comments will not be printed. + * + */ + noComments = "NoComments", + /** + * + * Comments will be printed as end notes at the end of the worksheet. + * + */ + endSheet = "EndSheet", + /** + * + * Comments will be printed where they were inserted in the worksheet. + * + */ + inPlace = "InPlace", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PrintOrder { + /** + * + * Process down the rows before processing across pages or page fields to the right. + * + */ + downThenOver = "DownThenOver", + /** + * + * Process across pages or page fields to the right before moving down the rows. + * + */ + overThenDown = "OverThenDown", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PrintMarginUnit { + /** + * + * Assign the page margins in points. A point is 1/72 of an inch. + * + */ + points = "Points", + /** + * + * Assign the page margins in inches. + * + */ + inches = "Inches", + /** + * + * Assign the page margins in centimeters. + * + */ + centimeters = "Centimeters", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum HeaderFooterState { + /** + * + * Only one general header/footer is used for all pages printed. + * + */ + default = "Default", + /** + * + * There is a separate first page header/footer, and a general header/footer used for all other pages. + * + */ + firstAndDefault = "FirstAndDefault", + /** + * + * There is a different header/footer for odd and even pages. + * + */ + oddAndEven = "OddAndEven", + /** + * + * There is a separate first page header/footer, then there is a separate header/footer for odd and even pages. + * + */ + firstOddAndEven = "FirstOddAndEven", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum RangeCopyType { + all = "All", + formulas = "Formulas", + values = "Values", + formats = "Formats", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum LinkedDataTypeState { + none = "None", + validLinkedData = "ValidLinkedData", + disambiguationNeeded = "DisambiguationNeeded", + brokenLinkedData = "BrokenLinkedData", + fetchingData = "FetchingData", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum GeometricShapeType { + lineInverse = "LineInverse", + triangle = "Triangle", + rightTriangle = "RightTriangle", + rectangle = "Rectangle", + diamond = "Diamond", + parallelogram = "Parallelogram", + trapezoid = "Trapezoid", + nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", + pentagon = "Pentagon", + hexagon = "Hexagon", + heptagon = "Heptagon", + octagon = "Octagon", + decagon = "Decagon", + dodecagon = "Dodecagon", + star4 = "Star4", + star5 = "Star5", + star6 = "Star6", + star7 = "Star7", + star8 = "Star8", + star10 = "Star10", + star12 = "Star12", + star16 = "Star16", + star24 = "Star24", + star32 = "Star32", + roundRectangle = "RoundRectangle", + round1Rectangle = "Round1Rectangle", + round2SameRectangle = "Round2SameRectangle", + round2DiagonalRectangle = "Round2DiagonalRectangle", + snipRoundRectangle = "SnipRoundRectangle", + snip1Rectangle = "Snip1Rectangle", + snip2SameRectangle = "Snip2SameRectangle", + snip2DiagonalRectangle = "Snip2DiagonalRectangle", + plaque = "Plaque", + ellipse = "Ellipse", + teardrop = "Teardrop", + homePlate = "HomePlate", + chevron = "Chevron", + pieWedge = "PieWedge", + pie = "Pie", + blockArc = "BlockArc", + donut = "Donut", + noSmoking = "NoSmoking", + rightArrow = "RightArrow", + leftArrow = "LeftArrow", + upArrow = "UpArrow", + downArrow = "DownArrow", + stripedRightArrow = "StripedRightArrow", + notchedRightArrow = "NotchedRightArrow", + bentUpArrow = "BentUpArrow", + leftRightArrow = "LeftRightArrow", + upDownArrow = "UpDownArrow", + leftUpArrow = "LeftUpArrow", + leftRightUpArrow = "LeftRightUpArrow", + quadArrow = "QuadArrow", + leftArrowCallout = "LeftArrowCallout", + rightArrowCallout = "RightArrowCallout", + upArrowCallout = "UpArrowCallout", + downArrowCallout = "DownArrowCallout", + leftRightArrowCallout = "LeftRightArrowCallout", + upDownArrowCallout = "UpDownArrowCallout", + quadArrowCallout = "QuadArrowCallout", + bentArrow = "BentArrow", + uturnArrow = "UturnArrow", + circularArrow = "CircularArrow", + leftCircularArrow = "LeftCircularArrow", + leftRightCircularArrow = "LeftRightCircularArrow", + curvedRightArrow = "CurvedRightArrow", + curvedLeftArrow = "CurvedLeftArrow", + curvedUpArrow = "CurvedUpArrow", + curvedDownArrow = "CurvedDownArrow", + swooshArrow = "SwooshArrow", + cube = "Cube", + can = "Can", + lightningBolt = "LightningBolt", + heart = "Heart", + sun = "Sun", + moon = "Moon", + smileyFace = "SmileyFace", + irregularSeal1 = "IrregularSeal1", + irregularSeal2 = "IrregularSeal2", + foldedCorner = "FoldedCorner", + bevel = "Bevel", + frame = "Frame", + halfFrame = "HalfFrame", + corner = "Corner", + diagonalStripe = "DiagonalStripe", + chord = "Chord", + arc = "Arc", + leftBracket = "LeftBracket", + rightBracket = "RightBracket", + leftBrace = "LeftBrace", + rightBrace = "RightBrace", + bracketPair = "BracketPair", + bracePair = "BracePair", + callout1 = "Callout1", + callout2 = "Callout2", + callout3 = "Callout3", + accentCallout1 = "AccentCallout1", + accentCallout2 = "AccentCallout2", + accentCallout3 = "AccentCallout3", + borderCallout1 = "BorderCallout1", + borderCallout2 = "BorderCallout2", + borderCallout3 = "BorderCallout3", + accentBorderCallout1 = "AccentBorderCallout1", + accentBorderCallout2 = "AccentBorderCallout2", + accentBorderCallout3 = "AccentBorderCallout3", + wedgeRectCallout = "WedgeRectCallout", + wedgeRRectCallout = "WedgeRRectCallout", + wedgeEllipseCallout = "WedgeEllipseCallout", + cloudCallout = "CloudCallout", + cloud = "Cloud", + ribbon = "Ribbon", + ribbon2 = "Ribbon2", + ellipseRibbon = "EllipseRibbon", + ellipseRibbon2 = "EllipseRibbon2", + leftRightRibbon = "LeftRightRibbon", + verticalScroll = "VerticalScroll", + horizontalScroll = "HorizontalScroll", + wave = "Wave", + doubleWave = "DoubleWave", + plus = "Plus", + flowChartProcess = "FlowChartProcess", + flowChartDecision = "FlowChartDecision", + flowChartInputOutput = "FlowChartInputOutput", + flowChartPredefinedProcess = "FlowChartPredefinedProcess", + flowChartInternalStorage = "FlowChartInternalStorage", + flowChartDocument = "FlowChartDocument", + flowChartMultidocument = "FlowChartMultidocument", + flowChartTerminator = "FlowChartTerminator", + flowChartPreparation = "FlowChartPreparation", + flowChartManualInput = "FlowChartManualInput", + flowChartManualOperation = "FlowChartManualOperation", + flowChartConnector = "FlowChartConnector", + flowChartPunchedCard = "FlowChartPunchedCard", + flowChartPunchedTape = "FlowChartPunchedTape", + flowChartSummingJunction = "FlowChartSummingJunction", + flowChartOr = "FlowChartOr", + flowChartCollate = "FlowChartCollate", + flowChartSort = "FlowChartSort", + flowChartExtract = "FlowChartExtract", + flowChartMerge = "FlowChartMerge", + flowChartOfflineStorage = "FlowChartOfflineStorage", + flowChartOnlineStorage = "FlowChartOnlineStorage", + flowChartMagneticTape = "FlowChartMagneticTape", + flowChartMagneticDisk = "FlowChartMagneticDisk", + flowChartMagneticDrum = "FlowChartMagneticDrum", + flowChartDisplay = "FlowChartDisplay", + flowChartDelay = "FlowChartDelay", + flowChartAlternateProcess = "FlowChartAlternateProcess", + flowChartOffpageConnector = "FlowChartOffpageConnector", + actionButtonBlank = "ActionButtonBlank", + actionButtonHome = "ActionButtonHome", + actionButtonHelp = "ActionButtonHelp", + actionButtonInformation = "ActionButtonInformation", + actionButtonForwardNext = "ActionButtonForwardNext", + actionButtonBackPrevious = "ActionButtonBackPrevious", + actionButtonEnd = "ActionButtonEnd", + actionButtonBeginning = "ActionButtonBeginning", + actionButtonReturn = "ActionButtonReturn", + actionButtonDocument = "ActionButtonDocument", + actionButtonSound = "ActionButtonSound", + actionButtonMovie = "ActionButtonMovie", + gear6 = "Gear6", + gear9 = "Gear9", + funnel = "Funnel", + mathPlus = "MathPlus", + mathMinus = "MathMinus", + mathMultiply = "MathMultiply", + mathDivide = "MathDivide", + mathEqual = "MathEqual", + mathNotEqual = "MathNotEqual", + cornerTabs = "CornerTabs", + squareTabs = "SquareTabs", + plaqueTabs = "PlaqueTabs", + chartX = "ChartX", + chartStar = "ChartStar", + chartPlus = "ChartPlus", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ContentType { + /** + * + * Indicates plain format type of the comment content. + * + */ + plain = "Plain", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum SpecialCellType { + /** + * + * All cells with conditional formats + * + */ + conditionalFormats = "ConditionalFormats", + /** + * + * Cells having validation criteria. + * + */ + dataValidations = "DataValidations", + /** + * + * Cells with no content. + * + */ + blanks = "Blanks", + /** + * + * Cells containing comments. + * + */ + comments = "Comments", + /** + * + * Cells containing constants. + * + */ + constants = "Constants", + /** + * + * Cells containing formulas. + * + */ + formulas = "Formulas", + /** + * + * Cells having the same conditional format as the first cell in the range. + * + */ + sameConditionalFormat = "SameConditionalFormat", + /** + * + * Cells having the same data validation criteria as the first cell in the range. + * + */ + sameDataValidation = "SameDataValidation", + /** + * + * Cells that are visible. + * + */ + visible = "Visible", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum SpecialCellValueType { + /** + * + * Cells that have errors, true/false, numeric, or a string value. + * + */ + all = "All", + /** + * + * Cells that have errors. + * + */ + errors = "Errors", + /** + * + * Cells that have errors, or a true/false value. + * + */ + errorsLogical = "ErrorsLogical", + /** + * + * Cells that have errors, or a numeric value. + * + */ + errorsNumbers = "ErrorsNumbers", + /** + * + * Cells that have errors, or a string value. + * + */ + errorsText = "ErrorsText", + /** + * + * Cells that have errors, true/false, or a numeric value. + * + */ + errorsLogicalNumber = "ErrorsLogicalNumber", + /** + * + * Cells that have errors, true/false, or a string value. + * + */ + errorsLogicalText = "ErrorsLogicalText", + /** + * + * Cells that have errors, numeric, or a string value. + * + */ + errorsNumberText = "ErrorsNumberText", + /** + * + * Cells that have a true/false value. + * + */ + logical = "Logical", + /** + * + * Cells that have a true/false, or a numeric value. + * + */ + logicalNumbers = "LogicalNumbers", + /** + * + * Cells that have a true/false, or a string value. + * + */ + logicalText = "LogicalText", + /** + * + * Cells that have a true/false, numeric, or a string value. + * + */ + logicalNumbersText = "LogicalNumbersText", + /** + * + * Cells that have a numeric value. + * + */ + numbers = "Numbers", + /** + * + * Cells that have a numeric, or a string value. + * + */ + numbersText = "NumbersText", + /** + * + * Cells that have a string value. + * + */ + text = "Text", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum Placement { + twoCell = "TwoCell", + oneCell = "OneCell", + absolute = "Absolute", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum FillPattern { + none = "None", + solid = "Solid", + gray50 = "Gray50", + gray75 = "Gray75", + gray25 = "Gray25", + horizontal = "Horizontal", + vertical = "Vertical", + down = "Down", + up = "Up", + checker = "Checker", + semiGray75 = "SemiGray75", + lightHorizontal = "LightHorizontal", + lightVertical = "LightVertical", + lightDown = "LightDown", + lightUp = "LightUp", + grid = "Grid", + crissCross = "CrissCross", + gray16 = "Gray16", + gray8 = "Gray8", + linearGradient = "LinearGradient", + rectangularGradient = "RectangularGradient", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextHorizontalAlignType { + left = "Left", + center = "Center", + right = "Right", + justify = "Justify", + justifyLow = "JustifyLow", + distributed = "Distributed", + thaiDistributed = "ThaiDistributed", + shapeTextHorizontalAlignType_MaxEnumIDs = "ShapeTextHorizontalAlignType_MaxEnumIDs", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextVerticalAlignType { + top = "Top", + middle = "Middle", + bottom = "Bottom", + justified = "Justified", + distributed = "Distributed", + shapeTextVerticalAlignType_MaxEnumIDs = "ShapeTextVerticalAlignType_MaxEnumIDs", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextVertOverflowType { + overflow = "Overflow", + ellipsis = "Ellipsis", + clip = "Clip", + shapeTextVertOverflowType_MaxEnumIDs = "ShapeTextVertOverflowType_MaxEnumIDs", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextHorzOverflowType { + overflow = "Overflow", + clip = "Clip", + shapeTextHorzOverflowType_MaxEnumIDs = "ShapeTextHorzOverflowType_MaxEnumIDs", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextReadingOrder { + ltr = "LTR", + rtl = "RTL", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeTextOrientationType { + horizontal = "Horizontal", + vertical = "Vertical", + vertical270 = "Vertical270", + wordArtVertical = "WordArtVertical", + eastAsianVertical = "EastAsianVertical", + mongolianVertical = "MongolianVertical", + wordArtVerticalRTL = "WordArtVerticalRTL", + shapeTextOrientationType_MaxEnumIDs = "ShapeTextOrientationType_MaxEnumIDs", + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum ShapeAutoSize { + autoSizeNone = "AutoSizeNone", + autoSizeTextToFitShape = "AutoSizeTextToFitShape", + autoSizeShapeToFitText = "AutoSizeShapeToFitText", + autoSizeMixed = "AutoSizeMixed", + } + /** + * + * Specifies the close behavior for workbook.close API. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum CloseBehavior { + /** + * + * Save the possible changes before closing the workbook. + * + */ + save = "Save", + /** + * + * Discard the possible changes when closing the workbook. + * + */ + skipSave = "SkipSave", + } + /** + * + * Specifies the save behavior for workbook.save API. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum SaveBehavior { + /** + * + * Save the workbook without prompting the user. If file is not saved, + it will save it with default name under default location. + * + */ + save = "Save", + /** + * + * Prompts the saveas experience to the user if the workbook has not been saved, + Ignored if the workbook was previously saved. + * + */ + prompt = "Prompt", + } /** * * An object containing the result of a function-evaluation operation @@ -31721,6 +38328,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class FunctionResult extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. @@ -31756,6 +38365,10 @@ declare namespace Excel { select?: string; expand?: string; }): FunctionResult; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original FunctionResult object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Interfaces.FunctionResultData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Interfaces.FunctionResultData; } /** @@ -31765,6 +38378,8 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ class Functions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the absolute value of a number, a number without its sign. @@ -35501,6 +42116,10 @@ declare namespace Excel { * @param sigma Is the population (known) standard deviation. If omitted, the sample standard deviation is used. */ z_Test(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sigma?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Excel.Functions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Excel.Interfaces.FunctionsData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; @@ -35518,6 +42137,7 @@ declare namespace Excel { invalidSelection = "InvalidSelection", itemAlreadyExists = "ItemAlreadyExists", itemNotFound = "ItemNotFound", + nonBlankCellOffSheet = "NonBlankCellOffSheet", notImplemented = "NotImplemented", unsupportedOperation = "UnsupportedOperation", invalidOperationInCellEditMode = "InvalidOperationInCellEditMode", @@ -35548,6 +42168,16 @@ declare namespace Excel { } /** An interface for updating data on the Application object, for use in "application.set({ ... })". */ interface ApplicationUpdateData { + /** + * + * Returns the Iterative Calculation settings. + On Excel for Windows and Excel for Mac, the settings will apply to the Excel Application. + On Excel Online and Excel for other platforms, the settings will apply to the active workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationUpdateData; /** * * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. @@ -35556,6 +42186,33 @@ declare namespace Excel { */ calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; } + /** An interface for updating data on the IterativeCalculation object, for use in "iterativeCalculation.set({ ... })". */ + interface IterativeCalculationUpdateData { + /** + * + * True if Excel will use iteration to resolve circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled?: boolean; + /** + * + * Returns or sets the maximum amount of change between each iteration as Excel resolves circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxChange?: number; + /** + * + * Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxIteration?: number; + } /** An interface for updating data on the Workbook object, for use in "workbook.set({ ... })". */ interface WorkbookUpdateData { /** @@ -35565,9 +42222,61 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ properties?: Excel.Interfaces.DocumentPropertiesUpdateData; + /** + * + * True if all charts in the workbook are tracking the actual data points to which they are attached. + False if the charts track the index of the data points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + chartDataPointTrack?: boolean; + /** + * + * True if no changes have been made to the specified workbook since it was last saved. + You can set this property to True if you want to close a modified workbook without either saving it or being prompted to save it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDirty?: boolean; + /** + * + * True if the workbook uses the 1904 date system. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + use1904DateSystem?: boolean; + /** + * + * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. + Data will permanently lose accuracy when switching this property from false to true. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + usePrecisionAsDisplayed?: boolean; } /** An interface for updating data on the Worksheet object, for use in "worksheet.set({ ... })". */ interface WorksheetUpdateData { + /** + * + * Gets the PageLayout object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pageLayout?: Excel.Interfaces.PageLayoutUpdateData; + /** + * + * Gets or sets the enableCalculation property of the worksheet. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableCalculation?: boolean; /** * * The display name of the worksheet. @@ -35722,6 +42431,35 @@ declare namespace Excel { */ values?: any[][]; } + /** An interface for updating data on the RangeAreas object, for use in "rangeAreas.set({ ... })". */ + interface RangeAreasUpdateData { + /** + * + * Returns a dataValidation object for all ranges in the RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataValidation?: Excel.Interfaces.DataValidationUpdateData; + /** + * + * Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.RangeFormatUpdateData; + /** + * + * Represents the style for all ranges in this RangeAreas object. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: string; + } /** An interface for updating data on the RangeView object, for use in "rangeView.set({ ... })". */ interface RangeViewUpdateData { /** @@ -35814,6 +42552,10 @@ declare namespace Excel { interface TableCollectionUpdateData { items?: Excel.Interfaces.TableData[]; } + /** An interface for updating data on the TableScopedCollection object, for use in "tableScopedCollection.set({ ... })". */ + interface TableScopedCollectionUpdateData { + items?: Excel.Interfaces.TableData[]; + } /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ interface TableUpdateData { /** @@ -35948,6 +42690,13 @@ declare namespace Excel { } /** An interface for updating data on the RangeFormat object, for use in "rangeFormat.set({ ... })". */ interface RangeFormatUpdateData { + /** + * + * Collection of border objects that apply to the overall range. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; /** * * Returns the fill object defined on the overall range. @@ -35969,6 +42718,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionUpdateData; + /** + * + * Indicates if text is automatically indented when text alignment is set to equal distribution. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoIndent?: boolean; /** * * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. @@ -35983,6 +42740,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * An integer from 0 to 250 that indicates the indent level. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + indentLevel?: number; + /** + * + * The reading order for the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. @@ -35990,6 +42763,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ rowHeight?: number; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shrinkToFit?: boolean; /** * * Gets or sets the text orientation of all the cells within the range. @@ -36060,6 +42841,42 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color?: string; + /** + * + * Gets or sets the pattern of a Range. See Excel.FillPattern for details. LinearGradient and RectangularGradient are not supported. + A null value indicates that the entire range doesn't have uniform pattern setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * + * Sets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + Gets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternColor?: string; + /** + * + * Returns or sets a double that lightens or darkens a pattern color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the pattern tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternTintAndShade?: number; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; } /** An interface for updating data on the RangeBorder object, for use in "rangeBorder.set({ ... })". */ interface RangeBorderUpdateData { @@ -36077,6 +42894,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the border doesn't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. @@ -36087,6 +42913,15 @@ declare namespace Excel { } /** An interface for updating data on the RangeBorderCollection object, for use in "rangeBorderCollection.set({ ... })". */ interface RangeBorderCollectionUpdateData { + /** + * + * Returns or sets a double that lightens or darkens a color for Range Borders, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire border collections don't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; items?: Excel.Interfaces.RangeBorderData[]; } /** An interface for updating data on the RangeFont object, for use in "rangeFont.set({ ... })". */ @@ -36126,6 +42961,45 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ size?: number; + /** + * + * Represents the strikethrough status of font. A null value indicates that the entire range doesn't have uniform Strikethrough setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + strikethrough?: boolean; + /** + * + * Represents the Subscript status of font. + Returns True if all the fonts of the range are Subscript. + Returns False if all the fonts of the range are Superscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + subscript?: boolean; + /** + * + * Represents the Superscript status of font. + Returns True if all the fonts of the range are Superscript. + Returns False if all the fonts of the range are Subscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + superscript?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Font, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire range doesn't have uniform font tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; /** * * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. @@ -36170,6 +43044,14 @@ declare namespace Excel { legend?: Excel.Interfaces.ChartLegendUpdateData; /** * + * Encapsulates the options for the pivot chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsUpdateData; + /** + * * Represents the plotArea for the chart. * * [Api set: ExcelApi 1.8] @@ -36285,6 +43167,42 @@ declare namespace Excel { */ width?: number; } + /** An interface for updating data on the ChartPivotOptions object, for use in "chartPivotOptions.set({ ... })". */ + interface ChartPivotOptionsUpdateData { + /** + * + * Represents whether to display axis field buttons on a PivotChart. + The ShowAxisFieldButtons property corresponds to the Show Axis Field Buttons command on the Field Buttons drop-down list of the Analyze tab, which is available when a PivotChart is selected. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAxisFieldButtons?: boolean; + /** + * + * Represents whether to display legend field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLegendFieldButtons?: boolean; + /** + * + * Represents whether to display report filter field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showReportFilterFieldButtons?: boolean; + /** + * + * Represents whether to display show value field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showValueFieldButtons?: boolean; + } /** An interface for updating data on the ChartAreaFormat object, for use in "chartAreaFormat.set({ ... })". */ interface ChartAreaFormatUpdateData { /** @@ -36301,6 +43219,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontUpdateData; + /** + * + * Returns or sets an integer that represents the color scheme for the chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * + * True if the chart area of the chart has rounded corners. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + roundedCorners?: boolean; } /** An interface for updating data on the ChartSeriesCollection object, for use in "chartSeriesCollection.set({ ... })". */ interface ChartSeriesCollectionUpdateData { @@ -36308,6 +43242,22 @@ declare namespace Excel { } /** An interface for updating data on the ChartSeries object, for use in "chartSeries.set({ ... })". */ interface ChartSeriesUpdateData { + /** + * + * Encapsulates the bin options only for histogram chart and pareto chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + binOptions?: Excel.Interfaces.ChartBinOptionsUpdateData; + /** + * + * Encapsulates the options for the Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsUpdateData; /** * * Represents a collection of all dataLabels in the series. @@ -36322,6 +43272,30 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.ChartSeriesFormatUpdateData; + /** + * + * Encapsulates the options for the Map chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsUpdateData; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + xerrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + yerrorBars?: Excel.Interfaces.ChartErrorBarsUpdateData; /** * * Returns or sets the group for the specified series. Read/Write @@ -36329,6 +43303,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the scale factor for bubbles in the specified chart group. Can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bubbleScale?: number; /** * * Represents the chart type of a series. See Excel.ChartType for details. @@ -36373,6 +43355,86 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ gapWidth?: number; + /** + * + * Returns or sets the Color for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumColor?: string; + /** + * + * Returns or sets the type for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumValue?: number; + /** + * + * Returns or sets the Color for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointColor?: string; + /** + * + * Returns or sets the type for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointValue?: number; + /** + * + * Returns or sets the Color for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumColor?: string; + /** + * + * Returns or sets the type for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumValue?: number; + /** + * + * Returns or sets series gradient style of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * * Boolean value representing if the series has data labels or not. @@ -36380,6 +43442,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; + /** + * + * Returns or sets the fill color for negative data points in a series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + invertColor?: string; /** * * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. @@ -36429,6 +43499,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ overlap?: number; + /** + * + * Returns or sets series parent label strategy area of a treemap chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * * Represents the plot order of a chart series within the chart group. @@ -36443,6 +43521,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ secondPlotSize?: number; + /** + * + * Returns or sets if connector lines show in a waterfall chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showConnectorLines?: boolean; + /** + * + * True if Microsoft Excel show leaderlines for each datalabel in series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLeaderLines?: boolean; /** * * Boolean value representing if the series has a shadow or not. @@ -36463,7 +43557,15 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] */ - splitType?: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + splitValue?: number; /** * * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. @@ -36623,13 +43725,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; - /** - * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. - * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. - * - * [Api set: ExcelApi 1.7] - */ - crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; /** * * Represents the axis display unit. See Excel.ChartAxisDisplayUnit for details. @@ -36644,6 +43739,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ isBetweenCategories?: boolean; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the base of the logarithm when using logarithmic scales. @@ -36874,6 +43977,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the format code for data labels. @@ -36991,6 +44102,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for data label. @@ -37101,6 +44220,60 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontUpdateData; } + /** An interface for updating data on the ChartErrorBars object, for use in "chartErrorBars.set({ ... })". */ + interface ChartErrorBarsUpdateData { + /** + * + * Represents the formatting of chart ErrorBars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.ChartErrorBarsFormatUpdateData; + /** + * + * Represents whether have the end style cap for the error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + endStyleCap?: boolean; + /** + * + * Represents which error-bar parts to include. See Excel.ChartErrorBarsInclude for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * + * Represents the range marked by error bars. See Excel.ChartErrorBarsType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * + * Represents whether shown error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + } + /** An interface for updating data on the ChartErrorBarsFormat object, for use in "chartErrorBarsFormat.set({ ... })". */ + interface ChartErrorBarsFormatUpdateData { + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.ChartLineFormatUpdateData; + } /** An interface for updating data on the ChartGridlines object, for use in "chartGridlines.set({ ... })". */ interface ChartGridlinesUpdateData { /** @@ -37225,6 +44398,33 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontUpdateData; } + /** An interface for updating data on the ChartMapOptions object, for use in "chartMapOptions.set({ ... })". */ + interface ChartMapOptionsUpdateData { + /** + * + * Returns or sets series map labels strategy of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * + * Returns or sets series map area of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * + * Returns or sets series projection type of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } /** An interface for updating data on the ChartTitle object, for use in "chartTitle.set({ ... })". */ interface ChartTitleUpdateData { /** @@ -37356,6 +44556,108 @@ declare namespace Excel { */ weight?: number; } + /** An interface for updating data on the ChartBinOptions object, for use in "chartBinOptions.set({ ... })". */ + interface ChartBinOptionsUpdateData { + /** + * + * Returns or sets if bin overflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowOverflow?: boolean; + /** + * + * Returns or sets if bin underflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowUnderflow?: boolean; + /** + * + * Returns or sets count of bin of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + count?: number; + /** + * + * Returns or sets bin overflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + overflowValue?: number; + /** + * + * Returns or sets bin type of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * + * Returns or sets bin underflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underflowValue?: number; + /** + * + * Returns or sets bin width value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + } + /** An interface for updating data on the ChartBoxwhiskerOptions object, for use in "chartBoxwhiskerOptions.set({ ... })". */ + interface ChartBoxwhiskerOptionsUpdateData { + /** + * + * Returns or sets quartile calculation type of a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * + * Returns or sets if inner points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showInnerPoints?: boolean; + /** + * + * Returns or sets if mean line showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanLine?: boolean; + /** + * + * Returns or sets if mean marker showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanMarker?: boolean; + /** + * + * Returns or sets if outlier points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showOutlierPoints?: boolean; + } /** An interface for updating data on the ChartLineFormat object, for use in "chartLineFormat.set({ ... })". */ interface ChartLineFormatUpdateData { /** @@ -37557,6 +44859,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for trendline label. @@ -37715,9 +45025,25 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ name?: string; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useCustomSortLists?: boolean; } /** An interface for updating data on the PivotLayout object, for use in "pivotLayout.set({ ... })". */ interface PivotLayoutUpdateData { + /** + * + * True if the field list should be shown or hidden from the UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableFieldList?: boolean; /** * * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. @@ -38326,7 +45652,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.6] */ - style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes" | "LinkedEntityFinanceIcon" | "LinkedEntityMapIcon"; } /** An interface for updating data on the ColorScaleConditionalFormat object, for use in "colorScaleConditionalFormat.set({ ... })". */ interface ColorScaleConditionalFormatUpdateData { @@ -38536,6 +45862,13 @@ declare namespace Excel { } /** An interface for updating data on the Style object, for use in "style.set({ ... })". */ interface StyleUpdateData { + /** + * + * A Border collection of four Border objects that represent the style of the four borders. + * + * [Api set: ExcelApi 1.7] + */ + borders?: Excel.Interfaces.RangeBorderCollectionUpdateData; /** * * The Fill of the style. @@ -38681,6 +46014,592 @@ declare namespace Excel { interface StyleCollectionUpdateData { items?: Excel.Interfaces.StyleData[]; } + /** An interface for updating data on the PageLayout object, for use in "pageLayout.set({ ... })". */ + interface PageLayoutUpdateData { + /** + * + * Header and footer configuration for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupUpdateData; + /** + * + * Gets or sets the worksheet's black and white print option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + blackAndWhite?: boolean; + /** + * + * Gets or sets the worksheet's bottom page margin to use for printing in points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: number; + /** + * + * Gets or sets the worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHorizontally?: boolean; + /** + * + * Gets or sets the worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerVertically?: boolean; + /** + * + * Gets or sets the worksheet's draft mode option. If true the sheet will be printed without graphics. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + draftMode?: boolean; + /** + * + * Gets or sets the worksheet's first page number to print. Null value represents "auto" page numbering. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPageNumber?: number | ""; + /** + * + * Gets or sets the worksheet's footer margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + footerMargin?: number; + /** + * + * Gets or sets the worksheet's header margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headerMargin?: number; + /** + * + * Gets or sets the worksheet's left margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: number; + /** + * + * Gets or sets the worksheet's orientation of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * + * Gets or sets the worksheet's paper size of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + paperSize?: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; + /** + * + * Gets or sets whether the worksheet's comments should be displayed when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * + * Gets or sets the worksheet's print errors option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * + * Gets or sets the worksheet's print gridlines flag. This flag determines whether gridlines will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printGridlines?: boolean; + /** + * + * Gets or sets the worksheet's print headings flag. This flag determines whether headings will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printHeadings?: boolean; + /** + * + * Gets or sets the worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * + * Gets or sets the worksheet's right margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: number; + /** + * + * Gets or sets the worksheet's top margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: number; + /** + * + * Gets or sets the worksheet's print zoom options. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface for updating data on the HeaderFooter object, for use in "headerFooter.set({ ... })". */ + interface HeaderFooterUpdateData { + /** + * + * Gets or sets the center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerFooter?: string; + /** + * + * Gets or sets the center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHeader?: string; + /** + * + * Gets or sets the left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftFooter?: string; + /** + * + * Gets or sets the left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftHeader?: string; + /** + * + * Gets or sets the right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightFooter?: string; + /** + * + * Gets or sets the right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightHeader?: string; + } + /** An interface for updating data on the HeaderFooterGroup object, for use in "headerFooterGroup.set({ ... })". */ + interface HeaderFooterGroupUpdateData { + /** + * + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + evenPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * + * The first page header/footer, for all other pages general or even/odd is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPage?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + oddPages?: Excel.Interfaces.HeaderFooterUpdateData; + /** + * + * Gets or sets the state of which headers/footers are set. See Excel.HeaderFooterState for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + state?: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; + /** + * + * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetMargins?: boolean; + /** + * + * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetScale?: boolean; + } + /** An interface for updating data on the PageBreakCollection object, for use in "pageBreakCollection.set({ ... })". */ + interface PageBreakCollectionUpdateData { + items?: Excel.Interfaces.PageBreakData[]; + } + /** An interface for updating data on the RangeCollection object, for use in "rangeCollection.set({ ... })". */ + interface RangeCollectionUpdateData { + items?: Excel.Interfaces.RangeData[]; + } + /** An interface for updating data on the CommentCollection object, for use in "commentCollection.set({ ... })". */ + interface CommentCollectionUpdateData { + items?: Excel.Interfaces.CommentData[]; + } + /** An interface for updating data on the CommentReplyCollection object, for use in "commentReplyCollection.set({ ... })". */ + interface CommentReplyCollectionUpdateData { + items?: Excel.Interfaces.CommentReplyData[]; + } + /** An interface for updating data on the ShapeCollection object, for use in "shapeCollection.set({ ... })". */ + interface ShapeCollectionUpdateData { + items?: Excel.Interfaces.ShapeData[]; + } + /** An interface for updating data on the Shape object, for use in "shape.set({ ... })". */ + interface ShapeUpdateData { + /** + * + * Returns the fill formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fill?: Excel.Interfaces.ShapeFillUpdateData; + /** + * + * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: string; + /** + * + * Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: string; + /** + * + * Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; + /** + * + * Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: number; + /** + * + * The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; + /** + * + * Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio?: boolean; + /** + * + * Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * + * Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation?: number; + /** + * + * The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; + /** + * + * Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + } + /** An interface for updating data on the GroupShapeCollection object, for use in "groupShapeCollection.set({ ... })". */ + interface GroupShapeCollectionUpdateData { + items?: Excel.Interfaces.ShapeData[]; + } + /** An interface for updating data on the ShapeFill object, for use in "shapeFill.set({ ... })". */ + interface ShapeFillUpdateData { + /** + * + * Represents the shape fill fore color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + foreColor?: string; + /** + * + * Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). For API not supported shape types or special fill type with inconsistent transparencies, return null. For example, gradient fill type could have inconsistent transparencies. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: number; + } + /** An interface for updating data on the TextFrame object, for use in "textFrame.set({ ... })". */ + interface TextFrameUpdateData { + /** + * + * Gets or sets the auto sizing settings for the text frame. A text frame can be set to auto size the text to fit the text frame, or auto size the text frame to fit the text, or without auto sizing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSize?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * + * Represents the bottom margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: number; + /** + * + * Represents the horizontal alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignType | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed" | "ShapeTextHorizontalAlignType_MaxEnumIDs"; + /** + * + * Represents the horizontal overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalOverflow?: Excel.ShapeTextHorzOverflowType | "Overflow" | "Clip" | "ShapeTextHorzOverflowType_MaxEnumIDs"; + /** + * + * Represents the left margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: number; + /** + * + * Represents the text orientation of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: Excel.ShapeTextOrientationType | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL" | "ShapeTextOrientationType_MaxEnumIDs"; + /** + * + * Represents the reading order of the text frame, RTL or LTR. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LTR" | "RTL"; + /** + * + * Represents the right margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: number; + /** + * + * Represents the top margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: number; + /** + * + * Represents the vertical alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignType | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed" | "ShapeTextVerticalAlignType_MaxEnumIDs"; + /** + * + * Represents the vertical overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalOverflow?: Excel.ShapeTextVertOverflowType | "Overflow" | "Ellipsis" | "Clip" | "ShapeTextVertOverflowType_MaxEnumIDs"; + } + /** An interface for updating data on the TextRange object, for use in "textRange.set({ ... })". */ + interface TextRangeUpdateData { + /** + * + * Returns a ShapeFont object that represents the font attributes for the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Excel.Interfaces.ShapeFontUpdateData; + /** + * + * Represents the plain text content of the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: string; + } + /** An interface for updating data on the ShapeFont object, for use in "shapeFont.set({ ... })". */ + interface ShapeFontUpdateData { + /** + * + * Represents the bold status of font. Returns null the TextRange includes both bold and non-bold text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. Returns null if the TextRange includes text fragments with different colors. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: string; + /** + * + * Represents the italic status of font. Return null if the TextRange includes both italic and non-italic text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + italic?: boolean; + /** + * + * Represents font name (e.g. "Calibri"). If the text is Complex Script or East Asian language, represents corresponding font name; otherwise represents Latin font name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * + * Represents font size in points (e.g. 11). Return null if the TextRange includes text fragments with different font sizes. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + size?: number; + /** + * + * Type of underline applied to the font. Return null if the TextRange includes text fragments with different underline styles. See Excel.ShapeFontUnderlineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } /** An interface describing the data returned by calling "runtime.toJSON()". */ interface RuntimeData { /** @@ -38693,6 +46612,24 @@ declare namespace Excel { } /** An interface describing the data returned by calling "application.toJSON()". */ interface ApplicationData { + /** + * + * Returns the Iterative Calculation settings. + On Excel for Windows and Excel for Mac, the settings will apply to the Excel Application. + On Excel Online and Excel for other platforms, the settings will apply to the active workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationData; + /** + * + * Returns a number about the version of Excel Calculation Engine that the workbook was last fully recalculated by. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationEngineVersion?: number; /** * * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. @@ -38700,16 +46637,44 @@ declare namespace Excel { * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode?: Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"; + /** + * + * Returns a CalculationState that indicates the calculation state of the application. See Excel.CalculationState for details. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationState?: Excel.CalculationState | "Done" | "Calculating" | "Pending"; + } + /** An interface describing the data returned by calling "iterativeCalculation.toJSON()". */ + interface IterativeCalculationData { + /** + * + * True if Excel will use iteration to resolve circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled?: boolean; + /** + * + * Returns or sets the maximum amount of change between each iteration as Excel resolves circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxChange?: number; + /** + * + * Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxIteration?: number; } /** An interface describing the data returned by calling "workbook.toJSON()". */ interface WorkbookData { - /** - * - * Represents the Excel application instance that contains this workbook. Read-only. - * - * [Api set: ExcelApi 1.1] - */ - application?: Excel.Interfaces.ApplicationData; /** * * Represents a collection of bindings that are part of the workbook. Read-only. @@ -38719,6 +46684,14 @@ declare namespace Excel { bindings?: Excel.Interfaces.BindingData[]; /** * + * Represents a collection of Comments associated with the workbook. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + comments?: Excel.Interfaces.CommentData[]; + /** + * * Represents the collection of custom XML parts contained by this workbook. Read-only. * * [Api set: ExcelApi 1.5] @@ -38780,6 +46753,40 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ worksheets?: Excel.Interfaces.WorksheetData[]; + /** + * + * True if the workbook is in auto save mode. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSave?: boolean; + /** + * + * Returns a number about the version of Excel Calculation Engine. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationEngineVersion?: number; + /** + * + * True if all charts in the workbook are tracking the actual data points to which they are attached. + False if the charts track the index of the data points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + chartDataPointTrack?: boolean; + /** + * + * True if no changes have been made to the specified workbook since it was last saved. + You can set this property to True if you want to close a modified workbook without either saving it or being prompted to save it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDirty?: boolean; /** * * Gets the workbook name. Read-only. @@ -38787,6 +46794,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ name?: string; + /** + * + * True if the workbook has ever been saved locally or online. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + previouslySaved?: boolean; /** * * True if the workbook is open in Read-only mode. Read-only. @@ -38794,6 +46809,23 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ readOnly?: boolean; + /** + * + * True if the workbook uses the 1904 date system. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + use1904DateSystem?: boolean; + /** + * + * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. + Data will permanently lose accuracy when switching this property from false to true. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + usePrecisionAsDisplayed?: boolean; } /** An interface describing the data returned by calling "workbookProtection.toJSON()". */ interface WorkbookProtectionData { @@ -38807,16 +46839,17 @@ declare namespace Excel { } /** An interface describing the data returned by calling "workbookCreated.toJSON()". */ interface WorkbookCreatedData { - /** - * - * Returns a value that uniquely identifies the WorkbookCreated object. - * - * [Api set: ExcelApi 1.8] - */ - id?: string; } /** An interface describing the data returned by calling "worksheet.toJSON()". */ interface WorksheetData { + /** + * + * Represents the AutoFilter object of the worksheet. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterData; /** * * Returns collection of charts that are part of the worksheet. Read-only. @@ -38826,6 +46859,14 @@ declare namespace Excel { charts?: Excel.Interfaces.ChartData[]; /** * + * Gets the horizontal page break collection for the worksheet. This collection only contains manual page breaks. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * * Collection of names scoped to the current worksheet. Read-only. * * [Api set: ExcelApi 1.4] @@ -38833,6 +46874,14 @@ declare namespace Excel { names?: Excel.Interfaces.NamedItemData[]; /** * + * Gets the PageLayout object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pageLayout?: Excel.Interfaces.PageLayoutData; + /** + * * Collection of PivotTables that are part of the worksheet. Read-only. * * [Api set: ExcelApi 1.3] @@ -38847,11 +46896,36 @@ declare namespace Excel { protection?: Excel.Interfaces.WorksheetProtectionData; /** * + * Returns the collection of all the Shape objects on the worksheet. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * * Collection of tables that are part of the worksheet. Read-only. * * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableData[]; + /** + * + * Gets the vertical page break collection for the worksheet. This collection only contains manual page breaks. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalPageBreaks?: Excel.Interfaces.PageBreakData[]; + /** + * + * Gets or sets the enableCalculation property of the worksheet. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableCalculation?: boolean; /** * * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. @@ -38965,13 +47039,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ format?: Excel.Interfaces.RangeFormatData; - /** - * - * The worksheet containing the current range. Read-only. - * - * [Api set: ExcelApi 1.1] - */ - worksheet?: Excel.Interfaces.WorksheetData; /** * * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. "Sheet1!A1:B4"). Read-only. @@ -39038,6 +47105,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ formulasR1C1?: any[][]; + /** + * + * Represents if all cells have a spill border. + Returns true if all cells have a spill border, or false if all cells do not have a spill border. + Returns null if there are cells both with and without spill borders within the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasSpill?: boolean; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -39066,6 +47143,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; + /** + * + * Represents the data type state of each cell. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedDataTypeState?: Excel.LinkedDataTypeState[][]; /** * * Represents Excel's number format code for the given range. @@ -39135,6 +47220,99 @@ declare namespace Excel { */ values?: any[][]; } + /** An interface describing the data returned by calling "rangeAreas.toJSON()". */ + interface RangeAreasData { + /** + * + * Returns a collection of rectangular ranges that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + areas?: Excel.Interfaces.RangeData[]; + /** + * + * Returns a collection of ConditionalFormats that intersect with any cells in this RangeAreas object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatData[]; + /** + * + * Returns a dataValidation object for all ranges in the RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataValidation?: Excel.Interfaces.DataValidationData; + /** + * + * Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * + * Returns the RageAreas reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g. "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address?: string; + /** + * + * Returns the RageAreas reference in the user locale. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + addressLocal?: string; + /** + * + * Returns the number of rectangular ranges that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + areaCount?: number; + /** + * + * Returns the number of cells in the RangeAreas object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cellCount?: number; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire columns (e.g., "A:C, Q:Z"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isEntireColumn?: boolean; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire rows (e.g., "1:3, 5:7"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isEntireRow?: boolean; + /** + * + * Represents the style for all ranges in this RangeAreas object. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: string; + } /** An interface describing the data returned by calling "rangeView.toJSON()". */ interface RangeViewData { /** @@ -39260,20 +47438,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ arrayValues?: Excel.Interfaces.NamedItemArrayValuesData; - /** - * - * Returns the worksheet on which the named item is scoped to. Throws an error if the item is scoped to the workbook instead. - * - * [Api set: ExcelApi 1.4] - */ - worksheet?: Excel.Interfaces.WorksheetData; - /** - * - * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. - * - * [Api set: ExcelApi 1.4] - */ - worksheetOrNullObject?: Excel.Interfaces.WorksheetData; /** * * Represents the comment associated with this name. @@ -39366,8 +47530,20 @@ declare namespace Excel { interface TableCollectionData { items?: Excel.Interfaces.TableData[]; } + /** An interface describing the data returned by calling "tableScopedCollection.toJSON()". */ + interface TableScopedCollectionData { + items?: Excel.Interfaces.TableData[]; + } /** An interface describing the data returned by calling "table.toJSON()". */ interface TableData { + /** + * + * Represents the AutoFilter object of the table. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterData; /** * * Represents a collection of all the columns in the table. Read-only. @@ -39389,13 +47565,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ sort?: Excel.Interfaces.TableSortData; - /** - * - * The worksheet containing the current table. Read-only. - * - * [Api set: ExcelApi 1.2] - */ - worksheet?: Excel.Interfaces.WorksheetData; /** * * Indicates whether the first column contains special formatting. @@ -39584,6 +47753,25 @@ declare namespace Excel { */ valid?: boolean; } + /** An interface describing the data returned by calling "removeDuplicatesResult.toJSON()". */ + interface RemoveDuplicatesResultData { + /** + * + * Number of duplicated rows removed by the operation. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + removed?: number; + /** + * + * Number of remaining unique rows present in the resulting range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + uniqueRemaining?: number; + } /** An interface describing the data returned by calling "rangeFormat.toJSON()". */ interface RangeFormatData { /** @@ -39614,6 +47802,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionData; + /** + * + * Indicates if text is automatically indented when text alignment is set to equal distribution. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoIndent?: boolean; /** * * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. @@ -39628,6 +47824,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * An integer from 0 to 250 that indicates the indent level. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + indentLevel?: number; + /** + * + * The reading order for the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; /** * * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. @@ -39635,6 +47847,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ rowHeight?: number; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shrinkToFit?: boolean; /** * * Gets or sets the text orientation of all the cells within the range. @@ -39705,6 +47925,42 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color?: string; + /** + * + * Gets or sets the pattern of a Range. See Excel.FillPattern for details. LinearGradient and RectangularGradient are not supported. + A null value indicates that the entire range doesn't have uniform pattern setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * + * Sets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + Gets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternColor?: string; + /** + * + * Returns or sets a double that lightens or darkens a pattern color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the pattern tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternTintAndShade?: number; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; } /** An interface describing the data returned by calling "rangeBorder.toJSON()". */ interface RangeBorderData { @@ -39729,6 +47985,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the border doesn't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. @@ -39778,6 +48043,45 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ size?: number; + /** + * + * Represents the strikethrough status of font. A null value indicates that the entire range doesn't have uniform Strikethrough setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + strikethrough?: boolean; + /** + * + * Represents the Subscript status of font. + Returns True if all the fonts of the range are Subscript. + Returns False if all the fonts of the range are Superscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + subscript?: boolean; + /** + * + * Represents the Superscript status of font. + Returns True if all the fonts of the range are Superscript. + Returns False if all the fonts of the range are Subscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + superscript?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Font, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire range doesn't have uniform font tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: number; /** * * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. @@ -39822,6 +48126,14 @@ declare namespace Excel { legend?: Excel.Interfaces.ChartLegendData; /** * + * Encapsulates the options for the pivot chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsData; + /** + * * Represents the plotArea for the chart. * * [Api set: ExcelApi 1.8] @@ -39841,13 +48153,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ title?: Excel.Interfaces.ChartTitleData; - /** - * - * The worksheet containing the current chart. Read-only. - * - * [Api set: ExcelApi 1.2] - */ - worksheet?: Excel.Interfaces.WorksheetData; /** * * Returns or sets a ChartCategoryLabelLevel enumeration constant referring to @@ -39958,6 +48263,42 @@ declare namespace Excel { */ width?: number; } + /** An interface describing the data returned by calling "chartPivotOptions.toJSON()". */ + interface ChartPivotOptionsData { + /** + * + * Represents whether to display axis field buttons on a PivotChart. + The ShowAxisFieldButtons property corresponds to the Show Axis Field Buttons command on the Field Buttons drop-down list of the Analyze tab, which is available when a PivotChart is selected. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAxisFieldButtons?: boolean; + /** + * + * Represents whether to display legend field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLegendFieldButtons?: boolean; + /** + * + * Represents whether to display report filter field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showReportFilterFieldButtons?: boolean; + /** + * + * Represents whether to display show value field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showValueFieldButtons?: boolean; + } /** An interface describing the data returned by calling "chartAreaFormat.toJSON()". */ interface ChartAreaFormatData { /** @@ -39974,6 +48315,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontData; + /** + * + * Returns or sets an integer that represents the color scheme for the chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + colorScheme?: Excel.ChartColorScheme | "ColorfulPalette1" | "ColorfulPalette2" | "ColorfulPalette3" | "ColorfulPalette4" | "MonochromaticPalette1" | "MonochromaticPalette2" | "MonochromaticPalette3" | "MonochromaticPalette4" | "MonochromaticPalette5" | "MonochromaticPalette6" | "MonochromaticPalette7" | "MonochromaticPalette8" | "MonochromaticPalette9" | "MonochromaticPalette10" | "MonochromaticPalette11" | "MonochromaticPalette12" | "MonochromaticPalette13"; + /** + * + * True if the chart area of the chart has rounded corners. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + roundedCorners?: boolean; } /** An interface describing the data returned by calling "chartSeriesCollection.toJSON()". */ interface ChartSeriesCollectionData { @@ -39981,6 +48338,22 @@ declare namespace Excel { } /** An interface describing the data returned by calling "chartSeries.toJSON()". */ interface ChartSeriesData { + /** + * + * Encapsulates the bin options only for histogram chart and pareto chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + binOptions?: Excel.Interfaces.ChartBinOptionsData; + /** + * + * Encapsulates the options for the Box & Whisker chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsData; /** * * Represents a collection of all dataLabels in the series. @@ -39997,6 +48370,14 @@ declare namespace Excel { format?: Excel.Interfaces.ChartSeriesFormatData; /** * + * Encapsulates the options for the Map chart. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsData; + /** + * * Represents a collection of all points in the series. Read-only. * * [Api set: ExcelApi 1.1] @@ -40009,6 +48390,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ trendlines?: Excel.Interfaces.ChartTrendlineData[]; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + xerrorBars?: Excel.Interfaces.ChartErrorBarsData; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + yerrorBars?: Excel.Interfaces.ChartErrorBarsData; /** * * Returns or sets the group for the specified series. Read/Write @@ -40016,6 +48413,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ axisGroup?: Excel.ChartAxisGroup | "Primary" | "Secondary"; + /** + * + * Returns or sets the scale factor for bubbles in the specified chart group. Can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bubbleScale?: number; /** * * Represents the chart type of a series. See Excel.ChartType for details. @@ -40060,6 +48465,86 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ gapWidth?: number; + /** + * + * Returns or sets the Color for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumColor?: string; + /** + * + * Returns or sets the type for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumValue?: number; + /** + * + * Returns or sets the Color for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointColor?: string; + /** + * + * Returns or sets the type for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointValue?: number; + /** + * + * Returns or sets the Color for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumColor?: string; + /** + * + * Returns or sets the type for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumType?: Excel.ChartGradientStyleType | "ExtremeValue" | "Number" | "Percent"; + /** + * + * Returns or sets the minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumValue?: number; + /** + * + * Returns or sets series gradient style of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientStyle?: Excel.ChartGradientStyle | "TwoPhaseColor" | "ThreePhaseColor"; /** * * Boolean value representing if the series has data labels or not. @@ -40067,6 +48552,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; + /** + * + * Returns or sets the fill color for negative data points in a series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + invertColor?: string; /** * * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. @@ -40116,6 +48609,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ overlap?: number; + /** + * + * Returns or sets series parent label strategy area of a treemap chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentLabelStrategy?: Excel.ChartParentLabelStrategy | "None" | "Banner" | "Overlapping"; /** * * Represents the plot order of a chart series within the chart group. @@ -40130,6 +48631,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ secondPlotSize?: number; + /** + * + * Returns or sets if connector lines show in a waterfall chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showConnectorLines?: boolean; + /** + * + * True if Microsoft Excel show leaderlines for each datalabel in series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLeaderLines?: boolean; /** * * Boolean value representing if the series has a shadow or not. @@ -40150,7 +48667,15 @@ declare namespace Excel { * * [Api set: ExcelApi 1.8] */ - splitType?: "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + splitType?: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" | "SplitByCustomSplit"; + /** + * + * Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + splitValue?: number; /** * * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. @@ -40324,20 +48849,6 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ categoryType?: Excel.ChartAxisCategoryType | "Automatic" | "TextAxis" | "DateAxis"; - /** - * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `Position` instead. - * Represents the specified axis where the other axis crosses. See Excel.ChartAxisPosition for details. - * - * [Api set: ExcelApi 1.7] - */ - crosses?: Excel.ChartAxisPosition | "Automatic" | "Maximum" | "Minimum" | "Custom"; - /** - * [DEPRECATED; kept for back-compat with existing first-party solutions]. Please use `PositionAt` instead. - * Represents the specified axis where the other axis crosses at. Read Only. Set to this property should use SetCrossesAt(double) method. - * - * [Api set: ExcelApi 1.7] - */ - crossesAt?: number; /** * * Represents the custom axis display unit value. Read-only. To set this property, please use the SetCustomDisplayUnit(double) method. @@ -40373,6 +48884,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ left?: number; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the base of the logarithm when using logarithmic scales. @@ -40631,6 +49150,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ horizontalAlignment?: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the format code for data labels. @@ -40755,6 +49282,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for data label. @@ -40872,6 +49407,60 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontData; } + /** An interface describing the data returned by calling "chartErrorBars.toJSON()". */ + interface ChartErrorBarsData { + /** + * + * Represents the formatting of chart ErrorBars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.ChartErrorBarsFormatData; + /** + * + * Represents whether have the end style cap for the error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + endStyleCap?: boolean; + /** + * + * Represents which error-bar parts to include. See Excel.ChartErrorBarsInclude for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + include?: Excel.ChartErrorBarsInclude | "Both" | "MinusValues" | "PlusValues"; + /** + * + * Represents the range marked by error bars. See Excel.ChartErrorBarsType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ChartErrorBarsType | "FixedValue" | "Percent" | "StDev" | "StError" | "Custom"; + /** + * + * Represents whether shown error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartErrorBarsFormat.toJSON()". */ + interface ChartErrorBarsFormatData { + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.ChartLineFormatData; + } /** An interface describing the data returned by calling "chartGridlines.toJSON()". */ interface ChartGridlinesData { /** @@ -41038,6 +49627,33 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontData; } + /** An interface describing the data returned by calling "chartMapOptions.toJSON()". */ + interface ChartMapOptionsData { + /** + * + * Returns or sets series map labels strategy of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + labelStrategy?: Excel.ChartMapLabelStrategy | "None" | "BestFit" | "ShowAll"; + /** + * + * Returns or sets series map area of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: Excel.ChartMapAreaLevel | "Automatic" | "DataOnly" | "City" | "County" | "State" | "Country" | "Continent" | "World"; + /** + * + * Returns or sets series projection type of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + projectionType?: Excel.ChartMapProjectionType | "Automatic" | "Mercator" | "Miller" | "Robinson" | "Albers"; + } /** An interface describing the data returned by calling "chartTitle.toJSON()". */ interface ChartTitleData { /** @@ -41183,6 +49799,108 @@ declare namespace Excel { */ weight?: number; } + /** An interface describing the data returned by calling "chartBinOptions.toJSON()". */ + interface ChartBinOptionsData { + /** + * + * Returns or sets if bin overflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowOverflow?: boolean; + /** + * + * Returns or sets if bin underflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowUnderflow?: boolean; + /** + * + * Returns or sets count of bin of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + count?: number; + /** + * + * Returns or sets bin overflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + overflowValue?: number; + /** + * + * Returns or sets bin type of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ChartBinType | "Category" | "Auto" | "BinWidth" | "BinCount"; + /** + * + * Returns or sets bin underflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underflowValue?: number; + /** + * + * Returns or sets bin width value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + } + /** An interface describing the data returned by calling "chartBoxwhiskerOptions.toJSON()". */ + interface ChartBoxwhiskerOptionsData { + /** + * + * Returns or sets quartile calculation type of a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + quartileCalculation?: Excel.ChartBoxQuartileCalculation | "Inclusive" | "Exclusive"; + /** + * + * Returns or sets if inner points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showInnerPoints?: boolean; + /** + * + * Returns or sets if mean line showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanLine?: boolean; + /** + * + * Returns or sets if mean marker showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanMarker?: boolean; + /** + * + * Returns or sets if outlier points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showOutlierPoints?: boolean; + } /** An interface describing the data returned by calling "chartLineFormat.toJSON()". */ interface ChartLineFormatData { /** @@ -41391,6 +50109,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: number; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for trendline label. @@ -41569,6 +50295,33 @@ declare namespace Excel { */ criteria?: Excel.FilterCriteria; } + /** An interface describing the data returned by calling "autoFilter.toJSON()". */ + interface AutoFilterData { + /** + * + * Array that holds all filter criterias in an autofiltered range. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + criteria?: Excel.FilterCriteria[]; + /** + * + * Indicates if the AutoFilter is enabled or not. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled?: boolean; + /** + * + * Indicates if the AutoFilter has filter criteria. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDataFiltered?: boolean; + } /** An interface describing the data returned by calling "customXmlPartScopedCollection.toJSON()". */ interface CustomXmlPartScopedCollectionData { items?: Excel.Interfaces.CustomXmlPartData[]; @@ -41630,25 +50383,11 @@ declare namespace Excel { hierarchies?: Excel.Interfaces.PivotHierarchyData[]; /** * - * The PivotLayout describing the layout and visual structure of the PivotTable. - * - * [Api set: ExcelApi 1.8] - */ - layout?: Excel.Interfaces.PivotLayoutData; - /** - * * The Row Pivot Hierarchies of the PivotTable. * * [Api set: ExcelApi 1.8] */ rowHierarchies?: Excel.Interfaces.RowColumnPivotHierarchyData[]; - /** - * - * The worksheet containing the current PivotTable. - * - * [Api set: ExcelApi 1.3] - */ - worksheet?: Excel.Interfaces.WorksheetData; /** * * Id of the PivotTable. Read-only. @@ -41663,9 +50402,25 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ name?: string; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useCustomSortLists?: boolean; } /** An interface describing the data returned by calling "pivotLayout.toJSON()". */ interface PivotLayoutData { + /** + * + * True if the field list should be shown or hidden from the UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableFieldList?: boolean; /** * * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. @@ -42393,7 +51148,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.6] */ - style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes"; + style?: Excel.IconSet | "Invalid" | "ThreeArrows" | "ThreeArrowsGray" | "ThreeFlags" | "ThreeTrafficLights1" | "ThreeTrafficLights2" | "ThreeSigns" | "ThreeSymbols" | "ThreeSymbols2" | "FourArrows" | "FourArrowsGray" | "FourRedToBlack" | "FourRating" | "FourTrafficLights" | "FiveArrows" | "FiveArrowsGray" | "FiveRating" | "FiveQuarters" | "ThreeStars" | "ThreeTriangles" | "FiveBoxes" | "LinkedEntityFinanceIcon" | "LinkedEntityMapIcon"; } /** An interface describing the data returned by calling "colorScaleConditionalFormat.toJSON()". */ interface ColorScaleConditionalFormatData { @@ -42755,6 +51510,754 @@ declare namespace Excel { interface StyleCollectionData { items?: Excel.Interfaces.StyleData[]; } + /** An interface describing the data returned by calling "pageLayout.toJSON()". */ + interface PageLayoutData { + /** + * + * Header and footer configuration for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupData; + /** + * + * Gets or sets the worksheet's black and white print option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + blackAndWhite?: boolean; + /** + * + * Gets or sets the worksheet's bottom page margin to use for printing in points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: number; + /** + * + * Gets or sets the worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHorizontally?: boolean; + /** + * + * Gets or sets the worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerVertically?: boolean; + /** + * + * Gets or sets the worksheet's draft mode option. If true the sheet will be printed without graphics. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + draftMode?: boolean; + /** + * + * Gets or sets the worksheet's first page number to print. Null value represents "auto" page numbering. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPageNumber?: number | ""; + /** + * + * Gets or sets the worksheet's footer margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + footerMargin?: number; + /** + * + * Gets or sets the worksheet's header margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headerMargin?: number; + /** + * + * Gets or sets the worksheet's left margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: number; + /** + * + * Gets or sets the worksheet's orientation of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: Excel.PageOrientation | "Portrait" | "Landscape"; + /** + * + * Gets or sets the worksheet's paper size of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + paperSize?: Excel.PaperType | "Letter" | "LetterSmall" | "Tabloid" | "Ledger" | "Legal" | "Statement" | "Executive" | "A3" | "A4" | "A4Small" | "A5" | "B4" | "B5" | "Folio" | "Quatro" | "Paper10x14" | "Paper11x17" | "Note" | "Envelope9" | "Envelope10" | "Envelope11" | "Envelope12" | "Envelope14" | "Csheet" | "Dsheet" | "Esheet" | "EnvelopeDL" | "EnvelopeC5" | "EnvelopeC3" | "EnvelopeC4" | "EnvelopeC6" | "EnvelopeC65" | "EnvelopeB4" | "EnvelopeB5" | "EnvelopeB6" | "EnvelopeItaly" | "EnvelopeMonarch" | "EnvelopePersonal" | "FanfoldUS" | "FanfoldStdGerman" | "FanfoldLegalGerman"; + /** + * + * Gets or sets whether the worksheet's comments should be displayed when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printComments?: Excel.PrintComments | "NoComments" | "EndSheet" | "InPlace"; + /** + * + * Gets or sets the worksheet's print errors option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printErrors?: Excel.PrintErrorType | "AsDisplayed" | "Blank" | "Dash" | "NotAvailable"; + /** + * + * Gets or sets the worksheet's print gridlines flag. This flag determines whether gridlines will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printGridlines?: boolean; + /** + * + * Gets or sets the worksheet's print headings flag. This flag determines whether headings will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printHeadings?: boolean; + /** + * + * Gets or sets the worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printOrder?: Excel.PrintOrder | "DownThenOver" | "OverThenDown"; + /** + * + * Gets or sets the worksheet's right margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: number; + /** + * + * Gets or sets the worksheet's top margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: number; + /** + * + * Gets or sets the worksheet's print zoom options. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zoom?: Excel.PageLayoutZoomOptions; + } + /** An interface describing the data returned by calling "headerFooter.toJSON()". */ + interface HeaderFooterData { + /** + * + * Gets or sets the center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerFooter?: string; + /** + * + * Gets or sets the center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHeader?: string; + /** + * + * Gets or sets the left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftFooter?: string; + /** + * + * Gets or sets the left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftHeader?: string; + /** + * + * Gets or sets the right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightFooter?: string; + /** + * + * Gets or sets the right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightHeader?: string; + } + /** An interface describing the data returned by calling "headerFooterGroup.toJSON()". */ + interface HeaderFooterGroupData { + /** + * + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterData; + /** + * + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + evenPages?: Excel.Interfaces.HeaderFooterData; + /** + * + * The first page header/footer, for all other pages general or even/odd is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPage?: Excel.Interfaces.HeaderFooterData; + /** + * + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + oddPages?: Excel.Interfaces.HeaderFooterData; + /** + * + * Gets or sets the state of which headers/footers are set. See Excel.HeaderFooterState for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + state?: Excel.HeaderFooterState | "Default" | "FirstAndDefault" | "OddAndEven" | "FirstOddAndEven"; + /** + * + * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetMargins?: boolean; + /** + * + * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetScale?: boolean; + } + /** An interface describing the data returned by calling "pageBreak.toJSON()". */ + interface PageBreakData { + /** + * + * Represents the column index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + columnIndex?: number; + /** + * + * Represents the row index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowIndex?: number; + } + /** An interface describing the data returned by calling "pageBreakCollection.toJSON()". */ + interface PageBreakCollectionData { + items?: Excel.Interfaces.PageBreakData[]; + } + /** An interface describing the data returned by calling "rangeCollection.toJSON()". */ + interface RangeCollectionData { + items?: Excel.Interfaces.RangeData[]; + } + /** An interface describing the data returned by calling "commentCollection.toJSON()". */ + interface CommentCollectionData { + items?: Excel.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling "comment.toJSON()". */ + interface CommentData { + /** + * + * Represents a collection of reply objects associated with the comment. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + replies?: Excel.Interfaces.CommentReplyData[]; + /** + * + * Represents the comment identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * Represents whether it is a comment thread or reply. Always return true here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** An interface describing the data returned by calling "commentReplyCollection.toJSON()". */ + interface CommentReplyCollectionData { + items?: Excel.Interfaces.CommentReplyData[]; + } + /** An interface describing the data returned by calling "commentReply.toJSON()". */ + interface CommentReplyData { + /** + * + * Represents the comment reply identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * Represents whether it is a comment thread or reply. Always return false here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** An interface describing the data returned by calling "shapeCollection.toJSON()". */ + interface ShapeCollectionData { + items?: Excel.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling "shape.toJSON()". */ + interface ShapeData { + /** + * + * Returns the fill formatting of the shape object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fill?: Excel.Interfaces.ShapeFillData; + /** + * + * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: string; + /** + * + * Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: string; + /** + * + * Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; + /** + * + * Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: number; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: number; + /** + * + * Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio?: boolean; + /** + * + * Represents the name of the shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * + * Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute"; + /** + * + * Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation?: number; + /** + * + * The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: number; + /** + * + * Returns the type of the specified shape. Read-only. See Excel.ShapeType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ShapeType | "Unknown" | "Image" | "GeometricShape" | "Group"; + /** + * + * Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: number; + /** + * + * Returns the position of the specified shape in the z-order, the very bottom shape's z-order value is 0. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zorderPosition?: number; + } + /** An interface describing the data returned by calling "geometricShape.toJSON()". */ + interface GeometricShapeData { + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + } + /** An interface describing the data returned by calling "image.toJSON()". */ + interface ImageData { + /** + * + * Represents the shape identifier for the image object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * Returns the format for the image. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.PictureFormat | "UNKNOWN" | "BMP" | "JPEG" | "GIF" | "PNG" | "SVG"; + } + /** An interface describing the data returned by calling "shapeGroup.toJSON()". */ + interface ShapeGroupData { + /** + * + * Returns the shape collection in the group. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shapes?: Excel.Interfaces.ShapeData[]; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + } + /** An interface describing the data returned by calling "groupShapeCollection.toJSON()". */ + interface GroupShapeCollectionData { + items?: Excel.Interfaces.ShapeData[]; + } + /** An interface describing the data returned by calling "shapeFill.toJSON()". */ + interface ShapeFillData { + /** + * + * Represents the shape fill fore color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + foreColor?: string; + /** + * + * Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). For API not supported shape types or special fill type with inconsistent transparencies, return null. For example, gradient fill type could have inconsistent transparencies. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: number; + /** + * + * Returns the fill type of the shape. Read-only. See Excel.ShapeFillType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: Excel.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "PictureAndTexture" | "Mixed"; + } + /** An interface describing the data returned by calling "textFrame.toJSON()". */ + interface TextFrameData { + /** + * + * Gets or sets the auto sizing settings for the text frame. A text frame can be set to auto size the text to fit the text frame, or auto size the text frame to fit the text, or without auto sizing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSize?: Excel.ShapeAutoSize | "AutoSizeNone" | "AutoSizeTextToFitShape" | "AutoSizeShapeToFitText" | "AutoSizeMixed"; + /** + * + * Represents the bottom margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: number; + /** + * + * Specifies whether the TextFrame contains text. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasText?: boolean; + /** + * + * Represents the horizontal alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalAlignment?: Excel.ShapeTextHorizontalAlignType | "Left" | "Center" | "Right" | "Justify" | "JustifyLow" | "Distributed" | "ThaiDistributed" | "ShapeTextHorizontalAlignType_MaxEnumIDs"; + /** + * + * Represents the horizontal overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalOverflow?: Excel.ShapeTextHorzOverflowType | "Overflow" | "Clip" | "ShapeTextHorzOverflowType_MaxEnumIDs"; + /** + * + * Represents the left margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: number; + /** + * + * Represents the text orientation of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: Excel.ShapeTextOrientationType | "Horizontal" | "Vertical" | "Vertical270" | "WordArtVertical" | "EastAsianVertical" | "MongolianVertical" | "WordArtVerticalRTL" | "ShapeTextOrientationType_MaxEnumIDs"; + /** + * + * Represents the reading order of the text frame, RTL or LTR. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: Excel.ShapeTextReadingOrder | "LTR" | "RTL"; + /** + * + * Represents the right margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: number; + /** + * + * Represents the top margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: number; + /** + * + * Represents the vertical alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalAlignment?: Excel.ShapeTextVerticalAlignType | "Top" | "Middle" | "Bottom" | "Justified" | "Distributed" | "ShapeTextVerticalAlignType_MaxEnumIDs"; + /** + * + * Represents the vertical overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalOverflow?: Excel.ShapeTextVertOverflowType | "Overflow" | "Ellipsis" | "Clip" | "ShapeTextVertOverflowType_MaxEnumIDs"; + } + /** An interface describing the data returned by calling "textRange.toJSON()". */ + interface TextRangeData { + /** + * + * Returns a ShapeFont object that represents the font attributes for the text range. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Excel.Interfaces.ShapeFontData; + /** + * + * Represents the plain text content of the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: string; + } + /** An interface describing the data returned by calling "shapeFont.toJSON()". */ + interface ShapeFontData { + /** + * + * Represents the bold status of font. Returns null the TextRange includes both bold and non-bold text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. Returns null if the TextRange includes text fragments with different colors. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: string; + /** + * + * Represents the italic status of font. Return null if the TextRange includes both italic and non-italic text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + italic?: boolean; + /** + * + * Represents font name (e.g. "Calibri"). If the text is Complex Script or East Asian language, represents corresponding font name; otherwise represents Latin font name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: string; + /** + * + * Represents font size in points (e.g. 11). Return null if the TextRange includes text fragments with different font sizes. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + size?: number; + /** + * + * Type of underline applied to the font. Return null if the TextRange includes text fragments with different underline styles. See Excel.ShapeFontUnderlineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underline?: Excel.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + } /** An interface describing the data returned by calling "functionResult.toJSON()". */ interface FunctionResultData { /** @@ -42796,6 +52299,24 @@ declare namespace Excel { */ interface ApplicationLoadOptions { $all?: boolean; + /** + * + * Returns the Iterative Calculation settings. + On Excel for Windows and Excel for Mac, the settings will apply to the Excel Application. + On Excel Online and Excel for other platforms, the settings will apply to the active workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + iterativeCalculation?: Excel.Interfaces.IterativeCalculationLoadOptions; + /** + * + * Returns a number about the version of Excel Calculation Engine that the workbook was last fully recalculated by. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationEngineVersion?: boolean; /** * * Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: `Automatic`, where Excel controls recalculation; `AutomaticExceptTables`, where Excel controls recalculation but ignores changes in tables; `Manual`, where calculation is done when the user requests it. @@ -42803,6 +52324,48 @@ declare namespace Excel { * [Api set: ExcelApi 1.1 for get, 1.8 for set] */ calculationMode?: boolean; + /** + * + * Returns a CalculationState that indicates the calculation state of the application. See Excel.CalculationState for details. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationState?: boolean; + } + /** + * + * Represents the Iterative Calculation settings. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface IterativeCalculationLoadOptions { + $all?: boolean; + /** + * + * True if Excel will use iteration to resolve circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled?: boolean; + /** + * + * Returns or sets the maximum amount of change between each iteration as Excel resolves circular references. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxChange?: boolean; + /** + * + * Returns or sets the maximum number of iterations that Excel can use to resolve a circular reference. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + maxIteration?: boolean; } /** * @@ -42847,6 +52410,40 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * True if the workbook is in auto save mode. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSave?: boolean; + /** + * + * Returns a number about the version of Excel Calculation Engine. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + calculationEngineVersion?: boolean; + /** + * + * True if all charts in the workbook are tracking the actual data points to which they are attached. + False if the charts track the index of the data points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + chartDataPointTrack?: boolean; + /** + * + * True if no changes have been made to the specified workbook since it was last saved. + You can set this property to True if you want to close a modified workbook without either saving it or being prompted to save it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDirty?: boolean; /** * * Gets the workbook name. Read-only. @@ -42854,6 +52451,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ name?: boolean; + /** + * + * True if the workbook has ever been saved locally or online. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + previouslySaved?: boolean; /** * * True if the workbook is open in Read-only mode. Read-only. @@ -42861,6 +52466,23 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ readOnly?: boolean; + /** + * + * True if the workbook uses the 1904 date system. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + use1904DateSystem?: boolean; + /** + * + * True if calculations in this workbook will be done using only the precision of the numbers as they're displayed. + Data will permanently lose accuracy when switching this property from false to true. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + usePrecisionAsDisplayed?: boolean; } /** * @@ -42888,6 +52510,14 @@ declare namespace Excel { $all?: boolean; /** * + * Represents the AutoFilter object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * * Returns collection of charts that are part of the worksheet. * * [Api set: ExcelApi 1.1] @@ -42895,6 +52525,14 @@ declare namespace Excel { charts?: Excel.Interfaces.ChartCollectionLoadOptions; /** * + * Gets the PageLayout object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * * Returns sheet protection object for a worksheet. * * [Api set: ExcelApi 1.2] @@ -42907,6 +52545,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * Gets or sets the enableCalculation property of the worksheet. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableCalculation?: boolean; /** * * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. @@ -42986,6 +52633,14 @@ declare namespace Excel { $all?: boolean; /** * + * For EACH ITEM in the collection: Represents the AutoFilter object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * * For EACH ITEM in the collection: Returns collection of charts that are part of the worksheet. * * [Api set: ExcelApi 1.1] @@ -42993,6 +52648,14 @@ declare namespace Excel { charts?: Excel.Interfaces.ChartCollectionLoadOptions; /** * + * For EACH ITEM in the collection: Gets the PageLayout object of the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pageLayout?: Excel.Interfaces.PageLayoutLoadOptions; + /** + * * For EACH ITEM in the collection: Returns sheet protection object for a worksheet. * * [Api set: ExcelApi 1.2] @@ -43005,6 +52668,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the enableCalculation property of the worksheet. + True if Excel recalculates the worksheet when necessary. False if Excel doesn't recalculate the sheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableCalculation?: boolean; /** * * For EACH ITEM in the collection: Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. @@ -43192,6 +52864,16 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ formulasR1C1?: boolean; + /** + * + * Represents if all cells have a spill border. + Returns true if all cells have a spill border, or false if all cells do not have a spill border. + Returns null if there are cells both with and without spill borders within the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasSpill?: boolean; /** * * Represents if all cells of the current range are hidden. Read-only. @@ -43220,6 +52902,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ isEntireRow?: boolean; + /** + * + * Represents the data type state of each cell. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedDataTypeState?: boolean; /** * * Represents Excel's number format code for the given range. @@ -43289,6 +52979,98 @@ declare namespace Excel { */ values?: boolean; } + /** + * + * RangeAreas represents a collection of one or more rectangular ranges in the same worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeAreasLoadOptions { + $all?: boolean; + /** + * + * Returns a dataValidation object for all ranges in the RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * + * Returns a rangeFormat object, encapsulating the the font, fill, borders, alignment, and other properties for all ranges in the RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * + * Returns the worksheet for the current RangeAreas. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Returns the RageAreas reference in A1-style. Address value will contain the worksheet name for each rectangular block of cells (e.g. "Sheet1!A1:B4, Sheet1!D1:D4"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address?: boolean; + /** + * + * Returns the RageAreas reference in the user locale. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + addressLocal?: boolean; + /** + * + * Returns the number of rectangular ranges that comprise this RangeAreas object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + areaCount?: boolean; + /** + * + * Returns the number of cells in the RangeAreas object, summing up the cell counts of all of the individual rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + cellCount?: boolean; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire columns (e.g., "A:C, Q:Z"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isEntireColumn?: boolean; + /** + * + * Indicates whether all the ranges on this RangeAreas object represent entire rows (e.g., "1:3, 5:7"). Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isEntireRow?: boolean; + /** + * + * Represents the style for all ranges in this RangeAreas object. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + style?: boolean; + } /** * * RangeView represents a set of visible cells of the parent range. @@ -43744,6 +53526,137 @@ declare namespace Excel { $all?: boolean; /** * + * For EACH ITEM in the collection: Represents the AutoFilter object of the table. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a numeric id. + * + * [Api set: ExcelApi 1.8] + */ + legacyId?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents a scoped collection of tables. For each table its top-left corner is considered its anchor location and the tables are sorted top to bottom and then left to right. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TableScopedCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the AutoFilter object of the table. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * * For EACH ITEM in the collection: Represents a collection of all the columns in the table. * * [Api set: ExcelApi 1.1] @@ -43858,6 +53771,14 @@ declare namespace Excel { $all?: boolean; /** * + * Represents the AutoFilter object of the table. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoFilter?: Excel.Interfaces.AutoFilterLoadOptions; + /** + * * Represents a collection of all the columns in the table. * * [Api set: ExcelApi 1.1] @@ -44159,6 +54080,32 @@ declare namespace Excel { */ valid?: boolean; } + /** + * + * Represents the results from the removeDuplicates method on range + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RemoveDuplicatesResultLoadOptions { + $all?: boolean; + /** + * + * Number of duplicated rows removed by the operation. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + removed?: boolean; + /** + * + * Number of remaining unique rows present in the resulting range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + uniqueRemaining?: boolean; + } /** * * A format object encapsulating the range's font, fill, borders, alignment, and other properties. @@ -44195,6 +54142,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * + * Indicates if text is automatically indented when text alignment is set to equal distribution. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoIndent?: boolean; /** * * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. @@ -44209,6 +54164,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ horizontalAlignment?: boolean; + /** + * + * An integer from 0 to 250 that indicates the indent level. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + indentLevel?: boolean; + /** + * + * The reading order for the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: boolean; /** * * Gets or sets the height of all rows in the range. If the row heights are not uniform, null will be returned. @@ -44216,6 +54187,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ rowHeight?: boolean; + /** + * + * Indicates if text automatically shrinks to fit in the available column width. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shrinkToFit?: boolean; /** * * Gets or sets the text orientation of all the cells within the range. @@ -44298,6 +54277,42 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ color?: boolean; + /** + * + * Gets or sets the pattern of a Range. See Excel.FillPattern for details. LinearGradient and RectangularGradient are not supported. + A null value indicates that the entire range doesn't have uniform pattern setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pattern?: boolean; + /** + * + * Sets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + Gets HTML color code representing the color of the Range pattern, of the form #RRGGBB (e.g. "FFA500"). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternColor?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a pattern color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the pattern tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + patternTintAndShade?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Fill, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + If the tintAndShades are not uniform, null will be returned. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: boolean; } /** * @@ -44328,6 +54343,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ style?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the border doesn't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: boolean; /** * * Specifies the weight of the border around a range. See Excel.BorderWeight for details. @@ -44365,6 +54389,15 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ style?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets a double that lightens or darkens a color for Range Border, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the border doesn't have uniform tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: boolean; /** * * For EACH ITEM in the collection: Specifies the weight of the border around a range. See Excel.BorderWeight for details. @@ -44416,6 +54449,45 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ size?: boolean; + /** + * + * Represents the strikethrough status of font. A null value indicates that the entire range doesn't have uniform Strikethrough setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + strikethrough?: boolean; + /** + * + * Represents the Subscript status of font. + Returns True if all the fonts of the range are Subscript. + Returns False if all the fonts of the range are Superscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + subscript?: boolean; + /** + * + * Represents the Superscript status of font. + Returns True if all the fonts of the range are Superscript. + Returns False if all the fonts of the range are Subscript or normal (neither Superscript, nor Subscript). + Returns Null otherwise. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + superscript?: boolean; + /** + * + * Returns or sets a double that lightens or darkens a color for Range Font, the value is between -1 (darkest) and 1 (brightest), with 0 for the original color. + A null value indicates that the entire range doesn't have uniform font tintAndShade setting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + tintAndShade?: boolean; /** * * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. @@ -44462,6 +54534,14 @@ declare namespace Excel { legend?: Excel.Interfaces.ChartLegendLoadOptions; /** * + * For EACH ITEM in the collection: Encapsulates the options for the pivot chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * * For EACH ITEM in the collection: Represents the plotArea for the chart. * * [Api set: ExcelApi 1.8] @@ -44636,6 +54716,14 @@ declare namespace Excel { legend?: Excel.Interfaces.ChartLegendLoadOptions; /** * + * Encapsulates the options for the pivot chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pivotOptions?: Excel.Interfaces.ChartPivotOptionsLoadOptions; + /** + * * Represents the plotArea for the chart. * * [Api set: ExcelApi 1.8] @@ -44772,6 +54860,49 @@ declare namespace Excel { */ width?: boolean; } + /** + * + * Encapsulates the options for the pivot chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartPivotOptionsLoadOptions { + $all?: boolean; + /** + * + * Represents whether to display axis field buttons on a PivotChart. + The ShowAxisFieldButtons property corresponds to the Show Axis Field Buttons command on the Field Buttons drop-down list of the Analyze tab, which is available when a PivotChart is selected. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showAxisFieldButtons?: boolean; + /** + * + * Represents whether to display legend field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLegendFieldButtons?: boolean; + /** + * + * Represents whether to display report filter field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showReportFilterFieldButtons?: boolean; + /** + * + * Represents whether to display show value field buttons on a PivotChart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showValueFieldButtons?: boolean; + } /** * * Encapsulates the format properties for the overall chart area. @@ -44794,6 +54925,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.1] */ font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * + * Returns or sets an integer that represents the color scheme for the chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + colorScheme?: boolean; + /** + * + * True if the chart area of the chart has rounded corners. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + roundedCorners?: boolean; } /** * @@ -44805,6 +54952,22 @@ declare namespace Excel { $all?: boolean; /** * + * For EACH ITEM in the collection: Encapsulates the bin options only for histogram chart and pareto chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the options for the Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * * For EACH ITEM in the collection: Represents a collection of all dataLabels in the series. * * [Api set: ExcelApi 1.8] @@ -44819,11 +54982,35 @@ declare namespace Excel { format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; /** * + * For EACH ITEM in the collection: Encapsulates the options for the Map chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * * For EACH ITEM in the collection: Represents a collection of all points in the series. * * [Api set: ExcelApi 1.1] */ points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + xerrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + yerrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * * For EACH ITEM in the collection: Returns or sets the group for the specified series. Read/Write @@ -44831,6 +55018,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ axisGroup?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the scale factor for bubbles in the specified chart group. Can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bubbleScale?: boolean; /** * * For EACH ITEM in the collection: Represents the chart type of a series. See Excel.ChartType for details. @@ -44875,6 +55070,86 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ gapWidth?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the Color for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumColor?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the type for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumType?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumValue?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the Color for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointColor?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the type for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointType?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointValue?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the Color for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumColor?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the type for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumType?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumValue?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets series gradient style of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientStyle?: boolean; /** * * For EACH ITEM in the collection: Boolean value representing if the series has data labels or not. @@ -44882,6 +55157,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the fill color for negative data points in a series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + invertColor?: boolean; /** * * For EACH ITEM in the collection: True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. @@ -44931,6 +55214,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ overlap?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets series parent label strategy area of a treemap chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentLabelStrategy?: boolean; /** * * For EACH ITEM in the collection: Represents the plot order of a chart series within the chart group. @@ -44945,6 +55236,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ secondPlotSize?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets if connector lines show in a waterfall chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showConnectorLines?: boolean; + /** + * + * For EACH ITEM in the collection: True if Microsoft Excel show leaderlines for each datalabel in series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLeaderLines?: boolean; /** * * For EACH ITEM in the collection: Boolean value representing if the series has a shadow or not. @@ -44966,6 +55273,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ splitType?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + splitValue?: boolean; /** * * For EACH ITEM in the collection: True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. @@ -44984,6 +55299,22 @@ declare namespace Excel { $all?: boolean; /** * + * Encapsulates the bin options only for histogram chart and pareto chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + binOptions?: Excel.Interfaces.ChartBinOptionsLoadOptions; + /** + * + * Encapsulates the options for the Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + boxwhiskerOptions?: Excel.Interfaces.ChartBoxwhiskerOptionsLoadOptions; + /** + * * Represents a collection of all dataLabels in the series. * * [Api set: ExcelApi 1.8] @@ -44998,11 +55329,35 @@ declare namespace Excel { format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; /** * + * Encapsulates the options for the Map chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + mapOptions?: Excel.Interfaces.ChartMapOptionsLoadOptions; + /** + * * Represents a collection of all points in the series. * * [Api set: ExcelApi 1.1] */ points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + xerrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; + /** + * + * Represents the error bar object for a chart series. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + yerrorBars?: Excel.Interfaces.ChartErrorBarsLoadOptions; /** * * Returns or sets the group for the specified series. Read/Write @@ -45010,6 +55365,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ axisGroup?: boolean; + /** + * + * Returns or sets the scale factor for bubbles in the specified chart group. Can be an integer value from 0 (zero) to 300, corresponding to a percentage of the default size. Applies only to bubble charts. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bubbleScale?: boolean; /** * * Represents the chart type of a series. See Excel.ChartType for details. @@ -45054,6 +55417,86 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ gapWidth?: boolean; + /** + * + * Returns or sets the Color for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumColor?: boolean; + /** + * + * Returns or sets the type for maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumType?: boolean; + /** + * + * Returns or sets the maximum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMaximumValue?: boolean; + /** + * + * Returns or sets the Color for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointColor?: boolean; + /** + * + * Returns or sets the type for midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointType?: boolean; + /** + * + * Returns or sets the midpoint value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMidpointValue?: boolean; + /** + * + * Returns or sets the Color for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumColor?: boolean; + /** + * + * Returns or sets the type for minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumType?: boolean; + /** + * + * Returns or sets the minimum value of a region map chart series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientMinimumValue?: boolean; + /** + * + * Returns or sets series gradient style of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + gradientStyle?: boolean; /** * * Boolean value representing if the series has data labels or not. @@ -45061,6 +55504,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ hasDataLabels?: boolean; + /** + * + * Returns or sets the fill color for negative data points in a series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + invertColor?: boolean; /** * * True if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number. Read/Write. @@ -45110,6 +55561,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ overlap?: boolean; + /** + * + * Returns or sets series parent label strategy area of a treemap chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + parentLabelStrategy?: boolean; /** * * Represents the plot order of a chart series within the chart group. @@ -45124,6 +55583,22 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ secondPlotSize?: boolean; + /** + * + * Returns or sets if connector lines show in a waterfall chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showConnectorLines?: boolean; + /** + * + * True if Microsoft Excel show leaderlines for each datalabel in series. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showLeaderLines?: boolean; /** * * Boolean value representing if the series has a shadow or not. @@ -45145,6 +55620,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ splitType?: boolean; + /** + * + * Returns or sets the threshold value separating the two sections of either a pie of pie chart or a bar of pie chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + splitValue?: boolean; /** * * True if Microsoft Excel assigns a different color or pattern to each data marker. The chart must contain only one series. Read/Write. @@ -45458,6 +55941,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.7] */ left?: boolean; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the base of the logarithm when using logarithmic scales. @@ -45740,6 +56231,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ horizontalAlignment?: boolean; + /** + * + * Represents whether the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * Represents the format code for data labels. @@ -45870,6 +56369,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: boolean; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for data label. @@ -45993,6 +56500,74 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontLoadOptions; } + /** + * + * This object represents the attributes for chart error bars object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartErrorBarsLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart ErrorBars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: Excel.Interfaces.ChartErrorBarsFormatLoadOptions; + /** + * + * Represents whether have the end style cap for the error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + endStyleCap?: boolean; + /** + * + * Represents which error-bar parts to include. See Excel.ChartErrorBarsInclude for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + include?: boolean; + /** + * + * Represents the range marked by error bars. See Excel.ChartErrorBarsType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * + * Represents whether shown error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties for chart error bars. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartErrorBarsFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } /** * * Represents major or minor gridlines on a chart axis. @@ -46229,6 +56804,40 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontLoadOptions; } + /** + * + * Encapsulates the properties for Map chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartMapOptionsLoadOptions { + $all?: boolean; + /** + * + * Returns or sets series map labels strategy of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + labelStrategy?: boolean; + /** + * + * Returns or sets series map area of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + level?: boolean; + /** + * + * Returns or sets series projection type of a region map chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + projectionType?: boolean; + } /** * * Represents a chart title object of a chart. @@ -46398,6 +57007,122 @@ declare namespace Excel { */ weight?: boolean; } + /** + * + * Encapsulates the bon options only for histogram chart and pareto chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartBinOptionsLoadOptions { + $all?: boolean; + /** + * + * Returns or sets if bin overflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowOverflow?: boolean; + /** + * + * Returns or sets if bin underflow enabled in a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowUnderflow?: boolean; + /** + * + * Returns or sets count of bin of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + count?: boolean; + /** + * + * Returns or sets bin overflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + overflowValue?: boolean; + /** + * + * Returns or sets bin type of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * + * Returns or sets bin underflow value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underflowValue?: boolean; + /** + * + * Returns or sets bin width value of a histogram chart or pareto chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + } + /** + * + * Represents the properties for Box & Whisker chart. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ChartBoxwhiskerOptionsLoadOptions { + $all?: boolean; + /** + * + * Returns or sets quartile calculation type of a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + quartileCalculation?: boolean; + /** + * + * Returns or sets if inner points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showInnerPoints?: boolean; + /** + * + * Returns or sets if mean line showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanLine?: boolean; + /** + * + * Returns or sets if mean marker showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showMeanMarker?: boolean; + /** + * + * Returns or sets if outlier points showed in a Box & whisker chart. Read/Write. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + showOutlierPoints?: boolean; + } /** * * Encapsulates the formatting options for line elements. @@ -46718,6 +57443,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.8] */ left?: boolean; + /** + * + * Boolean value representing if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkNumberFormat?: boolean; /** * * String value that represents the format code for trendline label. @@ -46926,6 +57659,40 @@ declare namespace Excel { */ criteria?: boolean; } + /** + * + * Represents the AutoFilter object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface AutoFilterLoadOptions { + $all?: boolean; + /** + * + * Array that holds all filter criterias in an autofiltered range. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + criteria?: boolean; + /** + * + * Indicates if the AutoFilter is enabled or not. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enabled?: boolean; + /** + * + * Indicates if the AutoFilter has filter criteria. Read-Only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isDataFiltered?: boolean; + } /** * * A scoped collection of custom XML parts. @@ -47033,6 +57800,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ name?: boolean; + /** + * + * For EACH ITEM in the collection: True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useCustomSortLists?: boolean; } /** * @@ -47070,6 +57845,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.3] */ name?: boolean; + /** + * + * True if the PivotTable should use custom lists when sorting. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useCustomSortLists?: boolean; } /** * @@ -47079,6 +57862,14 @@ declare namespace Excel { */ interface PivotLayoutLoadOptions { $all?: boolean; + /** + * + * True if the field list should be shown or hidden from the UI. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enableFieldList?: boolean; /** * * This property indicates the PivotLayoutType of all fields on the PivotTable. If fields have different states, this will be null. @@ -48855,6 +59646,1485 @@ declare namespace Excel { */ wrapText?: boolean; } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface PageLayoutLoadOptions { + $all?: boolean; + /** + * + * Header and footer configuration for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headersFooters?: Excel.Interfaces.HeaderFooterGroupLoadOptions; + /** + * + * Gets or sets the worksheet's black and white print option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + blackAndWhite?: boolean; + /** + * + * Gets or sets the worksheet's bottom page margin to use for printing in points. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: boolean; + /** + * + * Gets or sets the worksheet's center horizontally flag. This flag determines whether the worksheet will be centered horizontally when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHorizontally?: boolean; + /** + * + * Gets or sets the worksheet's center vertically flag. This flag determines whether the worksheet will be centered vertically when it's printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerVertically?: boolean; + /** + * + * Gets or sets the worksheet's draft mode option. If true the sheet will be printed without graphics. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + draftMode?: boolean; + /** + * + * Gets or sets the worksheet's first page number to print. Null value represents "auto" page numbering. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPageNumber?: boolean; + /** + * + * Gets or sets the worksheet's footer margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + footerMargin?: boolean; + /** + * + * Gets or sets the worksheet's header margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + headerMargin?: boolean; + /** + * + * Gets or sets the worksheet's left margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: boolean; + /** + * + * Gets or sets the worksheet's orientation of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: boolean; + /** + * + * Gets or sets the worksheet's paper size of the page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + paperSize?: boolean; + /** + * + * Gets or sets whether the worksheet's comments should be displayed when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printComments?: boolean; + /** + * + * Gets or sets the worksheet's print errors option. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printErrors?: boolean; + /** + * + * Gets or sets the worksheet's print gridlines flag. This flag determines whether gridlines will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printGridlines?: boolean; + /** + * + * Gets or sets the worksheet's print headings flag. This flag determines whether headings will be printed or not. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printHeadings?: boolean; + /** + * + * Gets or sets the worksheet's page print order option. This specifies the order to use for processing the page number printed. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + printOrder?: boolean; + /** + * + * Gets or sets the worksheet's right margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: boolean; + /** + * + * Gets or sets the worksheet's top margin, in points, for use when printing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: boolean; + /** + * + * Gets or sets the worksheet's print zoom options. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zoom?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface HeaderFooterLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the center footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerFooter?: boolean; + /** + * + * Gets or sets the center header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + centerHeader?: boolean; + /** + * + * Gets or sets the left footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftFooter?: boolean; + /** + * + * Gets or sets the left header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftHeader?: boolean; + /** + * + * Gets or sets the right footer of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightFooter?: boolean; + /** + * + * Gets or sets the right header of the worksheet. + To apply font formatting or insert a variable value, use format codes specified here: https://msdn.microsoft.com/en-us/library/bb225426.aspx. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightHeader?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface HeaderFooterGroupLoadOptions { + $all?: boolean; + /** + * + * The general header/footer, used for all pages unless even/odd or first page is specified. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + defaultForAllPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * + * The header/footer to use for even pages, odd header/footer needs to be specified for odd pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + evenPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * + * The first page header/footer, for all other pages general or even/odd is used. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + firstPage?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * + * The header/footer to use for odd pages, even header/footer needs to be specified for even pages. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + oddPages?: Excel.Interfaces.HeaderFooterLoadOptions; + /** + * + * Gets or sets the state of which headers/footers are set. See Excel.HeaderFooterState for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + state?: boolean; + /** + * + * Gets or sets a flag indicating if headers/footers are aligned with the page margins set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetMargins?: boolean; + /** + * + * Gets or sets a flag indicating if headers/footers should be scaled by the page percentage scale set in the page layout options for the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + useSheetScale?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface PageBreakLoadOptions { + $all?: boolean; + /** + * + * Represents the column index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + columnIndex?: boolean; + /** + * + * Represents the row index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowIndex?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface PageBreakCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the column index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + columnIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the row index for the page break + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rowIndex?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface RangeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a data validation object. + * + * [Api set: ExcelApi 1.8] + */ + dataValidation?: Excel.Interfaces.DataValidationLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current range. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. "Sheet1!A1:B4"). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * + * For EACH ITEM in the collection: Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. + When setting formulas to a range, the value argument can be either a single value (a string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if all cells have a spill border. + Returns true if all cells have a spill border, or false if all cells do not have a spill border. + Returns null if there are cells both with and without spill borders within the range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasSpill?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if all cells of the current range are hidden. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the hyperlink for the current range. + * + * [Api set: ExcelApi 1.7] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if the current range is an entire column. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if the current range is an entire row. Read-only. + * + * [Api set: ExcelApi 1.7] + */ + isEntireRow?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the data type state of each cell. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + linkedDataTypeState?: boolean; + /** + * + * For EACH ITEM in the collection: Represents Excel's number format code for the given range. + When setting number format to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: Represents Excel's number format code for the given range as a string in the language of the user. + When setting number format local to a range, the value argument can be either a single value (string) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.7] + */ + numberFormatLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the style of the current range. + If the styles of the cells are inconsistent, null will be returned. + For custom styles, the style name will be returned. For built-in styles, a string representing a value in the BuiltInStyle enum will be returned. + * + * [Api set: ExcelApi 1.7] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cells that contain an error will return the error string. + When setting values to a range, the value argument can be either a single value (string, number or boolean) or a two-dimensional array. If the argument is a single value, it will be applied to all cells in the range. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a collection of comment objects that are part of the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the comment identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Represents whether it is a comment thread or reply. Always return true here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** + * + * Represents a cell comment object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentLoadOptions { + $all?: boolean; + /** + * + * Represents the comment identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * Represents whether it is a comment thread or reply. Always return true here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** + * + * Represents a collection of comment reply objects that are part of the comment. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentReplyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the comment reply identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Represents whether it is a comment thread or reply. Always return false here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** + * + * Represents a cell comment reply object in the workbook. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CommentReplyLoadOptions { + $all?: boolean; + /** + * + * Represents the comment reply identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * Represents whether it is a comment thread or reply. Always return false here. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + isParent?: boolean; + } + /** + * + * Represents all the shapes in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the fill formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the geometric shape for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GeometricShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the shape group for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GroupShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the image for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the textFrame object of a shape. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the type of the specified shape. Read-only. See Excel.ShapeType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, the very bottom shape's z-order value is 0. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zorderPosition?: boolean; + } + /** + * + * Represents a generic shape object in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeLoadOptions { + $all?: boolean; + /** + * + * Returns the fill formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * + * Returns the geometric shape for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GeometricShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * + * Returns the shape group for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GroupShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * + * Returns the image for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * + * Returns the textFrame object of a shape. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * + * Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * + * Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; + /** + * + * Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * + * Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; + /** + * + * Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio?: boolean; + /** + * + * Represents the name of the shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement?: boolean; + /** + * + * Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation?: boolean; + /** + * + * The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; + /** + * + * Returns the type of the specified shape. Read-only. See Excel.ShapeType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * + * Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + /** + * + * Returns the position of the specified shape in the z-order, the very bottom shape's z-order value is 0. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zorderPosition?: boolean; + } + /** + * + * Represents a geometric shape object inside a worksheet. A geometric shape can be a line, rectangle, block arrow, equation, flowchart, start, banner, callout or basic shape in Excel. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface GeometricShapeLoadOptions { + $all?: boolean; + /** + * + * Returns the shape object for the geometric shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + } + /** + * + * Represents an image object in the worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ImageLoadOptions { + $all?: boolean; + /** + * + * Returns the shape object for the image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * + * Represents the shape identifier for the image object. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * Returns the format for the image. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + format?: boolean; + } + /** + * + * Represents a shape group object inside a worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeGroupLoadOptions { + $all?: boolean; + /** + * + * Returns the shape object for the group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + shape?: Excel.Interfaces.ShapeLoadOptions; + /** + * + * Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + } + /** + * + * Represents a shape collection inside a shape group. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface GroupShapeCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the fill formatting of the shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + fill?: Excel.Interfaces.ShapeFillLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the geometric shape for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GeometricShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the shape group for the shape object. Error will be thrown, if the shape object is other shape type (Like, Image, SmartArt, etc.) rather than GroupShape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + group?: Excel.Interfaces.ShapeGroupLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the image for the shape object. Error will be thrown, if the shape object is other shape type (Like, GeometricShape, SmartArt, etc.) rather than Image. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + image?: Excel.Interfaces.ImageLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the textFrame object of a shape. Read only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + textFrame?: Excel.Interfaces.TextFrameLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns or sets the alternative descriptive text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextDescription?: boolean; + /** + * + * For EACH ITEM in the collection: Returns or sets the alternative title text string for a Shape object when the object is saved to a Web page. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + altTextTitle?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the geometric shape type of the specified shape. See Excel.GeometricShapeType for detail. Returns null if the shape is not geometric, for example, get GeometricShapeType of a line or a chart will return null. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + geometricShapeType?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the shape identifier. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the left of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents if the aspect ratio locked, in boolean, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + lockAspectRatio?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the shape. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the placment, value that represents the way the object is attached to the cells below it. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + placement?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the rotation, in degrees, of the shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rotation?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the top of the worksheet. + Throws an invalid argument exception when set with negative value as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the type of the specified shape. Read-only. See Excel.ShapeType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the visibility, in boolean, of the specified shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + visible?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the shape. + Throws an invalid argument exception when set with negative value or zero as input. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + width?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, the very bottom shape's z-order value is 0. Read-only. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + zorderPosition?: boolean; + } + /** + * + * Represents the fill formatting for a shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeFillLoadOptions { + $all?: boolean; + /** + * + * Represents the shape fill fore color in HTML color format, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + foreColor?: boolean; + /** + * + * Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear). For API not supported shape types or special fill type with inconsistent transparencies, return null. For example, gradient fill type could have inconsistent transparencies. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + transparency?: boolean; + /** + * + * Returns the fill type of the shape. Read-only. See Excel.ShapeFillType for detail. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type?: boolean; + } + /** + * + * Represents the text frame for a shape object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TextFrameLoadOptions { + $all?: boolean; + textRange?: Excel.Interfaces.TextRangeLoadOptions; + /** + * + * Gets or sets the auto sizing settings for the text frame. A text frame can be set to auto size the text to fit the text frame, or auto size the text frame to fit the text, or without auto sizing. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoSize?: boolean; + /** + * + * Represents the bottom margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bottomMargin?: boolean; + /** + * + * Specifies whether the TextFrame contains text. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + hasText?: boolean; + /** + * + * Represents the horizontal alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalAlignment?: boolean; + /** + * + * Represents the horizontal overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + horizontalOverflow?: boolean; + /** + * + * Represents the left margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + leftMargin?: boolean; + /** + * + * Represents the text orientation of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + orientation?: boolean; + /** + * + * Represents the reading order of the text frame, RTL or LTR. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + readingOrder?: boolean; + /** + * + * Represents the right margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + rightMargin?: boolean; + /** + * + * Represents the top margin, in points, of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + topMargin?: boolean; + /** + * + * Represents the vertical alignment of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalAlignment?: boolean; + /** + * + * Represents the vertical overflow type of the text frame. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + verticalOverflow?: boolean; + } + /** + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface TextRangeLoadOptions { + $all?: boolean; + /** + * + * Returns a ShapeFont object that represents the font attributes for the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + font?: Excel.Interfaces.ShapeFontLoadOptions; + /** + * + * Represents the plain text content of the text range. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + text?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a TextRange in the Shape. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ShapeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. Returns null the TextRange includes both bold and non-bold text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. Returns null if the TextRange includes text fragments with different colors. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + color?: boolean; + /** + * + * Represents the italic status of font. Return null if the TextRange includes both italic and non-italic text fragments. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + italic?: boolean; + /** + * + * Represents font name (e.g. "Calibri"). If the text is Complex Script or East Asian language, represents corresponding font name; otherwise represents Latin font name. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + name?: boolean; + /** + * + * Represents font size in points (e.g. 11). Return null if the TextRange includes text fragments with different font sizes. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + size?: boolean; + /** + * + * Type of underline applied to the font. Return null if the TextRange includes text fragments with different underline styles. See Excel.ShapeFontUnderlineStyle for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + underline?: boolean; + } /** * * An object containing the result of a function-evaluation operation @@ -48906,6 +61176,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Creates a new document by using an optional base64 encoded .docx file. @@ -48930,6 +61202,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Body extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of rich text content control objects in the body. Read-only. @@ -49065,7 +61339,7 @@ declare namespace Word { clear(): void; /** * - * Gets the HTML representation of the body object. + * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method does not return the exact same HTML for the same document on different platforms (Windows, Mac, Word Online, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. * * [Api set: WordApi 1.1] */ @@ -49340,6 +61614,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class ContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of content control objects in the content control. Read-only. @@ -49561,7 +61837,7 @@ declare namespace Word { delete(keepContent: boolean): void; /** * - * Gets the HTML representation of the content control object. + * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method does not return the exact same HTML for the same document on different platforms (Windows, Mac, Word Online, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. * * [Api set: WordApi 1.1] */ @@ -49834,6 +62110,36 @@ declare namespace Word { select?: string; expand?: string; }): Word.ContentControl; + /** + * + * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * + * Occurs when selection within the content control is changed. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -49851,6 +62157,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class ContentControlCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.ContentControl[]; /** @@ -49956,6 +62264,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class CustomProperty extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the key of the custom property. Read only. @@ -50036,6 +62346,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.CustomProperty[]; /** @@ -50108,6 +62420,347 @@ declare namespace Word { untrack(): Word.CustomPropertyCollection; toJSON(): Word.Interfaces.CustomPropertyCollectionData; } + /** + * + * Represents a custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class CustomXmlPart extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * + * Gets the ID of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly id: string; + /** + * + * Gets the namespace URI of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly namespaceUri: string; + /** + * + * Deletes the custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * + * Deletes an attribute with the given name from the element identified by xpath. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + * @param name Required. Name of the attribute. + */ + deleteAttribute(xpath: string, namespaceMappings: any, name: string): void; + /** + * + * Deletes the element identified by xpath. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + */ + deleteElement(xpath: string, namespaceMappings: any): void; + /** + * + * Gets the full XML content of the custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getXml(): OfficeExtension.ClientResult; + /** + * + * Inserts an attribute with the given name and value to the element identified by xpath. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + * @param name Required. Name of the attribute. + * @param value Required. Value of the attribute. + */ + insertAttribute(xpath: string, namespaceMappings: any, name: string, value: string): void; + /** + * + * Inserts the given XML under the parent element identified by xpath at child position index. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single parent element in XPath notation. + * @param xml Required. XML content to be inserted. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + * @param index Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. + */ + insertElement(xpath: string, xml: string, namespaceMappings: any, index?: number): void; + /** + * + * Queries the XML content of the custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. An XPath query. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + * @returns An array where each item represents an entry matched by the XPath query. + */ + query(xpath: string, namespaceMappings: any): OfficeExtension.ClientResult; + /** + * + * Sets the full XML content of the custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xml Required. XML content to be set. + */ + setXml(xml: string): void; + /** + * + * Updates the value of an attribute with the given name of the element identified by xpath. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + * @param name Required. Name of the attribute. + * @param value Required. New value of the attribute. + */ + updateAttribute(xpath: string, namespaceMappings: any, name: string, value: string): void; + /** + * + * Updates the XML of the element identified by xpath. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xpath Required. Absolute path to the single element in XPath notation. + * @param xml Required. New XML content to be stored. + * @param namespaceMappings Required. An object whose properties represent namespace aliases and the values are the actual namespace URIs. + */ + updateElement(xpath: string, xml: string, namespaceMappings: any): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.CustomXmlPart` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.CustomXmlPart` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.CustomXmlPart` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; + load(option?: string | string[]): Word.CustomXmlPart; + load(option?: { + select?: string; + expand?: string; + }): Word.CustomXmlPart; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomXmlPart; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomXmlPart; + toJSON(): Word.Interfaces.CustomXmlPartData; + } + /** + * + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class CustomXmlPartCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * + * Adds a new custom XML part to the document. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param xml Required. XML content. Must be a valid XML fragment. + */ + add(xml: string): Word.CustomXmlPart; + /** + * + * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param namespaceUri Required. The namespace URI. + */ + getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; + /** + * + * Gets the number of items in the collection. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom XML part based on its ID. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param id ID or index of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * + * Gets a custom XML part based on its ID. Returns a null object if the CustomXmlPart does not exist. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param id Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.CustomXmlPartCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.CustomXmlPartCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.CustomXmlPartCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; + load(option?: string | string[]): Word.CustomXmlPartCollection; + load(option?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomXmlPartCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartCollection; + toJSON(): Word.Interfaces.CustomXmlPartCollectionData; + } + /** + * + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * + * Gets the number of items in the collection. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom XML part based on its ID. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param id ID of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * + * Gets a custom XML part based on its ID. Returns a null object if the CustomXmlPart does not exist in the collection. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param id Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * + * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getOnlyItem(): Word.CustomXmlPart; + /** + * + * If the collection contains exactly one item, this method returns it. Otherwise, this method returns a null object. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getOnlyItemOrNullObject(): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.CustomXmlPartScopedCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.CustomXmlPartScopedCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.CustomXmlPartScopedCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + load(option?: string | string[]): Word.CustomXmlPartScopedCollection; + load(option?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomXmlPartScopedCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartScopedCollection; + toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; + } /** * * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. @@ -50115,6 +62768,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Document extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. @@ -50129,6 +62784,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the custom XML parts in the document. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly customXmlParts: Word.CustomXmlPartCollection; /** * * Gets the properties of the document. Read-only. @@ -50143,6 +62806,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ readonly sections: Word.SectionCollection; + /** + * + * Gets the add-in's settings in the document. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly settings: Word.SettingCollection; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. @@ -50164,6 +62835,36 @@ declare namespace Word { set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.Document): void; + /** + * + * Deletes a bookmark, if exists, from the document. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + deleteBookmark(name: string): void; + /** + * + * Gets a bookmark's range. Throws if the bookmark does not exist. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRange(name: string): Word.Range; + /** + * + * Gets a bookmark's range. Returns a null object if the bookmark does not exist. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; /** * * Gets the current selection of the document. Multiple selections are not supported. @@ -50199,6 +62900,16 @@ declare namespace Word { select?: string; expand?: string; }): Word.Document; + /** + * + * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @eventproperty + */ + readonly onContentControlAdded: OfficeExtension.EventHandlers; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -50216,6 +62927,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class DocumentCreated extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. @@ -50230,6 +62943,13 @@ declare namespace Word { * [Api set: WordApiHiddenDocument 1.3] */ readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the custom XML parts in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; /** * * Gets the properties of the document. Read-only. @@ -50244,6 +62964,13 @@ declare namespace Word { * [Api set: WordApiHiddenDocument 1.3] */ readonly sections: Word.SectionCollection; + /** + * + * Gets the add-in's settings in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly settings: Word.SettingCollection; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. @@ -50265,6 +62992,33 @@ declare namespace Word { set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Word.DocumentCreated): void; + /** + * + * Deletes a bookmark, if exists, from the document. + * + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + deleteBookmark(name: string): void; + /** + * + * Gets a bookmark's range. Throws if the bookmark does not exist. + * + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRange(name: string): Word.Range; + /** + * + * Gets a bookmark's range. Returns a null object if the bookmark does not exist. + * + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name Required. The bookmark name, which is case-insensitive. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; /** * * Opens the document. @@ -50317,6 +63071,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class DocumentProperties extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of custom properties of the document. Read only. @@ -50495,6 +63251,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Font extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. @@ -50624,6 +63382,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class InlinePicture extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the parent paragraph that contains the inline image. Read-only. @@ -50701,6 +63461,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink: string; + /** + * + * Gets the format of the inline image. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; /** * * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. @@ -50978,6 +63746,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class InlinePictureCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.InlinePicture[]; /** @@ -51029,6 +63799,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class List extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets paragraphs in the list. Read-only. @@ -51057,6 +63829,16 @@ declare namespace Word { * [Api set: WordApi 1.3] */ readonly levelTypes: Word.ListLevelType[]; + /** + * + * Gets the font of the bullet, number or picture at the specified level in the list. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param level Required. The level in the list. + */ + getLevelFont(level: number): Word.Font; /** * * Gets the paragraphs that occur at the specified level in the list. @@ -51066,6 +63848,16 @@ declare namespace Word { * @param level Required. The level in the list. */ getLevelParagraphs(level: number): Word.ParagraphCollection; + /** + * + * Gets the base64 encoded string representation of the picture at the specified level in the list. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param level Required. The level in the list. + */ + getLevelPicture(level: number): OfficeExtension.ClientResult; /** * * Gets the bullet, number or picture at the specified level as a string. @@ -51095,6 +63887,17 @@ declare namespace Word { * @param insertLocation Required. The value can be 'Start', 'End', 'Before', or 'After'. */ insertParagraph(paragraphText: string, insertLocation: "Before" | "After" | "Start" | "End" | "Replace"): Word.Paragraph; + /** + * + * Resets the font of the bullet, number or picture at the specified level in the list. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param level Required. The level in the list. + * @param resetFontName Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. + */ + resetLevelFont(level: number, resetFontName?: boolean): void; /** * * Sets the alignment of the bullet, number or picture at the specified level in the list. @@ -51172,6 +63975,17 @@ declare namespace Word { * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: any[]): void; + /** + * + * Sets the picture at the specified level in the list. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param level Required. The level in the list. + * @param base64EncodedImage Optional. The base64 encoded image to be set. If not given, the default picture is set. + */ + setLevelPicture(level: number, base64EncodedImage?: string): void; /** * * Sets the starting number at the specified level in the list. Default value is 1. @@ -51220,6 +64034,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class ListCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.List[]; /** @@ -51298,6 +64114,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class ListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets or sets the level of the item in the list. @@ -51398,6 +64216,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of content control objects in the paragraph. Read-only. @@ -51655,7 +64475,7 @@ declare namespace Word { detachFromList(): void; /** * - * Gets the HTML representation of the paragraph object. + * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method does not return the exact same HTML for the same document on different platforms (Windows, Mac, Word Online, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. * * [Api set: WordApi 1.1] */ @@ -51986,6 +64806,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Paragraph[]; /** @@ -52051,6 +64873,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Range extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of content control objects in the range. Read-only. @@ -52234,7 +65058,18 @@ declare namespace Word { expandToOrNullObject(range: Word.Range): Word.Range; /** * - * Gets the HTML representation of the range object. + * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param includeHidden Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. + * @param includeAdjacent Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. + */ + getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; + /** + * + * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method does not return the exact same HTML for the same document on different platforms (Windows, Mac, Word Online, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. * * [Api set: WordApi 1.1] */ @@ -52301,6 +65136,16 @@ declare namespace Word { * @param trimSpacing Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. */ getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * + * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param name Required. The bookmark name, which is case-insensitive. If the name starts with an underscore character, the bookmark is an hidden one. + */ + insertBookmark(name: string): void; /** * * Inserts a break at the specified location in the main document. The insertLocation value can be 'Before' or 'After'. @@ -52576,6 +65421,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class RangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Range[]; /** @@ -52627,6 +65474,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class SearchOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; matchWildCards: boolean; /** * @@ -52725,6 +65574,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class Section extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. @@ -52834,6 +65685,8 @@ declare namespace Word { * [Api set: WordApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Section[]; /** @@ -52878,6 +65731,176 @@ declare namespace Word { untrack(): Word.SectionCollection; toJSON(): Word.Interfaces.SectionCollectionData; } + /** + * + * Represents a setting of the add-in. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class Setting extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + private static DateJSONPrefix; + private static DateJSONSuffix; + private static replaceStringDateWithDate(value); + static _replaceDateWithStringDate(value: any): any; + /** + * + * Gets the key of the setting. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly key: string; + /** + * + * Gets or sets the value of the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + value: any; + /** Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * + * @remarks + * + * This method has the following additional signature: + * + * `set(properties: Word.Setting): void` + * + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Setting): void; + /** + * + * Deletes the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.Setting` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.Setting` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.Setting` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.SettingLoadOptions): Word.Setting; + load(option?: string | string[]): Word.Setting; + load(option?: { + select?: string; + expand?: string; + }): Word.Setting; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.Setting; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.Setting; + toJSON(): Word.Interfaces.SettingData; + } + /** + * + * Contains the collection of {@link Word.Setting} objects. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + class SettingCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Setting[]; + /** + * + * Creates a new setting or sets an existing setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key Required. The setting's key, which is case-sensitive. + * @param value Required. The setting's value. + */ + add(key: string, value: any): Word.Setting; + /** + * + * Deletes all settings in this add-in. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + deleteAll(): void; + /** + * + * Gets the count of settings. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a setting object by its key, which is case-sensitive. Throws if the setting does not exist. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key The key that identifies the setting object. + */ + getItem(key: string): Word.Setting; + /** + * + * Gets a setting object by its key, which is case-sensitive. Returns a null object if the setting does not exist. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param key Required. The key that identifies the setting object. + */ + getItemOrNullObject(key: string): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + * + * @remarks + * + * In addition to this signature, this method has the following signatures: + * + * `load(option?: string | string[]): Word.SettingCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * + * `load(option?: { select?: string; expand?: string; }): Word.SettingCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * + * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Word.SettingCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. + * + * @param options Provides options for which properties of the object to load. + */ + load(option?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; + load(option?: string | string[]): Word.SettingCollection; + load(option?: OfficeExtension.LoadOption): Word.SettingCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.SettingCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.SettingCollection; + toJSON(): Word.Interfaces.SettingCollectionData; + } /** * * Represents a table in a Word document. @@ -52885,6 +65908,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class Table extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. @@ -53347,6 +66372,19 @@ declare namespace Word { * @param values Optional 2D array. Cells are filled if the corresponding strings are specified in the array. */ insertTable(rowCount: number, columnCount: number, insertLocation: "Before" | "After" | "Start" | "End" | "Replace", values?: string[][]): Word.Table; + /** + * + * Merges the cells bounded inclusively by a first and last cell. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param topRow Required. The row of the first cell + * @param firstCell Required. The index of the first cell in its row + * @param bottomRow Required. The row of the last cell + * @param lastCell Required. The index of the last cell in its row + */ + mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; /** * * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. @@ -53441,6 +66479,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.Table[]; /** @@ -53492,6 +66532,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableRow extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets cells. Read-only. @@ -53647,6 +66689,14 @@ declare namespace Word { * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.TableRow; + /** + * + * Inserts a content control on the row. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + insertContentControl(): Word.ContentControl; /** * * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. @@ -53669,6 +66719,14 @@ declare namespace Word { * @param values Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. */ insertRows(insertLocation: "Before" | "After" | "Start" | "End" | "Replace", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * + * Merges the row into one cell. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + merge(): Word.TableCell; /** * * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. @@ -53763,6 +66821,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableRowCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.TableRow[]; /** @@ -53814,6 +66874,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableCell extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the body object of the cell. Read-only. @@ -54033,6 +67095,17 @@ declare namespace Word { * @param cellPadding Required. The cell padding. */ setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * + * Splits the cell into the specified number of rows and columns. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param rowCount Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + * @param columnCount Required. The number of columns to split into. + */ + split(rowCount: number, columnCount: number): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. * @@ -54071,6 +67144,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableCellCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Word.TableCell[]; /** @@ -54122,6 +67197,8 @@ declare namespace Word { * [Api set: WordApi 1.3] */ class TableBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets or sets the table border color. @@ -54188,6 +67265,63 @@ declare namespace Word { untrack(): Word.TableBorder; toJSON(): Word.Interfaces.TableBorderData; } + /** + * + * Provides information about the type of a raised event. For each object type, please keep the order of: deleted, selection changed, data changed, added. + * + * [Api set: WordApi] + */ + enum EventType { + /** + * + * ContentControlDeleted represent the event that the content control has been deleted. + * + */ + contentControlDeleted = "ContentControlDeleted", + /** + * + * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + * + */ + contentControlSelectionChanged = "ContentControlSelectionChanged", + /** + * + * ContentControlDataChanged represents the event that the data in the content control have been changed. + * + */ + contentControlDataChanged = "ContentControlDataChanged", + /** + * + * ContentControlAdded represents the event a content control has been added to the document. + * + */ + contentControlAdded = "ContentControlAdded", + } + /** + * + * Provides information about the content control that raised an event. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface ContentControlEventArgs { + /** + * + * The object that raised the event. Load this object to get its properties. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + contentControl: Word.ContentControl; + /** + * + * The event type. See Word.EventType for details. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded"; + } /** * * Specifies supported content control types and subtypes. @@ -55137,6 +68271,14 @@ declare namespace Word { interface CustomPropertyCollectionUpdateData { items?: Word.Interfaces.CustomPropertyData[]; } + /** An interface for updating data on the CustomXmlPartCollection object, for use in "customXmlPartCollection.set({ ... })". */ + interface CustomXmlPartCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the CustomXmlPartScopedCollection object, for use in "customXmlPartScopedCollection.set({ ... })". */ + interface CustomXmlPartScopedCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } /** An interface for updating data on the Document object, for use in "document.set({ ... })". */ interface DocumentUpdateData { /** @@ -55153,13 +68295,6 @@ declare namespace Word { * [Api set: WordApi 1.3] */ properties?: Word.Interfaces.DocumentPropertiesUpdateData; - /** - * - * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. - * - * [Api set: WordApi] - */ - allowCloseOnUntitled?: boolean; } /** An interface for updating data on the DocumentCreated object, for use in "documentCreated.set({ ... })". */ interface DocumentCreatedUpdateData { @@ -55600,6 +68735,21 @@ declare namespace Word { interface SectionCollectionUpdateData { items?: Word.Interfaces.SectionData[]; } + /** An interface for updating data on the Setting object, for use in "setting.set({ ... })". */ + interface SettingUpdateData { + /** + * + * Gets or sets the value of the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + value?: any; + } + /** An interface for updating data on the SettingCollection object, for use in "settingCollection.set({ ... })". */ + interface SettingCollectionUpdateData { + items?: Word.Interfaces.SettingData[]; + } /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ interface TableUpdateData { /** @@ -56173,6 +69323,33 @@ declare namespace Word { interface CustomPropertyCollectionData { items?: Word.Interfaces.CustomPropertyData[]; } + /** An interface describing the data returned by calling "customXmlPart.toJSON()". */ + interface CustomXmlPartData { + /** + * + * Gets the ID of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: string; + /** + * + * Gets the namespace URI of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling "customXmlPartCollection.toJSON()". */ + interface CustomXmlPartCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling "customXmlPartScopedCollection.toJSON()". */ + interface CustomXmlPartScopedCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } /** An interface describing the data returned by calling "document.toJSON()". */ interface DocumentData { /** @@ -56191,6 +69368,14 @@ declare namespace Word { contentControls?: Word.Interfaces.ContentControlData[]; /** * + * Gets the custom XML parts in the document. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * * Gets the properties of the document. Read-only. * * [Api set: WordApi 1.3] @@ -56204,12 +69389,13 @@ declare namespace Word { */ sections?: Word.Interfaces.SectionData[]; /** - * - * Gets or sets a value that indicates that, when opening a new document, whether it is allowed to close this document even if this document is untitled. True to close, false otherwise. - * - * [Api set: WordApi] - */ - allowCloseOnUntitled?: boolean; + * + * Gets the add-in's settings in the document. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + settings?: Word.Interfaces.SettingData[]; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. @@ -56236,6 +69422,13 @@ declare namespace Word { contentControls?: Word.Interfaces.ContentControlData[]; /** * + * Gets the custom XML parts in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * * Gets the properties of the document. Read-only. * * [Api set: WordApiHiddenDocument 1.3] @@ -56248,6 +69441,13 @@ declare namespace Word { * [Api set: WordApiHiddenDocument 1.3] */ sections?: Word.Interfaces.SectionData[]; + /** + * + * Gets the add-in's settings in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.4] + */ + settings?: Word.Interfaces.SettingData[]; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. @@ -56544,6 +69744,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: string; + /** + * + * Gets the format of the inline image. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; /** * * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. @@ -57038,6 +70246,29 @@ declare namespace Word { interface SectionCollectionData { items?: Word.Interfaces.SectionData[]; } + /** An interface describing the data returned by calling "setting.toJSON()". */ + interface SettingData { + /** + * + * Gets the key of the setting. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: string; + /** + * + * Gets or sets the value of the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + value?: any; + } + /** An interface describing the data returned by calling "settingCollection.toJSON()". */ + interface SettingCollectionData { + items?: Word.Interfaces.SettingData[]; + } /** An interface describing the data returned by calling "table.toJSON()". */ interface TableData { /** @@ -57898,6 +71129,84 @@ declare namespace Word { */ value?: boolean; } + /** + * + * Represents a custom XML part. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CustomXmlPartLoadOptions { + $all?: boolean; + /** + * + * Gets the ID of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * Gets the namespace URI of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + namespaceUri?: boolean; + } + /** + * + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CustomXmlPartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + namespaceUri?: boolean; + } + /** + * + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface CustomXmlPartScopedCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the ID of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + namespaceUri?: boolean; + } /** * * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. @@ -58264,6 +71573,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: boolean; + /** + * + * Gets the format of the inline image. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; /** * * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. @@ -58364,6 +71681,14 @@ declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the format of the inline image. Read-only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + imageFormat?: boolean; /** * * For EACH ITEM in the collection: Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. @@ -59169,6 +72494,58 @@ declare namespace Word { */ body?: Word.Interfaces.BodyLoadOptions; } + /** + * + * Represents a setting of the add-in. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SettingLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the setting. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * + * Gets or sets the value of the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + value?: boolean; + } + /** + * + * Contains the collection of {@link Word.Setting} objects. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + interface SettingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the setting. Read only. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the setting. + * + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + value?: boolean; + } /** * * Represents a table in a Word document. @@ -59909,22 +73286,30 @@ declare namespace Word { readonly application: Application; } /** - * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. + * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ - function run(batch: (context: Word.RequestContext) => Promise): Promise; + function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. */ function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously-created API objects. - * @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". + * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + * + * @remarks + * + * In addition to this signature, the method also has the following signatures, which allow you to resume using the request context of previously created objects: + * + * run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; + * + * run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; */ - function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; + function run(batch: (context: Word.RequestContext) => Promise): Promise; } @@ -59952,6 +73337,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of notebooks that are open in the OneNote application instance. In OneNote Online, only one notebook at a time is open in the application instance. Read-only. @@ -60080,6 +73467,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysis extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the parent page object. Read-only. @@ -60146,6 +73535,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Reference to the parent InkAnalysisPage. Read-only. @@ -60219,6 +73610,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisParagraphCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisParagraph[]; /** @@ -60281,6 +73674,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisLine extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Reference to the parent InkAnalysisParagraph. Read-only. @@ -60354,6 +73749,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisLineCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisLine[]; /** @@ -60416,6 +73813,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisWord extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Reference to the parent InkAnalysisLine. Read-only. @@ -60503,6 +73902,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkAnalysisWordCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkAnalysisWord[]; /** @@ -60565,6 +73966,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class FloatingInk extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the strokes of the FloatingInk object. Read-only. @@ -60624,6 +74027,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkStroke extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the ID of the InkStroke object. Read-only. @@ -60676,6 +74081,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkStrokeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkStroke[]; /** @@ -60738,6 +74145,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkWord extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The parent paragraph containing the ink word. Read-only. @@ -60804,6 +74213,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class InkWordCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.InkWord[]; /** @@ -60866,6 +74277,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Notebook extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The section groups in the notebook. Read only @@ -60978,6 +74391,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class NotebookCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Notebook[]; /** @@ -61049,6 +74464,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionGroup extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the notebook that contains the section group. Read-only. @@ -61168,6 +74585,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionGroupCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.SectionGroup[]; /** @@ -61239,6 +74658,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Section extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the notebook that contains the section. Read-only. @@ -61401,6 +74822,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class SectionCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Section[]; /** @@ -61472,6 +74895,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Page extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * The collection of PageContent objects on the page. Read only @@ -61557,7 +74982,7 @@ declare namespace OneNote { * * @param left The left position of the top, left corner of the Outline. * @param top The top position of the top, left corner of the Outline. - * @param html An HTML string that describes the visual presentation of the Outline. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + * @param html An HTML string that describes the visual presentation of the Outline. See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ addOutline(left: number, top: number, html: string): OneNote.Outline; /** @@ -61664,6 +75089,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Page[]; /** @@ -61735,6 +75162,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageContent extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Image in the PageContent object. Throws an exception if PageContentType is not Image. @@ -61850,6 +75279,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class PageContentCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.PageContent[]; /** @@ -61912,6 +75343,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Outline extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the PageContent object that contains the Outline. This object defines the position of the Outline on the page. Read-only. @@ -61939,7 +75372,7 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] * - * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + * @param html The HTML string to append. See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** @@ -62018,6 +75451,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Paragraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Image object in the Paragraph. Throws an exception if ParagraphType is not Image. Read-only. @@ -62157,7 +75592,7 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of new contents relative to the current Paragraph. - * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ insertHtmlAsSibling(insertLocation: OneNote.InsertLocation, html: string): void; /** @@ -62167,7 +75602,7 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] * * @param insertLocation The location of new contents relative to the current Paragraph. - * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + * @param html An HTML string that describes the visual presentation of the content. See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ insertHtmlAsSibling(insertLocation: "Before" | "After", html: string): void; /** @@ -62276,6 +75711,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class ParagraphCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.Paragraph[]; /** @@ -62338,6 +75775,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class NoteTag extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Id of the NoteTag object. Read-only. @@ -62397,6 +75836,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class RichText extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Paragraph object that contains the RichText object. Read-only. @@ -62471,6 +75912,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Image extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the PageContent object that contains the Image. Throws if the Image is not a direct child of a PageContent. This object defines the position of the Image on the page. Read-only. @@ -62587,6 +76030,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class Table extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Paragraph object that contains the Table object. Read-only. @@ -62744,6 +76189,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableRow extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the cells in the row. Read-only. @@ -62852,6 +76299,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableRowCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.TableRow[]; /** @@ -62914,6 +76363,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableCell extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the collection of Paragraph objects in the TableCell. Read-only. @@ -62976,7 +76427,7 @@ declare namespace OneNote { * * [Api set: OneNoteApi 1.1] * - * @param html The HTML string to append. See {@link https://docs.microsoft.com/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. + * @param html The HTML string to append. See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/onenote/onenote-add-ins-page-content#supported-html | Supported HTML} for the OneNote add-ins JavaScript API. */ appendHtml(html: string): void; /** @@ -63055,6 +76506,8 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ class TableCellCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: OneNote.TableCell[]; /** @@ -63568,13 +77021,6 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ page?: OneNote.Interfaces.PageData; - /** - * - * Gets the ink analysis paragraphs in this page. Read-only. - * - * [Api set: OneNoteApi 1.1] - */ - paragraphs?: OneNote.Interfaces.InkAnalysisParagraphData[]; /** * * Gets the ID of the InkAnalysis object. Read-only. @@ -64455,7 +77901,6 @@ declare namespace OneNote { interface TableCellCollectionData { items?: OneNote.Interfaces.TableCellData[]; } - /** * * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. @@ -64487,13 +77932,6 @@ declare namespace OneNote { * [Api set: OneNoteApi 1.1] */ page?: OneNote.Interfaces.PageLoadOptions; - /** - * - * Gets the ink analysis paragraphs in this page. - * - * [Api set: OneNoteApi 1.1] - */ - paragraphs?: OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions; /** * * Gets the ID of the InkAnalysis object. Read-only. @@ -66139,25 +79577,18 @@ declare namespace OneNote { * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the OneNote application. Since the Office add-in and the OneNote application run in two different processes, the request context is required to get access to the OneNote object model from the add-in. */ function run(batch: (context: OneNote.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object. + * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + */ + function run(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects. * @param object - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()". * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. */ function run(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object. - * @param object - A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". - * @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * - * @remarks - * In addition to this signature, the method also has the following signatures: - * - * `run(batch: (context: OneNote.RequestContext) => Promise): Promise;` - * - * `run(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise): Promise;` - */ - function run(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise): Promise; } @@ -66385,9 +79816,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Application` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Application` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Application` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Application` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Application` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66473,9 +79904,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Document` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Document` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Document` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Document` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Document` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66492,8 +79923,6 @@ declare namespace Visio { * Occurs when the data is refreshed in the diagram. * * [Api set: 1.1] - * - * @eventproperty */ readonly onDataRefreshComplete: OfficeExtension.EventHandlers; /** @@ -66501,8 +79930,6 @@ declare namespace Visio { * Occurs when the Document is loaded, refreshed, or changed. * * [Api set: 1.1] - * - * @eventproperty */ readonly onDocumentLoadComplete: OfficeExtension.EventHandlers; /** @@ -66510,8 +79937,6 @@ declare namespace Visio { * Occurs when the page is finished loading. * * [Api set: 1.1] - * - * @eventproperty */ readonly onPageLoadComplete: OfficeExtension.EventHandlers; /** @@ -66519,8 +79944,6 @@ declare namespace Visio { * Occurs when the current selection of shapes changes. * * [Api set: 1.1] - * - * @eventproperty */ readonly onSelectionChanged: OfficeExtension.EventHandlers; /** @@ -66528,8 +79951,6 @@ declare namespace Visio { * Occurs when the user moves the mouse pointer into the bounding box of a shape. * * [Api set: 1.1] - * - * @eventproperty */ readonly onShapeMouseEnter: OfficeExtension.EventHandlers; /** @@ -66537,8 +79958,6 @@ declare namespace Visio { * Occurs when the user moves the mouse out of the bounding box of a shape. * * [Api set: 1.1] - * - * @eventproperty */ readonly onShapeMouseLeave: OfficeExtension.EventHandlers; toJSON(): Visio.Interfaces.DocumentData; @@ -66599,9 +80018,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.DocumentView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.DocumentView` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.DocumentView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.DocumentView` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.DocumentView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66713,9 +80132,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Page` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Page` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Page` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Page` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Page` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66812,9 +80231,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.PageView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.PageView` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.PageView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.PageView` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.PageView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66860,9 +80279,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.PageCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.PageCollection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.PageCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.PageCollection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.PageCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -66905,9 +80324,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.ShapeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.ShapeCollection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.ShapeCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeCollection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67016,9 +80435,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Shape` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Shape` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Shape` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Shape` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Shape` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67104,9 +80523,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.ShapeView` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.ShapeView` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.ShapeView` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeView` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeView` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67232,9 +80651,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.ShapeDataItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.ShapeDataItemCollection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItemCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItemCollection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeDataItemCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67287,9 +80706,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.ShapeDataItem` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.ShapeDataItem` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItem` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.ShapeDataItem` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.ShapeDataItem` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67335,9 +80754,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.HyperlinkCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.HyperlinkCollection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.HyperlinkCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.HyperlinkCollection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.HyperlinkCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67390,9 +80809,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Hyperlink` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Hyperlink` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Hyperlink` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Hyperlink` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Hyperlink` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67438,9 +80857,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.CommentCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.CommentCollection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.CommentCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.CommentCollection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.CommentCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67500,9 +80919,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Comment` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Comment` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Comment` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Comment` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Comment` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -67537,9 +80956,9 @@ declare namespace Visio { * * In addition to this signature, this method has the following signatures: * - * `load(option?: string | string[]): Visio.Selection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. + * `load(option?: string | string[]): Visio.Selection` - Where option is a comma-delimited string or an array of strings that specify the properties/relationships to load. * - * `load(option?: { select?: string; expand?: string; }): Visio.Selection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. + * `load(option?: { select?: string; expand?: string; }): Visio.Selection` - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load. * * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Selection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. * @@ -68692,9 +82111,9 @@ declare namespace Visio { readonly document: Document; } /** - * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. - */ + * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. + */ function run(batch: (context: Visio.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Visio object model, using the request context of a previously-created API object. @@ -68712,14 +82131,13 @@ declare namespace Visio { * Executes a batch script that performs actions on the Visio object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param contextObject - A previously-created Visio.RequestContext. This context will get re-used by the batch function (instead of having a new context created). This means that the batch will be able to pick up changes made to existing API objects, if those objects were derived from this same context. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the RequestContext is required to get access to the Visio object model from the add-in. - * * @remarks * In addition to this signature, the method also has the following signatures: - * + * * `run(batch: (context: Visio.RequestContext) => Promise): Promise;` - * + * * `run(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise): Promise;` - * + * * `run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise;` */ function run(contextObject: OfficeExtension.ClientRequestContext, batch: (context: Visio.RequestContext) => Promise): Promise; From d36ed225cdc4ada366d7b9c29259b6452eba959b Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Mon, 26 Nov 2018 16:12:06 -0800 Subject: [PATCH 0083/2268] Editing codeowners --- .github/CODEOWNERS | 1 + types/office-js-preview/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index df45a8a9e7..00e7af6049 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3250,6 +3250,7 @@ /types/odata/ @janhommes @jcchalte /types/ofe/ @Morfent /types/office-js/ @OfficeDev @LanceEA @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT +/types/office-js-preview @OfficeDev @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT /types/office-runtime/ @Zlatkovsky @mscharlock /types/offline-js/ @cgwrench /types/oibackoff/ @geoffreak diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 88ca7361b0..cfedb93e0c 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Office.js // Project: https://github.com/OfficeDev/office-js -// Definitions by: OfficeDev , Lance Austin , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham , Alex Jerabek , Elizabeth Samuel +// Definitions by: OfficeDev , Michael Zlatkovsky , Kim Brandl , Ricky Kirkham , Alex Jerabek , Elizabeth Samuel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 From 0171f9b65b4cd2d68033ad58b0bcfcce5c4b609b Mon Sep 17 00:00:00 2001 From: Colin Doig Date: Tue, 27 Nov 2018 13:31:23 +1300 Subject: [PATCH 0084/2268] update for fetch-mock version 7.2 See https://github.com/wheresrhys/fetch-mock/blob/master/docs/v6-v7-upgrade-guide.md * add resetBehavior() * MockResponseObject.throws is now an Error * sendAsJson() and includeContentLength() moved to MockOptions * add FetchMockStatic.MATCHED and FetchMockStatic.UNMATCHED * inspection filtering (called(), calls(), lastCall(), lastUrl(), lastOptions(), done()). --- types/fetch-mock/fetch-mock-tests.ts | 67 +++- types/fetch-mock/index.d.ts | 186 +++++++--- types/fetch-mock/v6/fetch-mock-tests.ts | 101 +++++ types/fetch-mock/v6/index.d.ts | 473 ++++++++++++++++++++++++ 4 files changed, 757 insertions(+), 70 deletions(-) create mode 100644 types/fetch-mock/v6/fetch-mock-tests.ts create mode 100644 types/fetch-mock/v6/index.d.ts diff --git a/types/fetch-mock/fetch-mock-tests.ts b/types/fetch-mock/fetch-mock-tests.ts index 1d5c5a51b3..2ddac5945d 100644 --- a/types/fetch-mock/fetch-mock-tests.ts +++ b/types/fetch-mock/fetch-mock-tests.ts @@ -30,22 +30,61 @@ fetchMock.mock(/test/, { } }); -fetchMock.restore().reset(); +fetchMock.restore().reset().resetHistory().resetBehavior(); -(fetchMock.calls().matched[0][1] as RequestInit).body; -fetchMock.calls().unmatched[0][0].toUpperCase(); -fetchMock.calls("http://test.com")[0][0].toUpperCase(); -(fetchMock.calls("http://test.com")[0][1] as RequestInit).body; +let calls: fetchMock.MockCall[] = fetchMock.calls(/https?:\/\/test.com/, { + method: 'GET', +}); +calls[0][0].toUpperCase(); +(calls[0][1] as RequestInit).body; +calls[0].identifier.toUpperCase(); +calls[0].isUnmatched; +(calls[0].request as Request).body; +calls = fetchMock.calls(); +calls = fetchMock.calls(true); +calls = fetchMock.calls("http://test.com", "GET"); -const doneStatus: boolean = fetchMock.done(); -const doneStatusArguments: boolean = fetchMock.done("http://test.com"); +let doneStatus: boolean = fetchMock.done(); +doneStatus = fetchMock.done(true); +doneStatus = fetchMock.done("http://test.com"); +doneStatus = fetchMock.done(/https?:\/\/test.com/); -const calledStatus: boolean = fetchMock.called(); -const calledStatusArguments = fetchMock.called("http://test.com"); +let calledStatus: boolean = fetchMock.called(); +calledStatus = fetchMock.called(true); +calledStatus = fetchMock.called("http://test.com"); +calledStatus = fetchMock.called(/https?:\/\/test.com/); +calledStatus = fetchMock.called("http://test.com", "GET"); +calledStatus = fetchMock.called("http://test.com", { + method: "GET", +}); +calledStatus = fetchMock.called((url: string, opts: fetchMock.MockRequest): boolean => { + return true; +}); +calledStatus = fetchMock.called(fetchMock.MATCHED); +calledStatus = fetchMock.called(fetchMock.UNMATCHED); -(fetchMock.lastCall()[1] as RequestInit).body; -const lastUrl: string = fetchMock.lastUrl(); -fetchMock.lastOptions(); +let lastCall: fetchMock.MockCall = fetchMock.lastCall(); +lastCall = fetchMock.lastCall(/https?:\/\/test.com/, { + method: "GET", +}); +lastCall = fetchMock.lastCall("https://test.com", "GET"); + +let lastUrl: string = fetchMock.lastUrl(); +lastUrl = fetchMock.lastUrl(true); +lastUrl = fetchMock.lastUrl("http://test.com"); +lastUrl = fetchMock.lastUrl(/https?:\/\/test.com/); +lastUrl = fetchMock.lastUrl("http://test.com", "GET"); +lastUrl = fetchMock.lastUrl("http://test.com", { + method: "GET", +}); +let lastOptions: fetchMock.MockOptions = fetchMock.lastOptions(); +lastOptions = fetchMock.lastOptions(true); +lastOptions = fetchMock.lastOptions("http://test.com"); +lastOptions = fetchMock.lastOptions(/https?:\/\/test.com/); +lastOptions = fetchMock.lastOptions("http://test.com", "GET"); +lastOptions = fetchMock.lastOptions("http://test.com", { + method: "GET", +}); fetchMock.get("http://test.com", 200); fetchMock.getOnce("http://test.com", 200); @@ -99,3 +138,7 @@ sandbox.get("http://test.com", { body: 'abc', redirectUrl: "http://example.org" }); + +const response: fetchMock.MockResponseObject = { + throws: new Error('error'), +}; diff --git a/types/fetch-mock/index.d.ts b/types/fetch-mock/index.d.ts index fdae338fce..fe08fbf26c 100644 --- a/types/fetch-mock/index.d.ts +++ b/types/fetch-mock/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for fetch-mock 6.0 +// Type definitions for fetch-mock 7.2 // Project: https://github.com/wheresrhys/fetch-mock // Definitions by: Alexey Svetliakov // Tamir Duberstein @@ -7,6 +7,7 @@ // Matt Tennison // Quentin Bouygues // Fumiaki Matsushima +// Colin Doig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -33,6 +34,35 @@ declare namespace fetchMock { */ type MockMatcher = string | RegExp | MockMatcherFunction; + /** + * Inspection filter. Can be one of the following: + * boolean: + * * true retrieves all calls matched by fetch. + * fetchMock.MATCHED is an alias for true and may be used to make tests + * more readable. + * * false retrieves all calls not matched by fetch (i.e. those handled + * by catch() or spy(). fetchMock.UNMATCHED is an alias for false and + * may be used to make tests more readable. + * MockMatcher (routeIdentifier): + * All routes have an identifier: + * * If it’s a named route, the identifier is the route’s name + * * If the route is unnamed, the identifier is the matcher passed in to + * .mock() + * All calls that were handled by the route with the given identifier + * will be retrieved + * MockMatcher (matcher): + * Any matcher compatible with the mocking api can be passed in to filter + * the calls arbitrarily. + */ + type InspectionFilter = MockMatcher | boolean; + + /** + * Either an object compatible with the mocking api or a string specifying + * a http method to filter by. This will be used to filter the list of + * calls further. + */ + type InspectionOptions = MockOptions | string; + /** * Mock response object */ @@ -57,21 +87,7 @@ declare namespace fetchMock { * If this property is present then a Promise rejected with the value * of throws is returned */ - throws?: boolean; - - /** - * This property determines whether or not the request body should be - * JSON.stringified before being sent - * @default true - */ - sendAsJson?: boolean; - - /** - * Setting this property to true will automatically add the - * content-length header - * @default true - */ - includeContentLength?: boolean; + throws?: Error; /** * The URL the response should be from (to imitate followed redirects @@ -156,13 +172,29 @@ declare namespace fetchMock { * if nothing matches it). */ repeat?: number; + + /** + * Convert objects into JSON before delivering as stub reponses. Can + * be useful to set to false globally if e.g. dealing with a lot of + * array buffers. If true, will also add content-type: application/json + * header. + * @default true + */ + sendAsJson?: boolean; + + /** + * Automatically sets a content-length header on each response. + * @default true + */ + includeContentLength?: boolean; } - type MockCall = [string, MockRequest]; - - interface MatchedRoutes { - matched: MockCall[]; - unmatched: MockCall[]; + interface MockCall extends Array { + 0: string, + 1: RequestInit | undefined, + identifier: string, + isUnmatched: boolean | undefined, + request: Request | undefined, } interface MockOptionsMethodGet extends MockOptions { @@ -186,6 +218,9 @@ declare namespace fetchMock { } interface FetchMockStatic { + MATCHED: boolean; + UNMATCHED: boolean; + /** * Replaces fetch() with a stub which records its calls, grouped by * route, and optionally returns a mocked Response object or passes the @@ -381,16 +416,28 @@ declare namespace fetchMock { spy(response?: MockResponse | MockResponseFunction): this; /** - * Chainable method that restores fetch() to its unstubbed state and - * clears all data recorded for its calls. + * Restores fetch() to its unstubbed state and clears all data recorded + * for its calls. reset() is an alias for restore(). */ restore(): this; /** - * Chainable method that clears all data recorded for fetch()'s calls + * Restores fetch() to its unstubbed state and clears all data recorded + * for its calls. reset() is an alias for restore(). */ reset(): this; + /** + * Clears all data recorded for fetch()’s calls. It will not restore + * fetch to its default implementation. + */ + resetHistory(): this; + + /** + * Removes mocking behaviour without resetting call history. + */ + resetBehavior(): this; + /** * Returns a promise that resolves once all fetches handled by fetch-mock * have resolved. @@ -398,57 +445,80 @@ declare namespace fetchMock { flush(): Promise; /** - * Returns all calls to fetch, grouped by whether fetch-mock matched - * them or not. + * Returns an array of all calls to fetch matching the given filters. + * Each call is returned as a [url, options] array. If fetch was called + * using a Request instance, this will be available as a request + * property on this array. + * @param [filter] Allows filtering of calls to fetch based on various + * criteria + * @param [options] Either an object compatible with the mocking api or + * a string specifying a http method to filter by. This will be used to + * filter the list of calls further. */ - calls(): MatchedRoutes; + calls(filter?: InspectionFilter, options?: InspectionOptions): MockCall[]; /** - * Returns all calls to fetch matching matcherName. + * Returns a Boolean indicating whether any calls to fetch matched the + * given filter. + * @param [filter] Allows filtering of calls to fetch based on various + * criteria + * @param [options] Either an object compatible with the mocking api or + * a string specifying a http method to filter by. This will be used to + * filter the list of calls further. */ - calls(matcherName?: string): MockCall[]; - - /** - * Returns a Boolean indicating whether fetch was called and a route - * was matched (or a specific route if matcherName is passed). - * @param [matcherName] either the name of a route or equal to - * matcher.toString() for any unnamed route - */ - called(matcherName?: string): boolean; + called(filter?: InspectionFilter, options?: InspectionOptions): boolean; /** * Returns a Boolean indicating whether fetch was called the expected - * number of times (or at least once if the route defines no expectation - * is set) for every route (or for a specific route if matcherName is - * passed). - * @param [matcherName] either the name of a route or equal to - * matcher.toString() for any unnamed route + * number of times (or has been called at least once if repeat is + * undefined for the route). + * @param [filter] Rule for matching calls to fetch. */ - done(matcherName?: string): boolean; + done(filter?: InspectionFilter): boolean; /** - * Returns the arguments for the last matched call to fetch (or the - * last call to specific route is matcherName is passed). - * @param [matcherName] either the name of a route or equal to - * matcher.toString() for any unnamed route + * Returns the arguments for the last call to fetch matching the given + * filter. + * @param [filter] Allows filtering of calls to fetch based on various + * criteria + * @param [options] Either an object compatible with the mocking api or + * a string specifying a http method to filter by. This will be used to + * filter the list of calls further. */ - lastCall(matcherName?: string): MockCall; + lastCall( + filter?: InspectionFilter, + options?: InspectionOptions, + ): MockCall | undefined; /** - * Returns the url for the last matched call to fetch (or the last - * call to specific route is matcherName is passed). - * @param [matcherName] either the name of a route or equal to - * matcher.toString() for any unnamed route + * Returns the url for the last call to fetch matching the given + * filter. If fetch was last called using a Request instance, the url + * will be extracted from this. + * @param [filter] Allows filtering of calls to fetch based on various + * criteria + * @param [options] Either an object compatible with the mocking api or + * a string specifying a http method to filter by. This will be used to + * filter the list of calls further. */ - lastUrl(matcherName?: string): string; + lastUrl( + filter?: InspectionFilter, + options?: InspectionOptions, + ): string | undefined; /** - * Returns the options for the last matched call to fetch (or the - * last call to a specific route is matcherName is passed). - * @param [matcherName] either the name of a route or equal to - * matcher.toString() for any unnamed route + * Returns the options for the call to fetch matching the given filter. + * If fetch was last called using a Request instance, a set of options + * inferred from the Request will be returned. + * @param [filter] Allows filtering of calls to fetch based on various + * criteria + * @param [options] Either an object compatible with the mocking api or + * a string specifying a http method to filter by. This will be used to + * filter the list of calls further. */ - lastOptions(matcherName?: string): MockRequest; + lastOptions( + filter?: InspectionFilter, + options?: InspectionOptions, + ): MockOptions | undefined; /** * Set some global config options, which include diff --git a/types/fetch-mock/v6/fetch-mock-tests.ts b/types/fetch-mock/v6/fetch-mock-tests.ts new file mode 100644 index 0000000000..1d5c5a51b3 --- /dev/null +++ b/types/fetch-mock/v6/fetch-mock-tests.ts @@ -0,0 +1,101 @@ +import * as fetchMock from "fetch-mock"; + +fetchMock.mock("http://test.com", 200); +fetchMock.mock("http://test.com", 200, { + headers: { + test: "header" + } +}); +fetchMock.mock("http//test.com", 200, { + query: { + searchValue: "apples" + } +}); +fetchMock.mock("http://test.com", 200, { + repeat: 2 +}); +fetchMock.mock(/test\.com/, 200); +fetchMock.mock(() => true, 200); +fetchMock.mock((url, opts) => true, 200); +fetchMock.once("http://test.com", 200); + +fetchMock.mock(/test/, "test").mock(/test/, { a: "b" }); +fetchMock.mock(/test/, { + status: 200, + headers: { + test: "test" + }, + body: { + a: "b" + } +}); + +fetchMock.restore().reset(); + +(fetchMock.calls().matched[0][1] as RequestInit).body; +fetchMock.calls().unmatched[0][0].toUpperCase(); +fetchMock.calls("http://test.com")[0][0].toUpperCase(); +(fetchMock.calls("http://test.com")[0][1] as RequestInit).body; + +const doneStatus: boolean = fetchMock.done(); +const doneStatusArguments: boolean = fetchMock.done("http://test.com"); + +const calledStatus: boolean = fetchMock.called(); +const calledStatusArguments = fetchMock.called("http://test.com"); + +(fetchMock.lastCall()[1] as RequestInit).body; +const lastUrl: string = fetchMock.lastUrl(); +fetchMock.lastOptions(); + +fetchMock.get("http://test.com", 200); +fetchMock.getOnce("http://test.com", 200); +fetchMock.post("http://test.com", 200); +fetchMock.postOnce("http://test.com", 200); +fetchMock.put("http://test.com", 200); +fetchMock.putOnce("http://test.com", 200); +fetchMock.delete("http://test.com", 200); +fetchMock.deleteOnce("http://test.com", 200); +fetchMock.head("http://test.com", 200); +fetchMock.headOnce("http://test.com", 200); +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.get("http://test.com", 200, {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"}); +fetchMock.head("http://test.com", 200, {method: "HEAD"}); + +fetchMock + .mock("http://test.com", 200) + .catch(503); + +fetchMock + .mock("http://test.com", 200) + .spy(); + +const myMatcher: fetchMock.MockMatcherFunction = ( + url: string, + opts: fetchMock.MockRequest +) => true; + +fetchMock.flush().then(resolved => resolved.forEach(console.log)); +fetchMock.flush().catch(r => r); + +fetchMock.get("http://test.com", { + body: 'abc', + includeContentLength: false +}); + +fetchMock.get("http://test.com", { + body: 'abc', + redirectUrl: "http://example.org" +}); + +const sandbox = fetchMock.sandbox(); +sandbox.get("http://test.com", { + body: 'abc', + redirectUrl: "http://example.org" +}); diff --git a/types/fetch-mock/v6/index.d.ts b/types/fetch-mock/v6/index.d.ts new file mode 100644 index 0000000000..fdae338fce --- /dev/null +++ b/types/fetch-mock/v6/index.d.ts @@ -0,0 +1,473 @@ +// Type definitions for fetch-mock 6.0 +// Project: https://github.com/wheresrhys/fetch-mock +// Definitions by: Alexey Svetliakov +// Tamir Duberstein +// Risto Keravuori +// Chris Sinclair +// Matt Tennison +// Quentin Bouygues +// Fumiaki Matsushima +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace fetchMock { + type MockRequest = Request | RequestInit; + + /** + * Mock matcher function + */ + type MockMatcherFunction = (url: string, opts: MockRequest) => boolean; + + /** + * Mock matcher. Can be one of following: + * string: Either + * * an exact url to match e.g. 'http://www.site.com/page.html' + * * if the string begins with a `^`, the string following the `^` must + * begin the url e.g. '^http://www.site.com' would match + * 'http://www.site.com' or 'http://www.site.com/page.html' + * * '*' to match any url + * RegExp: A regular expression to test the url against + * Function(url, opts): A function (returning a Boolean) that is passed the + * url and opts fetch() is called with (or, if fetch() was called with one, + * the Request instance) + */ + type MockMatcher = string | RegExp | MockMatcherFunction; + + /** + * Mock response object + */ + interface MockResponseObject { + /** + * Set the response body + */ + body?: string | {}; + + /** + * Set the response status + * @default 200 + */ + status?: number; + + /** + * Set the response headers. + */ + headers?: { [key: string]: string }; + + /** + * If this property is present then a Promise rejected with the value + * of throws is returned + */ + throws?: boolean; + + /** + * This property determines whether or not the request body should be + * JSON.stringified before being sent + * @default true + */ + sendAsJson?: boolean; + + /** + * Setting this property to true will automatically add the + * content-length header + * @default true + */ + includeContentLength?: boolean; + + /** + * The URL the response should be from (to imitate followed redirects + * - will set redirected: true on the response) + */ + redirectUrl?: string; + } + + /** + * Response: A Response instance - will be used unaltered + * number: Creates a response with this status + * string: Creates a 200 response with the string as the response body + * object: As long as the object is not a MockResponseObject it is + * converted into a json string and returned as the body of a 200 response + * If MockResponseObject was given then it's used to configure response + * Function(url, opts): A function that is passed the url and opts fetch() + * is called with and that returns any of the responses listed above + */ + type MockResponse = Response | Promise + | number | Promise + | string | Promise + | {} | Promise<{}> + | MockResponseObject | Promise; + + /** + * Mock response function + */ + type MockResponseFunction = (url: string, opts: MockRequest) => MockResponse; + + /** + * Mock options object + */ + interface MockOptions { + /** + * A unique string naming the route. Used to subsequently retrieve + * references to the calls, grouped by name. + * @default matcher.toString() + * + * Note: If a non-unique name is provided no error will be thrown + * (because names are optional, auto-generated ones may legitimately + * clash) + */ + name?: string; + + /** + * http method to match + */ + method?: string; + + /** + * key/value map of headers to match + */ + headers?: { [key: string]: string }; + + /** + * key/value map of query strings to match, in any order + */ + query?: { [key: string]: string }; + + /** + * 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 + */ + response?: MockResponse | MockResponseFunction; + + /** + * integer, n, limiting the number of times the matcher can be used. + * If the route has already been called n times the route will be + * ignored and the call to fetch() will fall through to be handled by + * any other routes defined (which may eventually result in an error + * if nothing matches it). + */ + repeat?: number; + } + + type MockCall = [string, MockRequest]; + + interface MatchedRoutes { + matched: MockCall[]; + unmatched: MockCall[]; + } + + interface MockOptionsMethodGet extends MockOptions { + method?: 'GET'; + } + + interface MockOptionsMethodPost extends MockOptions { + method?: 'POST'; + } + + interface MockOptionsMethodPut extends MockOptions { + method?: 'PUT'; + } + + interface MockOptionsMethodDelete extends MockOptions { + method?: 'DELETE'; + } + + interface MockOptionsMethodHead extends MockOptions { + method?: 'HEAD'; + } + + interface FetchMockStatic { + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Calls to .mock() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + mock(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptions): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Calls to .mock() can be chained. + * @param options The route to mock + */ + mock(options: MockOptions): this; + + /** + * Returns a drop-in mock for fetch which can be passed to other mocking + * libraries. It implements the full fetch-mock api and maintains its + * own state independent of other instances, so tests can be run in + * parallel. + */ + sandbox(): FetchMockSandbox; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() limited to being + * called one time only. Calls to .once() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Optional additional properties defining the route to mock + */ + once(matcher: MockMatcher, response: MockResponse | MockResponseFunction, options?: MockOptions): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the GET + * method. Calls to .get() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + get(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the GET + * method and limited to being called one time only. Calls to .getOnce() + * can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + getOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodGet): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the POST + * method. Calls to .post() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + post(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the POST + * method and limited to being called one time only. Calls to .postOnce() + * can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + postOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPost): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the PUT + * method. Calls to .put() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + put(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the PUT + * method and limited to being called one time only. Calls to .putOnce() + * can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + putOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodPut): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the + * DELETE method. Calls to .delete() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + delete(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the + * DELETE method and limited to being called one time only. Calls to + * .deleteOnce() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + deleteOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodDelete): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the HEAD + * method. Calls to .head() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + head(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the HEAD + * method and limited to being called one time only. Calls to .headOnce() + * can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + headOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the PATCH + * method. Calls to .patch() can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + patch(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Replaces fetch() with a stub which records its calls, grouped by + * route, and optionally returns a mocked Response object or passes the + * call through to fetch(). Shorthand for mock() restricted to the PATCH + * method and limited to being called one time only. Calls to .patchOnce() + * can be chained. + * @param matcher Condition for selecting which requests to mock + * @param response Configures the http response returned by the mock + * @param [options] Additional properties defining the route to mock + */ + patchOnce(matcher: MockMatcher, reponse: MockResponse | MockResponseFunction, options?: MockOptionsMethodHead): this; + + /** + * Chainable method that defines how to respond to calls to fetch that + * don't match any of the defined mocks. It accepts the same types of + * response as a normal call to .mock(matcher, response). It can also + * take an arbitrary function to completely customise behaviour of + * unmatched calls. If .catch() is called without any parameters then + * every unmatched call will receive a 200 response. + * @param [response] Configures the http response returned by the mock + */ + catch(response?: MockResponse | MockResponseFunction): this; + + /** + * Chainable method that records the call history of unmatched calls, + * but instead of responding with a stubbed response, the request is + * passed through to native fetch() and is allowed to communicate + * over the network. Similar to catch(). + */ + spy(response?: MockResponse | MockResponseFunction): this; + + /** + * Chainable method that restores fetch() to its unstubbed state and + * clears all data recorded for its calls. + */ + restore(): this; + + /** + * Chainable method that clears all data recorded for fetch()'s calls + */ + reset(): this; + + /** + * Returns a promise that resolves once all fetches handled by fetch-mock + * have resolved. + */ + flush(): Promise; + + /** + * Returns all calls to fetch, grouped by whether fetch-mock matched + * them or not. + */ + calls(): MatchedRoutes; + + /** + * Returns all calls to fetch matching matcherName. + */ + calls(matcherName?: string): MockCall[]; + + /** + * Returns a Boolean indicating whether fetch was called and a route + * was matched (or a specific route if matcherName is passed). + * @param [matcherName] either the name of a route or equal to + * matcher.toString() for any unnamed route + */ + called(matcherName?: string): boolean; + + /** + * Returns a Boolean indicating whether fetch was called the expected + * number of times (or at least once if the route defines no expectation + * is set) for every route (or for a specific route if matcherName is + * passed). + * @param [matcherName] either the name of a route or equal to + * matcher.toString() for any unnamed route + */ + done(matcherName?: string): boolean; + + /** + * Returns the arguments for the last matched call to fetch (or the + * last call to specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + * matcher.toString() for any unnamed route + */ + lastCall(matcherName?: string): MockCall; + + /** + * Returns the url for the last matched call to fetch (or the last + * call to specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + * matcher.toString() for any unnamed route + */ + lastUrl(matcherName?: string): string; + + /** + * Returns the options for the last matched call to fetch (or the + * last call to a specific route is matcherName is passed). + * @param [matcherName] either the name of a route or equal to + * matcher.toString() for any unnamed route + */ + lastOptions(matcherName?: string): MockRequest; + + /** + * Set some global config options, which include + * sendAsJson [default `true`] - by default fetchMock will + * convert objects to JSON before sending. This is overrideable + * for each call but for some scenarios, e.g. when dealing with a + * lot of array buffers, it can be useful to default to `false` + */ + configure(opts: {}): void; + } + + interface FetchMockSandbox extends FetchMockStatic { + /** + * Also callable as fetch(). Use `typeof fetch` in your code to define + * a field that accepts both `fetch()` and a fetch-mock sandbox. + */ + (input?: string | Request , init?: RequestInit): Promise; + } +} + +declare var fetchMock: fetchMock.FetchMockStatic; +export = fetchMock; From 569b3936105ba328b3a93c2056087b4bd4d34f86 Mon Sep 17 00:00:00 2001 From: Colin Doig Date: Tue, 27 Nov 2018 13:52:45 +1300 Subject: [PATCH 0085/2268] upgrade typings for fetch-mock to version 7.2 --- types/fetch-mock/fetch-mock-tests.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/fetch-mock/fetch-mock-tests.ts b/types/fetch-mock/fetch-mock-tests.ts index 2ddac5945d..594d78c127 100644 --- a/types/fetch-mock/fetch-mock-tests.ts +++ b/types/fetch-mock/fetch-mock-tests.ts @@ -36,10 +36,8 @@ let calls: fetchMock.MockCall[] = fetchMock.calls(/https?:\/\/test.com/, { method: 'GET', }); calls[0][0].toUpperCase(); -(calls[0][1] as RequestInit).body; calls[0].identifier.toUpperCase(); calls[0].isUnmatched; -(calls[0].request as Request).body; calls = fetchMock.calls(); calls = fetchMock.calls(true); calls = fetchMock.calls("http://test.com", "GET"); From a3728afe567983094a4f4cbaccacd3e417a69623 Mon Sep 17 00:00:00 2001 From: Colin Doig Date: Tue, 27 Nov 2018 14:01:11 +1300 Subject: [PATCH 0086/2268] linting --- types/fetch-mock/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/fetch-mock/index.d.ts b/types/fetch-mock/index.d.ts index fe08fbf26c..744c4829c3 100644 --- a/types/fetch-mock/index.d.ts +++ b/types/fetch-mock/index.d.ts @@ -190,11 +190,11 @@ declare namespace fetchMock { } interface MockCall extends Array { - 0: string, - 1: RequestInit | undefined, - identifier: string, - isUnmatched: boolean | undefined, - request: Request | undefined, + 0: string; + 1: RequestInit | undefined; + identifier: string; + isUnmatched: boolean | undefined; + request: Request | undefined; } interface MockOptionsMethodGet extends MockOptions { From 861864b5c74f751640e4767f628d9935a009211d Mon Sep 17 00:00:00 2001 From: Colin Doig Date: Tue, 27 Nov 2018 14:17:17 +1300 Subject: [PATCH 0087/2268] copy tsconfig.json and tslint.json to version 6 --- types/fetch-mock/v6/tsconfig.json | 27 +++++++++++++++++++++++++++ types/fetch-mock/v6/tslint.json | 1 + 2 files changed, 28 insertions(+) create mode 100644 types/fetch-mock/v6/tsconfig.json create mode 100644 types/fetch-mock/v6/tslint.json diff --git a/types/fetch-mock/v6/tsconfig.json b/types/fetch-mock/v6/tsconfig.json new file mode 100644 index 0000000000..ea63a3d716 --- /dev/null +++ b/types/fetch-mock/v6/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "fetch-mock": [ "fetch-mock/v6" ] + } + }, + "files": [ + "index.d.ts", + "fetch-mock-tests.ts" + ] +} diff --git a/types/fetch-mock/v6/tslint.json b/types/fetch-mock/v6/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fetch-mock/v6/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 84bc355df06ea07679ab0634483c08f76ac4bb7c Mon Sep 17 00:00:00 2001 From: Boris Sergeyev Date: Tue, 27 Nov 2018 07:18:16 +0100 Subject: [PATCH 0088/2268] [react-redux] improved naming of higher-order-type that handles thunks --- types/react-redux/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/react-redux/index.d.ts b/types/react-redux/index.d.ts index dc8a9af912..bcbcced0bd 100644 --- a/types/react-redux/index.d.ts +++ b/types/react-redux/index.d.ts @@ -112,19 +112,19 @@ export type InferableComponentEnhancerWithProps = export type InferableComponentEnhancer = InferableComponentEnhancerWithProps; -export type WrappedThunkActionCreator any> = +export type InferThunkActionCreatorType any> = TActionCreator extends (...args: infer TParams) => (...args: any[]) => infer TReturn ? (...args: TParams) => TReturn : TActionCreator; export type HandleThunkActionCreator = TActionCreator extends (...args: any[]) => any - ? WrappedThunkActionCreator + ? InferThunkActionCreatorType : TActionCreator; // redux-thunk middleware returns thunk's return value from dispatch call // https://github.com/reduxjs/redux-thunk#composition -export type WithThunkActionCreators = +export type ResolveThunks = TDispatchProps extends { [key: string]: any } ? { [C in keyof TDispatchProps]: HandleThunkActionCreator @@ -167,7 +167,7 @@ export interface Connect { mapStateToProps: null | undefined, mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< - WithThunkActionCreators, + ResolveThunks, TOwnProps >; @@ -180,7 +180,7 @@ export interface Connect { mapStateToProps: MapStateToPropsParam, mapDispatchToProps: TDispatchProps, ): InferableComponentEnhancerWithProps< - TStateProps & WithThunkActionCreators, + TStateProps & ResolveThunks, TOwnProps >; @@ -229,7 +229,7 @@ export interface Connect { mergeProps: null | undefined, options: Options<{}, TStateProps, TOwnProps> ): InferableComponentEnhancerWithProps< - WithThunkActionCreators, + ResolveThunks, TOwnProps >; @@ -246,7 +246,7 @@ export interface Connect { mergeProps: null | undefined, options: Options ): InferableComponentEnhancerWithProps< - TStateProps & WithThunkActionCreators, + TStateProps & ResolveThunks, TOwnProps >; // tslint:enable:no-unnecessary-generics From c7f49bd2d0d3e9f5cd066b6e340db5f404a0d212 Mon Sep 17 00:00:00 2001 From: dasimple Date: Tue, 27 Nov 2018 18:47:12 +0200 Subject: [PATCH 0089/2268] First typings for gdal package --- types/gdal/gdal-tests.ts | 78 ++++ types/gdal/index.d.ts | 764 +++++++++++++++++++++++++++++++++++++++ types/gdal/tsconfig.json | 22 ++ types/gdal/tslint.json | 1 + 4 files changed, 865 insertions(+) create mode 100644 types/gdal/gdal-tests.ts create mode 100644 types/gdal/index.d.ts create mode 100644 types/gdal/tsconfig.json create mode 100644 types/gdal/tslint.json diff --git a/types/gdal/gdal-tests.ts b/types/gdal/gdal-tests.ts new file mode 100644 index 0000000000..d30c83d571 --- /dev/null +++ b/types/gdal/gdal-tests.ts @@ -0,0 +1,78 @@ +import * as gdal from 'gdal'; + +// gdal.checksumImage(srcRasterBand, 0, 0, 512, 512); + +gdal.config.get('GDAL_DATA'); +gdal.config.set('GDAL_DATA', 'C:\\warmerda\\bld\\data'); + +/*gdal.contourGenerate({ + src: srcRasterBand, + dst: dstRasterBand +});*/ + +gdal.decToDMS(60, 'lat'); +gdal.decToDMS(60, 'lat', 2); + +/*gdal.fillNodata({ + +});*/ + +let creationOptionsArray: string[]; +creationOptionsArray = ['VRT_CREATION_OPTION=...']; +let creationOptionsObject: object; +creationOptionsObject = { + VRT_CREATION_OPTION: '...' +}; +gdal.open('C:\\datasets\\ogr.shp'); +gdal.open('C:\\datasets\\ogr.shp', 'r'); +gdal.open('C:\\datasets\\ogr.shp', 'r', 'ESRI Shapefile'); +gdal.open('C:\\datasets\\ogr.shp', 'r', ['ESRI Shapefile']); +gdal.open('C:\\datasets\\ogr.shp', 'r+'); +gdal.open('C:\\datasets\\ogr.shp', 'r+', 'ESRI Shapefile'); +gdal.open('C:\\datasets\\ogr.shp', 'r+', ['ESRI Shapefile']); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT'); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT', 512, 512, 3, 1, creationOptionsArray); +gdal.open('C:\\datasets\\raster.vrt', 'w', 'VRT', 512, 512, 3, 1, creationOptionsObject); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT']); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT'], 512, 512, 3, 1, creationOptionsArray); +gdal.open('C:\\datasets\\raster.vrt', 'w', ['VRT'], 512, 512, 3, 1, creationOptionsObject); + +/*let polygonizeOptions: gdal.PolygonizeOptions; +polygonizeOptions = { + src: srcRasterBand, + dst: dstRasterBand, + connectedness: 1, + mask: maskRasterBand, + pixValField: 1, + useFloats: true +}; +gdal.polygonize(polygonizeOptions); +gdal.polygonize({ + src: srcRasterBand, + dst: dstRasterBand, + pixValField: 1 +});*/ + +gdal.quiet(); + +/*let reprojectImageOptions: gdal.ReprojectImageOptions; +reprojectImageOptions = { + src: srcRasterBand, + dst: dstRasterBand, + s_srs: sourceSRS, + t_srs: targetSRS +}; +gdal.reprojectImage(reprojectImageOptions); +gdal.reprojectImage({ + +}); + +gdal.sieveFilter({ + +}); + +gdal.suggestedWarpOutput({ + +});*/ + +gdal.verbose(); diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts new file mode 100644 index 0000000000..50280cff3d --- /dev/null +++ b/types/gdal/index.d.ts @@ -0,0 +1,764 @@ +// Type definitions for gdal 0.9 +// Project: https://github.com/naturalatlas/node-gdal#readme +// Definitions by: Andrei Digori +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +export as namespace gdal; + +/* Internal interfaces */ + +export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; +export type Resampling = 'NEAREST' | 'GAUSS' | 'CUBIC' | 'AVERAGE' | 'MODE' | 'AVERAGE_MAGPHASE' | 'NONE'; + +export interface XY +{ + x: number; + y: number; +} + +export interface XYZ extends XY +{ + z: number; +} + +export interface EnvelopeBounds +{ + minX: number, + maxX: number, + minY: number, + maxY: number +} + +export interface Envelope3DBounds extends EnvelopeBounds +{ + minZ: number, + maxZ: number +} + +export interface RasterBandStatistics +{ + min: number; + max: number; + mean: number; + std_dev: number; +} + +export interface RasterBandPixelsWriteOptions +{ + buffer_width?: number; + buffer_height?: number; + pixel_space?: number; + line_space?: number; +} + +export interface RasterBandPixelsReadOptions +{ + buffer_width?: number; + buffer_height?: number; + pixel_space?: number; + line_space?: number; + data_type?: string; +} + +export interface ContourGenerateOptions +{ + src: RasterBand; + dst: Layer; + offset?: number; + interval?: number; + fixedLevels?: number[]; + nodata?: number; + idField?: number; + elevField?: number; +} + +export interface FillNoDataOptions +{ + src: RasterBand; + mask?: RasterBand; + searchDist: number; + smoothingIterations?: number; +} + +export interface PolygonizeOptions +{ + src: RasterBand; + dst: Layer; + mask?: RasterBand; + pixValField: number; + connectedness?: number; + useFloats?: boolean; +} + +export interface ReprojectImageOptions +{ + src: Dataset; + dst: Dataset; + s_srs: SpatialReference; + t_srs: SpatialReference; + resampling?: string; + cutline?: Geometry; + srcBands?: number[]; + dstBands?: number[]; + srcAlphaBand?: number; + dstAlphaBand?: number; + srcNodata?: number; + dstNodata?: number; + memoryLimit?: number; + maxError?: number; + multi?: boolean; + options?: string[] | object; +} + +export interface SieveFilterOptions +{ + src: RasterBand; + dst: RasterBand; + mask?: RasterBand; + threshold: number; + connectedness?: number; +} + +export interface SuggestedWarpOutputOptions +{ + src: Dataset; + s_srs: SpatialReference; + t_srs: SpatialReference; + maxError?: number; +} + +/* From API: https://naturalatlas.github.io/node-gdal/ */ + +/* Constants */ + +// CPL Error Codes +export const CPLE_AppDefined: number; +export const CPLE_AssertionFailed: number; +export const CPLE_FileIO: number; +export const CPLE_IllegalArg: number; +export const CPLE_None: number; +export const CPLE_NotSupported: number; +export const CPLE_NoWriteAccess: number; +export const CPLE_ObjectNull: number; +export const CPLE_OpenFailed: number; +export const CPLE_OutOfMemory: number; +export const CPLE_UserInterrupt: number; + +// CPL Error Levels +export const CE_Debug: number; +export const CE_Failure: number; +export const CE_Fatal: number; +export const CE_None: number; +export const CE_Warning: number; + +// DCAP +export const DCAP_CREATE: string; +export const DCAP_CREATECOPY: string; +export const DCAP_VIRTUALIO: string; + +// DMD +export const DMD_CREATIONDATATYPES: string; +export const DMD_CREATIONOPTIONLIST: string; +export const DMD_EXTENSION: string; +export const DMD_HELPTOPIC: string; +export const DMD_LONGNAME: string; +export const DMD_MIMETYPE: string; + +// GCI +export const GCI_AlphaBand: string; +export const GCI_BlackBand: string; +export const GCI_BlueBand: string; +export const GCI_CyanBand: string; +export const GCI_GrayIndex: string; +export const GCI_GreenBand: string; +export const GCI_HueBand: string; +export const GCI_LightnessBand: string; +export const GCI_MagentaBand: string; +export const GCI_PaletteIndex: string; +export const GCI_RedBand: string; +export const GCI_SaturationBand: string; +export const GCI_Undefined: string; +export const GCI_YCbCr_CbBand: string; +export const GCI_YCbCr_CrBand: string; +export const GCI_YCbCr_YBand: string; +export const GCI_YellowBand: string; + +// GDT +export const GDT_Byte: string; +export const GDT_CFloat32: string; +export const GDT_CFloat64: string; +export const GDT_CInt16: string; +export const GDT_CInt32: string; +export const GDT_Float32: string; +export const GDT_Float64: string; +export const GDT_Int16: string; +export const GDT_Int32: string; +export const GDT_UInt16: string; +export const GDT_UInt32: string; +export const GDT_Unknown: string; + +// GRA +export const GRA_Average: string; +export const GRA_Bilinear: string; +export const GRA_Cubic: string; +export const GRA_CubicSpline: string; +export const GRA_Lanczos: string; +export const GRA_Mode: string; +export const GRA_NearestNeighbor: string; + +// ODsC +export const ODrCCreateDataSource: string; +export const ODrCDeleteDataSource: string; +export const ODsCCreateGeomFieldAfterCreateLayer: string; +export const ODsCCreateLayer: string; +export const ODsCDeleteLayer: string; + +// OFT +export const OFTBinary: string; +export const OFTDate: string; +export const OFTDateTime: string; +export const OFTInteger: string; +export const OFTIntegerList: string; +export const OFTReal: string; +export const OFTRealList: string; +export const OFTString: string; +export const OFTStringList: string; +export const OFTTime: string; +export const OFTWideString: string; +export const OFTWideStringList: string; + +// OJ +export const OJLeft: string; +export const OJRight: string; +export const OJUndefined: string; + +// OLC +export const OLCAlterFieldDefn: string; +export const OLCCreateField: string; +export const OLCCreateGeomField: string; +export const OLCDeleteFeature: string; +export const OLCDeleteField: string; +export const OLCFastFeatureCount: string; +export const OLCFastGetExtent: string; +export const OLCFastSetNextByIndex: string; +export const OLCFastSpatialFilter: string; +export const OLCIgnoreFields: string; +export const OLCRandomRead: string; +export const OLCRandomWrite: string; +export const OLCReorderFields: string; +export const OLCSequentialWrite: string; +export const OLCStringsAsUTF8: string; +export const OLCTransactions: string; + +// wkbByteOrder +export const wkbNDR: string; +export const wkbXDR: string; + +// wkbGeometryType +export const wkb25DBit: number; +export const wkbGeometryCollection: number; +export const wkbGeometryCollection25D: number; +export const wkbLinearRing: string; +export const wkbLinearRing25D: number; +export const wkbLineString: number; +export const wkbLineString25D: number; +export const wkbMultiLineString: number; +export const wkbMultiLineString25D: number; +export const wkbMultiPoint: number; +export const wkbMultiPoint25D: number; +export const wkbMultiPolygon: number; +export const wkbMultiPolygon25D: number; +export const wkbNone: number; +export const wkbPoint: number; +export const wkbPoint25D: number; +export const wkbPolygon: number; +export const wkbPolygon25D: number; +export const wkbUnknown: number; + +// wkbVariant +export const wkbVariantIso: string; +export const wkbVariantOgc: string; +export const wkbVariantOldOgc: string; + +/* Classes and interfaces */ + +export class CoordinateTransformation +{ + constructor(source: SpatialReference, target: SpatialReference | Dataset); + transformPoint(x: number, y: number, z?: number): XYZ; +} + +export interface Dataset +{ + buildOverviews(resampling: Resampling, overviews: number[], bands?: number[]): void; + close(): void; + executeSQL(statement: string, spatial_filter?: Geometry, dialect?: string): Layer; + flush(): void; + getFileList(): string[]; + getGCPProjection(): string; + getGCPs(): object[]; + getMetadata(domain?: string): object; + setGCPs(gcps: object[], projection: string): void; + testCapability(capability: string): boolean; + + readonly bands: DatasetBands; + readonly description: string; + readonly driver: Driver; + geoTransform: number[]; + readonly layers: DatasetLayers; + readonly rasterSize: XY; + srs: SpatialReference; +} + +export interface DatasetBands +{ + count(): number; + create(dataType: number): RasterBand; + forEach(callback: (band: RasterBand, i: number) => void): void; + get(id: number): RasterBand; + map(callback: (band: RasterBand, i: number) => T): T[]; + + readonly ds: Dataset; +} + +export interface DatasetLayers +{ + copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; + count(): number; + create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; + forEach(callback: (layer: Layer, i: number) => void): void; + get(key: string | number): Layer; + map(callback: (layer: Layer, i: number) => T): T[]; + remove(index: number): void; + + readonly ds: Dataset; +} + +export interface Driver +{ + copyFiles(name_old: string, name_new: string): void; + create(filename: string, x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; + createCopy(filename: string, src: Dataset, strict?: boolean, options?: string[] | object): Dataset; + deleteDataset(filename: string): void; + getMetadata(domain?: string): object; + open(path: string, mode?: 'r' | 'r+'): Dataset; + rename(new_name: string, old_name: string): void; + + readonly description: string; +} + +export class Envelope +{ + constructor(bounds: EnvelopeBounds); + contains(envelope: Envelope): boolean; + intersect(envelope: Envelope): void; + intersects(envelope: Envelope): boolean; + isEmpty(): boolean; + merge(envelope: Envelope): void; + toPolygon(): Polygon; +} + +export class Envelope3D extends Envelope +{ + constructor(bounds: Envelope3DBounds); +} + +export class Feature +{ + constructor(definition: Layer | FeatureDefn); + clone(): Feature; + destroy(): void; + equals(feature: Feature): boolean; + getFieldDefn(index: number): FieldDefn; + getGeometry(): Geometry; + setFrom(feature: Feature, index_map?: number[], forgiving?: boolean): void; + setGeometry(geometry: Geometry): void; + + readonly defn: FeatureDefn; + fid: number; + readonly fields: FeatureFields; +} + +export class FeatureDefn +{ + constructor(); + clone(): FeatureDefn; + + readonly fields: FeatureDefnFields; + geomIgnored: boolean; + geomType: number; + readonly name: string; + styleIgnored: boolean; +} + +export interface FeatureDefnFields +{ + add(field: FieldDefn | FieldDefn[]): void; + count(): number; + forEach(callback: (field: FieldDefn, i: number) => void): void; + get(key: string | number): FieldDefn; + getNames(): string[]; + indexOf(name: string): number; + map(callback: (field: FieldDefn, i: number) => T): T[]; + remove(key: string | number): void; + reorder(map: number[]): void; + + readonly featureDefn: FeatureDefn; +} + +export interface FeatureFields +{ + count(): number; + forEach(callback: (value: any, key: string) => void): void; + get(key: string | number): any; + getNames(): string[]; + indexOf(name: string): number; + map(callback: (value: any, key: string) => T): T[]; + reset(values: object, value: any): void; + set(key: string | number, value: any): void; + toArray(): any[]; + toJSON(): string; + toObject(): object; + + readonly feature: Feature; +} + +export class FieldDefn +{ + constructor(name: string, type: string); + + ignored: boolean; + justification: string; + name: string; + precision: number; + type: string; + width: number; +} + +export interface GDALDrivers +{ + count(): number; + forEach(callback: (driver: Driver, i: number) => void): void; + get(index: number | string): Driver; + getNames(): string[]; + map(callback: (driver: Driver, i: number) => T): T[]; +} + +export abstract class Geometry +{ + static create(type: number): Geometry; + static fromWKB(wkb: number, srs?: SpatialReference): Geometry; + static fromWKT(wkt: string, srs?: SpatialReference): Geometry; + static getConstructor(type: number): Function; + static getName(type: number): string; + + boundary(): Geometry; + buffer(distance: number, segments: number): Geometry; + centroid(): Point; + clone(): Geometry; + closeRings(): void; + contains(geometry: Geometry): boolean; + convexHull(): Geometry; + crosses(geometry: Geometry): boolean; + difference(geometry: Geometry): Geometry; + disjoint(geometry: Geometry): boolean; + distance(geometry: Geometry): number; + empty(): void; + equals(geometry: Geometry): boolean; + getEnvelope(): Envelope; + getEnvelope3D(): Envelope3D; + intersection(geometry: Geometry): Geometry; + intersects(geometry: Geometry): boolean; + isEmpty(): boolean; + isRing(): boolean; + isSimple(): boolean; + isValid(): boolean; + overlaps(geometry: Geometry): boolean; + segmentize(segment_length: number): number; + simplify(tolerance: number): Geometry; + simplifyPreserveTopology(tolerance: number): Geometry; + swapXY(): void; + symDifference(geometry: Geometry): Geometry; + toGML(): Geometry; + toJSON(): Geometry; + toKML(): Geometry; + toObject(): object; + touches(geometry: Geometry): boolean; + toWKB(byte_order?: string, variant?: string): Geometry; + toWKT(): Geometry; + transform(transformation: CoordinateTransformation): void; + transformTo(srs: SpatialReference): void; + union(geometry: Geometry): Geometry; + within(geometry: Geometry): boolean; + + readonly coordinateDimension: number; + readonly dimension: number; + readonly name: string; + srs: SpatialReference; + readonly wkbSize: number; + readonly wkbType: number; +} + +export class GeometryCollection extends Geometry +{ + getArea(): number; + getLength(): number; + + children: GeometryCollectionChildren; +} + +export interface GeometryCollectionChildren +{ + add(geometry: Geometry | Geometry[]): void; + count(): number; + forEach(callback: (geometry: Geometry, i: number) => void): void; + get(index: number): Geometry; + map(callback: (geometry: Geometry, i: number) => T): T[]; + remove(index: number): void; + toArray(): Geometry[]; + + readonly layer: Layer; +} + +export interface Layer +{ + flush(): void; + getExtent(force?: boolean): Envelope; + getSpatialFilter(): Geometry; + setAttributeFilter(filter: string): void; + setSpatialFilter(filter: Geometry): void; + setSpatialFilter(minX: number, maxX: number, minY: number, maxY: number): void; + testCapability(capability: string): boolean; + + readonly ds: Dataset; + readonly features: LayerFeatures; + readonly fidColumn: string; + readonly fields: LayerFields; + readonly geomColumn: string; + readonly geomType: number; + readonly name: string; + readonly srs: SpatialReference; +} + +export interface LayerFeatures +{ + add(feature: Feature): void; + count(force?: boolean): number; + first(): Feature; + forEach(callback: (feature: Feature, i: number) => void): void; + get(id: number): Feature; + map(callback: (feature: Feature, i: number) => T): T[]; + next(): Feature; + remove(id: number): void; + set(id: number, feature: Feature): void; + + readonly layer: Layer; +} + +export interface LayerFields +{ + add(def: FieldDefn | FieldDefn[], approx?: boolean): void; + count(): number; + forEach(callback: (field: FieldDefn, i: number) => void): void; + fromJSON(object: object, approx_ok?: boolean): LayerFields; + get(field: string | number): FieldDefn; + getNames(): string[]; + indexOf(field: string): number; + map(callback: (field: FieldDefn, i: number) => T): T[]; + remove(field: string | number): void; + reorder(map: number[]): void; + + readonly layer: Layer; +} + +export class LinearRing extends LineString +{ + getArea(): number; +} + +export class LineString extends Geometry +{ + addSubLineString(line: LineString, start?: number, end?: number): void; + getLength(): number; + value(distance: number): Point; + + readonly points: LineStringPoints; +} + +export interface LineStringPoints +{ + add(point: Point | Point[]): void; + count(): number; + forEach(callback: (point: Point, i: number) => void): void; + get(index: number): Point; + map(callback: (point: Point, i: number) => T): T[]; + remove(index: number): void; + resize(count: number): void; + reverse(): void; + set(index: number, point: Point): void; + toArray(): Point[]; +} + +export class MultiLineString extends GeometryCollection +{ + polygonize(): Polygon; +} + +export class MultiPoint extends GeometryCollection +{ + +} + +export class MultiPolygon extends GeometryCollection +{ + getArea(): number; + unionCascaded(): Geometry; +} + +export class Point extends Geometry +{ + constructor(x: number, y: number, z?: number); + + x: number; + y: number; + z: number; +} + +export class Polygon extends Geometry +{ + getArea(): number; + + rings: PolygonRings; +} + +export interface PolygonRings +{ + add(ring: LinearRing | LinearRing[]): void; + count(): number; + forEach(callback: (ring: LinearRing, i: number) => void): void; + get(index: number): LinearRing; + map(callback: (ring: LinearRing, i: number) => T): T[]; + remove(index: number): void; + toArray(): LinearRing[]; + + readonly layer: Layer; +} + +export interface RasterBand +{ + computeStatistics(allow_approximation: boolean): RasterBandStatistics; + createMaskBand(flags: number): void; + fill(real_value: number, imaginary_value?: number): void; + flush(): void; + getMaskBand(): RasterBand; + getMaskFlags(): number; + getMetadata(domain?: string): object; + getStatistics(allow_approximation: boolean, force: boolean): RasterBandStatistics; + setStatistics(min: number, max: number, mean: number, std_dev: number): void; + + readonly blockSize: XY; + categoryNames: string[]; + colorInterpretation: string; + readonly dataType: string; + readonly description: string; + readonly ds: Dataset; + readonly hasArbitraryOverviews: boolean; + readonly id: number; + readonly maximum: number; + readonly minimum: number; + noDataValue: number; + offset: number; + readonly overviews: RasterBandOverviews; + readonly pixels: RasterBandPixels; + readonly readOnly: boolean; + scale: number; + readonly size: XY; + unitType: string; +} + +export interface RasterBandOverviews +{ + count(): number; + forEach(callback: (overviewBand: RasterBand, i: number) => void): void; + get(index: number): RasterBand; + getBySampleCount(samples: number): RasterBand; + map(callback: (overviewBand: RasterBand, i: number) => T): T[]; +} + +export interface RasterBandPixels +{ + get(x: number, y: number): number; + read(x: number, y: number, width: number, height: number, data?: TypedArray, options?: RasterBandPixelsReadOptions): TypedArray; + readBlock(x: number, y: number, data?: TypedArray): TypedArray; + set(x: number, y: number, value: number): void; + write(x: number, y: number, width: number, height: number, data: TypedArray, options?: RasterBandPixelsWriteOptions): void; + writeBlock(x: number, y: number, data: TypedArray): void; +} + +export class SpatialReference +{ + constructor(wkt?: string); + autoIdentifyEPSG(): void; + clone(): SpatialReference; + cloneGeogCS(): SpatialReference; + EPSGTreatsAsLatLong(): boolean; + EPSGTreatsAsNorthingEasting(): boolean; + getAngularUnits(): { value: any, unit: any }; + getAttrValue(node_name: string, attr_index?: number): string; + getAuthorityCode(target_key: string): string; + getAuthorityName(target_key: string): string; + getLinearUnits(): { value: any, unit: any }; + isCompound(): boolean; + isGeocentric(): boolean; + isGeographic(): boolean; + isLocal(): boolean; + isProjected(): boolean; + isSame(srs: SpatialReference): boolean; + isSameGeogCS(srs: SpatialReference): boolean; + isSameVertCS(srs: SpatialReference): boolean; + isVertical(): boolean; + morphFromESRI(): void; + morphToESRI(): void; + setWellKnownGeogCS(name: string): void; + toPrettyWKT(simplify?: boolean): string; + toProj4(): string; + toWKT(): string; + toXML(): string; + validate(): string; + + static fromCRSURL(input: string): SpatialReference; + static fromEPSG(input: string): SpatialReference; + static fromEPSGA(input: number): SpatialReference; + static fromESRI(input: string[]): SpatialReference; + static fromMICoordSys(input: string): SpatialReference; + static fromProj4(input: string): SpatialReference; + static fromURL(url: string): SpatialReference; + static fromURN(input: string): SpatialReference; + static fromUserInput(input: string): SpatialReference; + static fromWKT(wkt: string): SpatialReference; + static fromWMSAUTO(input: string): SpatialReference; + static fromXML(input: string): SpatialReference; +} + +export namespace config +{ + function get(key: string): string; + function set(key: string, value: string): void; +} + +export const drivers: GDALDrivers; +export const lastError: { number: any, message: any, type: any }; +export const version: string; + +export function checksumImage(src: RasterBand, x?: number, y?: number, w?: number, h?: number): number; +export function contourGenerate(options: ContourGenerateOptions): void; +export function decToDMS(angle: number, axis: 'lat' | 'long', precision?: number): string; +export function fillNodata(options: FillNoDataOptions): void; +export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; +export function polygonize(options: PolygonizeOptions): void; +export function quiet(): void; +export function reprojectImage(options: ReprojectImageOptions): void; +export function sieveFilter(options: SieveFilterOptions): void; +export function suggestedWarpOutput(options: SuggestedWarpOutputOptions): { rasterSize: any, geoTransform: any }; +export function verbose(): void; \ No newline at end of file diff --git a/types/gdal/tsconfig.json b/types/gdal/tsconfig.json new file mode 100644 index 0000000000..a7bd1cf386 --- /dev/null +++ b/types/gdal/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gdal-tests.ts" + ] +} diff --git a/types/gdal/tslint.json b/types/gdal/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gdal/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a104ee185677834365ba69b74bd14cd14723d5e7 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:05:34 +0200 Subject: [PATCH 0090/2268] Update tsconfig.json Set "strictFunctionTypes": false, --- types/gdal/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/gdal/tsconfig.json b/types/gdal/tsconfig.json index a7bd1cf386..3a5bfaf917 100644 --- a/types/gdal/tsconfig.json +++ b/types/gdal/tsconfig.json @@ -7,6 +7,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": false, "baseUrl": "../", "typeRoots": [ "../" From 08b098667ad9ab2e6ff405662be41b947af7e04f Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:20:57 +0200 Subject: [PATCH 0091/2268] Update index.d.ts TsLint check --- types/gdal/index.d.ts | 138 ++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 92 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 50280cff3d..41a89ff72f 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -11,49 +11,42 @@ export as namespace gdal; export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; export type Resampling = 'NEAREST' | 'GAUSS' | 'CUBIC' | 'AVERAGE' | 'MODE' | 'AVERAGE_MAGPHASE' | 'NONE'; -export interface XY -{ +export interface XY { x: number; y: number; } -export interface XYZ extends XY -{ +export interface XYZ extends XY { z: number; } -export interface EnvelopeBounds -{ +export interface EnvelopeBounds { minX: number, maxX: number, minY: number, maxY: number } -export interface Envelope3DBounds extends EnvelopeBounds -{ +export interface Envelope3DBounds extends EnvelopeBounds { minZ: number, maxZ: number } -export interface RasterBandStatistics -{ +export interface RasterBandStatistics { min: number; max: number; mean: number; std_dev: number; } -export interface RasterBandPixelsWriteOptions -{ +export interface RasterBandPixelsWriteOptions { buffer_width?: number; buffer_height?: number; pixel_space?: number; line_space?: number; } -export interface RasterBandPixelsReadOptions -{ +export interface RasterBandPixelsReadOptions { buffer_width?: number; buffer_height?: number; pixel_space?: number; @@ -61,8 +54,7 @@ export interface RasterBandPixelsReadOptions data_type?: string; } -export interface ContourGenerateOptions -{ +export interface ContourGenerateOptions { src: RasterBand; dst: Layer; offset?: number; @@ -73,16 +65,14 @@ export interface ContourGenerateOptions elevField?: number; } -export interface FillNoDataOptions -{ +export interface FillNoDataOptions { src: RasterBand; mask?: RasterBand; searchDist: number; smoothingIterations?: number; } -export interface PolygonizeOptions -{ +export interface PolygonizeOptions { src: RasterBand; dst: Layer; mask?: RasterBand; @@ -91,8 +81,7 @@ export interface PolygonizeOptions useFloats?: boolean; } -export interface ReprojectImageOptions -{ +export interface ReprojectImageOptions { src: Dataset; dst: Dataset; s_srs: SpatialReference; @@ -111,8 +100,7 @@ export interface ReprojectImageOptions options?: string[] | object; } -export interface SieveFilterOptions -{ +export interface SieveFilterOptions { src: RasterBand; dst: RasterBand; mask?: RasterBand; @@ -120,8 +108,7 @@ export interface SieveFilterOptions connectedness?: number; } -export interface SuggestedWarpOutputOptions -{ +export interface SuggestedWarpOutputOptions { src: Dataset; s_srs: SpatialReference; t_srs: SpatialReference; @@ -283,14 +270,12 @@ export const wkbVariantOldOgc: string; /* Classes and interfaces */ -export class CoordinateTransformation -{ +export class CoordinateTransformation { constructor(source: SpatialReference, target: SpatialReference | Dataset); transformPoint(x: number, y: number, z?: number): XYZ; } -export interface Dataset -{ +export interface Dataset { buildOverviews(resampling: Resampling, overviews: number[], bands?: number[]): void; close(): void; executeSQL(statement: string, spatial_filter?: Geometry, dialect?: string): Layer; @@ -311,8 +296,7 @@ export interface Dataset srs: SpatialReference; } -export interface DatasetBands -{ +export interface DatasetBands { count(): number; create(dataType: number): RasterBand; forEach(callback: (band: RasterBand, i: number) => void): void; @@ -322,8 +306,7 @@ export interface DatasetBands readonly ds: Dataset; } -export interface DatasetLayers -{ +export interface DatasetLayers { copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; count(): number; create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; @@ -335,8 +318,7 @@ export interface DatasetLayers readonly ds: Dataset; } -export interface Driver -{ +export interface Driver { copyFiles(name_old: string, name_new: string): void; create(filename: string, x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; createCopy(filename: string, src: Dataset, strict?: boolean, options?: string[] | object): Dataset; @@ -348,8 +330,7 @@ export interface Driver readonly description: string; } -export class Envelope -{ +export class Envelope { constructor(bounds: EnvelopeBounds); contains(envelope: Envelope): boolean; intersect(envelope: Envelope): void; @@ -359,13 +340,11 @@ export class Envelope toPolygon(): Polygon; } -export class Envelope3D extends Envelope -{ +export class Envelope3D extends Envelope { constructor(bounds: Envelope3DBounds); } -export class Feature -{ +export class Feature { constructor(definition: Layer | FeatureDefn); clone(): Feature; destroy(): void; @@ -380,8 +359,7 @@ export class Feature readonly fields: FeatureFields; } -export class FeatureDefn -{ +export class FeatureDefn { constructor(); clone(): FeatureDefn; @@ -392,8 +370,7 @@ export class FeatureDefn styleIgnored: boolean; } -export interface FeatureDefnFields -{ +export interface FeatureDefnFields { add(field: FieldDefn | FieldDefn[]): void; count(): number; forEach(callback: (field: FieldDefn, i: number) => void): void; @@ -407,8 +384,7 @@ export interface FeatureDefnFields readonly featureDefn: FeatureDefn; } -export interface FeatureFields -{ +export interface FeatureFields { count(): number; forEach(callback: (value: any, key: string) => void): void; get(key: string | number): any; @@ -424,8 +400,7 @@ export interface FeatureFields readonly feature: Feature; } -export class FieldDefn -{ +export class FieldDefn { constructor(name: string, type: string); ignored: boolean; @@ -436,8 +411,7 @@ export class FieldDefn width: number; } -export interface GDALDrivers -{ +export interface GDALDrivers { count(): number; forEach(callback: (driver: Driver, i: number) => void): void; get(index: number | string): Driver; @@ -445,8 +419,7 @@ export interface GDALDrivers map(callback: (driver: Driver, i: number) => T): T[]; } -export abstract class Geometry -{ +export abstract class Geometry { static create(type: number): Geometry; static fromWKB(wkb: number, srs?: SpatialReference): Geometry; static fromWKT(wkt: string, srs?: SpatialReference): Geometry; @@ -500,16 +473,14 @@ export abstract class Geometry readonly wkbType: number; } -export class GeometryCollection extends Geometry -{ +export class GeometryCollection extends Geometry { getArea(): number; getLength(): number; children: GeometryCollectionChildren; } -export interface GeometryCollectionChildren -{ +export interface GeometryCollectionChildren { add(geometry: Geometry | Geometry[]): void; count(): number; forEach(callback: (geometry: Geometry, i: number) => void): void; @@ -521,8 +492,7 @@ export interface GeometryCollectionChildren readonly layer: Layer; } -export interface Layer -{ +export interface Layer { flush(): void; getExtent(force?: boolean): Envelope; getSpatialFilter(): Geometry; @@ -541,8 +511,7 @@ export interface Layer readonly srs: SpatialReference; } -export interface LayerFeatures -{ +export interface LayerFeatures { add(feature: Feature): void; count(force?: boolean): number; first(): Feature; @@ -556,8 +525,7 @@ export interface LayerFeatures readonly layer: Layer; } -export interface LayerFields -{ +export interface LayerFields { add(def: FieldDefn | FieldDefn[], approx?: boolean): void; count(): number; forEach(callback: (field: FieldDefn, i: number) => void): void; @@ -572,13 +540,11 @@ export interface LayerFields readonly layer: Layer; } -export class LinearRing extends LineString -{ +export class LinearRing extends LineString { getArea(): number; } -export class LineString extends Geometry -{ +export class LineString extends Geometry { addSubLineString(line: LineString, start?: number, end?: number): void; getLength(): number; value(distance: number): Point; @@ -586,8 +552,7 @@ export class LineString extends Geometry readonly points: LineStringPoints; } -export interface LineStringPoints -{ +export interface LineStringPoints { add(point: Point | Point[]): void; count(): number; forEach(callback: (point: Point, i: number) => void): void; @@ -600,24 +565,20 @@ export interface LineStringPoints toArray(): Point[]; } -export class MultiLineString extends GeometryCollection -{ +export class MultiLineString extends GeometryCollection { polygonize(): Polygon; } -export class MultiPoint extends GeometryCollection -{ +export class MultiPoint extends GeometryCollection { } -export class MultiPolygon extends GeometryCollection -{ +export class MultiPolygon extends GeometryCollection { getArea(): number; unionCascaded(): Geometry; } -export class Point extends Geometry -{ +export class Point extends Geometry { constructor(x: number, y: number, z?: number); x: number; @@ -625,15 +586,13 @@ export class Point extends Geometry z: number; } -export class Polygon extends Geometry -{ +export class Polygon extends Geometry { getArea(): number; rings: PolygonRings; } -export interface PolygonRings -{ +export interface PolygonRings { add(ring: LinearRing | LinearRing[]): void; count(): number; forEach(callback: (ring: LinearRing, i: number) => void): void; @@ -645,8 +604,7 @@ export interface PolygonRings readonly layer: Layer; } -export interface RasterBand -{ +export interface RasterBand { computeStatistics(allow_approximation: boolean): RasterBandStatistics; createMaskBand(flags: number): void; fill(real_value: number, imaginary_value?: number): void; @@ -677,8 +635,7 @@ export interface RasterBand unitType: string; } -export interface RasterBandOverviews -{ +export interface RasterBandOverviews { count(): number; forEach(callback: (overviewBand: RasterBand, i: number) => void): void; get(index: number): RasterBand; @@ -686,8 +643,7 @@ export interface RasterBandOverviews map(callback: (overviewBand: RasterBand, i: number) => T): T[]; } -export interface RasterBandPixels -{ +export interface RasterBandPixels { get(x: number, y: number): number; read(x: number, y: number, width: number, height: number, data?: TypedArray, options?: RasterBandPixelsReadOptions): TypedArray; readBlock(x: number, y: number, data?: TypedArray): TypedArray; @@ -696,8 +652,7 @@ export interface RasterBandPixels writeBlock(x: number, y: number, data: TypedArray): void; } -export class SpatialReference -{ +export class SpatialReference { constructor(wkt?: string); autoIdentifyEPSG(): void; clone(): SpatialReference; @@ -741,8 +696,7 @@ export class SpatialReference static fromXML(input: string): SpatialReference; } -export namespace config -{ +export namespace config { function get(key: string): string; function set(key: string, value: string): void; } From acd8209e0673bf6e558e8342706c7b5809b9e7c5 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:29:25 +0200 Subject: [PATCH 0092/2268] Update index.d.ts Linting --- types/gdal/index.d.ts | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 41a89ff72f..6aca0120de 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -21,15 +21,15 @@ export interface XYZ extends XY { } export interface EnvelopeBounds { - minX: number, - maxX: number, - minY: number, - maxY: number + minX: number; + maxX: number; + minY: number; + maxY: number; } export interface Envelope3DBounds extends EnvelopeBounds { - minZ: number, - maxZ: number + minZ: number; + maxZ: number; } export interface RasterBandStatistics { @@ -309,7 +309,7 @@ export interface DatasetBands { export interface DatasetLayers { copy(src_lyr_name: string, dst_lyr_name: string, options?: object | string[]): Layer; count(): number; - create(name: string, srs: SpatialReference, geomType: number | Function, creation_options: string[] | object): Layer; + create(name: string, srs: SpatialReference, geomType: number | Geometry, creation_options: string[] | object): Layer; forEach(callback: (layer: Layer, i: number) => void): void; get(key: string | number): Layer; map(callback: (layer: Layer, i: number) => T): T[]; @@ -423,7 +423,7 @@ export abstract class Geometry { static create(type: number): Geometry; static fromWKB(wkb: number, srs?: SpatialReference): Geometry; static fromWKT(wkt: string, srs?: SpatialReference): Geometry; - static getConstructor(type: number): Function; + static getConstructor(type: number): Geometry; static getName(type: number): string; boundary(): Geometry; @@ -488,7 +488,6 @@ export interface GeometryCollectionChildren { map(callback: (geometry: Geometry, i: number) => T): T[]; remove(index: number): void; toArray(): Geometry[]; - readonly layer: Layer; } @@ -500,7 +499,6 @@ export interface Layer { setSpatialFilter(filter: Geometry): void; setSpatialFilter(minX: number, maxX: number, minY: number, maxY: number): void; testCapability(capability: string): boolean; - readonly ds: Dataset; readonly features: LayerFeatures; readonly fidColumn: string; @@ -521,7 +519,6 @@ export interface LayerFeatures { next(): Feature; remove(id: number): void; set(id: number, feature: Feature): void; - readonly layer: Layer; } @@ -536,7 +533,6 @@ export interface LayerFields { map(callback: (field: FieldDefn, i: number) => T): T[]; remove(field: string | number): void; reorder(map: number[]): void; - readonly layer: Layer; } @@ -548,7 +544,6 @@ export class LineString extends Geometry { addSubLineString(line: LineString, start?: number, end?: number): void; getLength(): number; value(distance: number): Point; - readonly points: LineStringPoints; } @@ -580,7 +575,6 @@ export class MultiPolygon extends GeometryCollection { export class Point extends Geometry { constructor(x: number, y: number, z?: number); - x: number; y: number; z: number; @@ -588,7 +582,6 @@ export class Point extends Geometry { export class Polygon extends Geometry { getArea(): number; - rings: PolygonRings; } @@ -600,7 +593,6 @@ export interface PolygonRings { map(callback: (ring: LinearRing, i: number) => T): T[]; remove(index: number): void; toArray(): LinearRing[]; - readonly layer: Layer; } @@ -614,7 +606,6 @@ export interface RasterBand { getMetadata(domain?: string): object; getStatistics(allow_approximation: boolean, force: boolean): RasterBandStatistics; setStatistics(min: number, max: number, mean: number, std_dev: number): void; - readonly blockSize: XY; categoryNames: string[]; colorInterpretation: string; @@ -681,7 +672,6 @@ export class SpatialReference { toWKT(): string; toXML(): string; validate(): string; - static fromCRSURL(input: string): SpatialReference; static fromEPSG(input: string): SpatialReference; static fromEPSGA(input: number): SpatialReference; @@ -709,10 +699,11 @@ export function checksumImage(src: RasterBand, x?: number, y?: number, w?: numbe export function contourGenerate(options: ContourGenerateOptions): void; export function decToDMS(angle: number, axis: 'lat' | 'long', precision?: number): string; export function fillNodata(options: FillNoDataOptions): void; -export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; +export function open(path: string, mode?: 'r' | 'r+' | 'w', drivers?: string | string[]): Dataset; +export function open(path: string, mode?: 'w', drivers?: string | string[], x_size?: number, y_size?: number, band_count?: number, data_type?: number, creation_options?: string[] | object): Dataset; export function polygonize(options: PolygonizeOptions): void; export function quiet(): void; export function reprojectImage(options: ReprojectImageOptions): void; export function sieveFilter(options: SieveFilterOptions): void; export function suggestedWarpOutput(options: SuggestedWarpOutputOptions): { rasterSize: any, geoTransform: any }; -export function verbose(): void; \ No newline at end of file +export function verbose(): void; From 62f4c1c89c2c6fac264ac4ca7ffbf2c76c69974e Mon Sep 17 00:00:00 2001 From: huan086 Date: Tue, 27 Nov 2018 10:41:47 +0800 Subject: [PATCH 0093/2268] [preval.macro] Add Typescript definitions. --- types/preval.macro/index.d.ts | 7 +++++++ types/preval.macro/preval.macro-tests.ts | 5 +++++ types/preval.macro/tsconfig.json | 23 +++++++++++++++++++++++ types/preval.macro/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/preval.macro/index.d.ts create mode 100644 types/preval.macro/preval.macro-tests.ts create mode 100644 types/preval.macro/tsconfig.json create mode 100644 types/preval.macro/tslint.json diff --git a/types/preval.macro/index.d.ts b/types/preval.macro/index.d.ts new file mode 100644 index 0000000000..4ecfa3bf25 --- /dev/null +++ b/types/preval.macro/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for preval.macro 3.0 +// Project: https://github.com/kentcdodds/preval.macro +// Definitions by: Jeow Li Huan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function preval(strings: TemplateStringsArray, ...values: any[]): any; +export = preval; diff --git a/types/preval.macro/preval.macro-tests.ts b/types/preval.macro/preval.macro-tests.ts new file mode 100644 index 0000000000..fc2f0aa409 --- /dev/null +++ b/types/preval.macro/preval.macro-tests.ts @@ -0,0 +1,5 @@ +import preval = require('preval.macro'); + +const eg1: string = preval`module.exports = 'hello world`; +const eg2: number = preval`module.exports = 42`; +const eg3: { [key: string]: string } = preval`module.exports = { hello: 'world' }`; diff --git a/types/preval.macro/tsconfig.json b/types/preval.macro/tsconfig.json new file mode 100644 index 0000000000..b895c306f0 --- /dev/null +++ b/types/preval.macro/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", + "preval.macro-tests.ts" + ] +} diff --git a/types/preval.macro/tslint.json b/types/preval.macro/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/preval.macro/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d076418dc2fb9748a78bb49a4a585b577703d158 Mon Sep 17 00:00:00 2001 From: andreidigori <45198612+andreidigori@users.noreply.github.com> Date: Tue, 27 Nov 2018 19:33:23 +0200 Subject: [PATCH 0094/2268] Update index.d.ts Linting --- types/gdal/index.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/gdal/index.d.ts b/types/gdal/index.d.ts index 6aca0120de..d6c76ba226 100644 --- a/types/gdal/index.d.ts +++ b/types/gdal/index.d.ts @@ -564,9 +564,7 @@ export class MultiLineString extends GeometryCollection { polygonize(): Polygon; } -export class MultiPoint extends GeometryCollection { - -} +export class MultiPoint extends GeometryCollection {} export class MultiPolygon extends GeometryCollection { getArea(): number; From de00f487a807ae96036e82b11a60c187f62a12ec Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Tue, 27 Nov 2018 19:09:57 +0100 Subject: [PATCH 0095/2268] [microservice-utilities] Add a type for flat object with string for the header object in PlatformClient --- types/microservice-utilities/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/microservice-utilities/index.d.ts b/types/microservice-utilities/index.d.ts index e8ccb9284e..7b2c4be923 100644 --- a/types/microservice-utilities/index.d.ts +++ b/types/microservice-utilities/index.d.ts @@ -42,13 +42,13 @@ export interface PlatformClientResponse { export class PlatformClient { constructor(logFunction: (msg: any) => void, tokenResolverFunction?: Promise<() => string>, configuration?: PlatformClientConfiguration) - get(url: string, headers?: object, type?: string): Promise; - post(url: string, data: object, headers?: object): Promise; - put(url: string, data: object, headers?: object): Promise; - patch(url: string, data: object, headers?: object): Promise; - delete(url: string, headers?: object): Promise; - head(url: string, headers?: object): Promise; - options(url: string, headers?: object): Promise; + get(url: string, headers?: { [s: string]: string; }, type?: string): Promise; + post(url: string, data: object, headers?: { [s: string]: string; }): Promise; + put(url: string, data: object, headers?: { [s: string]: string; }): Promise; + patch(url: string, data: object, headers?: { [s: string]: string; }): Promise; + delete(url: string, headers?: { [s: string]: string; }): Promise; + head(url: string, headers?: { [s: string]: string; }): Promise; + options(url: string, headers?: { [s: string]: string; }): Promise; } /** From 281331fa0b1fc3b9e24b486839f5a22094f230bd Mon Sep 17 00:00:00 2001 From: Konstantin Vasilev Date: Wed, 28 Nov 2018 19:54:03 +0300 Subject: [PATCH 0096/2268] add typings for dom-helpers module --- types/dom-helpers/activeElement.d.ts | 6 + types/dom-helpers/class/addClass.d.ts | 2 + types/dom-helpers/class/hasClass.d.ts | 2 + types/dom-helpers/class/index.d.ts | 19 ++++ types/dom-helpers/class/removeClass.d.ts | 2 + types/dom-helpers/dom-helpers-tests.ts | 105 ++++++++++++++++++ types/dom-helpers/events/filter.d.ts | 6 + types/dom-helpers/events/index.d.ts | 22 ++++ types/dom-helpers/events/listen.d.ts | 5 + types/dom-helpers/events/off.d.ts | 5 + types/dom-helpers/events/on.d.ts | 5 + types/dom-helpers/index.d.ts | 34 ++++++ types/dom-helpers/ownerDocument.d.ts | 6 + types/dom-helpers/ownerWindow.d.ts | 6 + types/dom-helpers/query/closest.d.ts | 7 ++ types/dom-helpers/query/contains.d.ts | 2 + types/dom-helpers/query/height.d.ts | 2 + types/dom-helpers/query/index.d.ts | 43 +++++++ types/dom-helpers/query/isWindow.d.ts | 2 + types/dom-helpers/query/matches.d.ts | 5 + types/dom-helpers/query/offset.d.ts | 11 ++ types/dom-helpers/query/offsetParent.d.ts | 5 + types/dom-helpers/query/position.d.ts | 7 ++ types/dom-helpers/query/querySelectorAll.d.ts | 8 ++ types/dom-helpers/query/scrollLeft.d.ts | 5 + types/dom-helpers/query/scrollParent.d.ts | 2 + types/dom-helpers/query/scrollTop.d.ts | 6 + types/dom-helpers/query/width.d.ts | 2 + types/dom-helpers/style/getComputedStyle.d.ts | 4 + types/dom-helpers/style/index.d.ts | 9 ++ types/dom-helpers/style/removeStyle.d.ts | 2 + types/dom-helpers/transition/animate.d.ts | 23 ++++ types/dom-helpers/transition/end.d.ts | 12 ++ types/dom-helpers/transition/index.d.ts | 16 +++ types/dom-helpers/transition/properties.d.ts | 26 +++++ types/dom-helpers/tsconfig.json | 60 ++++++++++ types/dom-helpers/tslint.json | 6 + .../util/requestAnimationFrame.d.ts | 11 ++ types/dom-helpers/util/scrollTo.d.ts | 3 + types/dom-helpers/util/scrollbarSize.d.ts | 6 + 40 files changed, 510 insertions(+) create mode 100644 types/dom-helpers/activeElement.d.ts create mode 100644 types/dom-helpers/class/addClass.d.ts create mode 100644 types/dom-helpers/class/hasClass.d.ts create mode 100644 types/dom-helpers/class/index.d.ts create mode 100644 types/dom-helpers/class/removeClass.d.ts create mode 100644 types/dom-helpers/dom-helpers-tests.ts create mode 100644 types/dom-helpers/events/filter.d.ts create mode 100644 types/dom-helpers/events/index.d.ts create mode 100644 types/dom-helpers/events/listen.d.ts create mode 100644 types/dom-helpers/events/off.d.ts create mode 100644 types/dom-helpers/events/on.d.ts create mode 100644 types/dom-helpers/index.d.ts create mode 100644 types/dom-helpers/ownerDocument.d.ts create mode 100644 types/dom-helpers/ownerWindow.d.ts create mode 100644 types/dom-helpers/query/closest.d.ts create mode 100644 types/dom-helpers/query/contains.d.ts create mode 100644 types/dom-helpers/query/height.d.ts create mode 100644 types/dom-helpers/query/index.d.ts create mode 100644 types/dom-helpers/query/isWindow.d.ts create mode 100644 types/dom-helpers/query/matches.d.ts create mode 100644 types/dom-helpers/query/offset.d.ts create mode 100644 types/dom-helpers/query/offsetParent.d.ts create mode 100644 types/dom-helpers/query/position.d.ts create mode 100644 types/dom-helpers/query/querySelectorAll.d.ts create mode 100644 types/dom-helpers/query/scrollLeft.d.ts create mode 100644 types/dom-helpers/query/scrollParent.d.ts create mode 100644 types/dom-helpers/query/scrollTop.d.ts create mode 100644 types/dom-helpers/query/width.d.ts create mode 100644 types/dom-helpers/style/getComputedStyle.d.ts create mode 100644 types/dom-helpers/style/index.d.ts create mode 100644 types/dom-helpers/style/removeStyle.d.ts create mode 100644 types/dom-helpers/transition/animate.d.ts create mode 100644 types/dom-helpers/transition/end.d.ts create mode 100644 types/dom-helpers/transition/index.d.ts create mode 100644 types/dom-helpers/transition/properties.d.ts create mode 100644 types/dom-helpers/tsconfig.json create mode 100644 types/dom-helpers/tslint.json create mode 100644 types/dom-helpers/util/requestAnimationFrame.d.ts create mode 100644 types/dom-helpers/util/scrollTo.d.ts create mode 100644 types/dom-helpers/util/scrollbarSize.d.ts diff --git a/types/dom-helpers/activeElement.d.ts b/types/dom-helpers/activeElement.d.ts new file mode 100644 index 0000000000..3a964f0479 --- /dev/null +++ b/types/dom-helpers/activeElement.d.ts @@ -0,0 +1,6 @@ +/** + * Returns focused element safely + */ +declare const activeElement: (doc?: Document) => Element; + +export = activeElement; diff --git a/types/dom-helpers/class/addClass.d.ts b/types/dom-helpers/class/addClass.d.ts new file mode 100644 index 0000000000..5431a9d256 --- /dev/null +++ b/types/dom-helpers/class/addClass.d.ts @@ -0,0 +1,2 @@ +declare const addClass: (element: Element, className: string) => void; +export = addClass; diff --git a/types/dom-helpers/class/hasClass.d.ts b/types/dom-helpers/class/hasClass.d.ts new file mode 100644 index 0000000000..2ec83c8a2f --- /dev/null +++ b/types/dom-helpers/class/hasClass.d.ts @@ -0,0 +1,2 @@ +declare const hasClass: (element: Element, className: string) => boolean; +export = hasClass; diff --git a/types/dom-helpers/class/index.d.ts b/types/dom-helpers/class/index.d.ts new file mode 100644 index 0000000000..24b0dbd1e6 --- /dev/null +++ b/types/dom-helpers/class/index.d.ts @@ -0,0 +1,19 @@ +import * as addClass from "./addClass"; +import * as removeClass from "./removeClass"; +import * as hasClass from "./hasClass"; + +declare const _default: { + addClass: typeof addClass; + removeClass: typeof removeClass; + hasClass: typeof hasClass; +}; + +declare const _export: { + addClass: typeof addClass; + removeClass: typeof removeClass; + hasClass: typeof hasClass; + + default: typeof _export; +}; + +export = _export; diff --git a/types/dom-helpers/class/removeClass.d.ts b/types/dom-helpers/class/removeClass.d.ts new file mode 100644 index 0000000000..a67929344f --- /dev/null +++ b/types/dom-helpers/class/removeClass.d.ts @@ -0,0 +1,2 @@ +declare const removeClass: (element: Element, className: string) => void; +export = removeClass; diff --git a/types/dom-helpers/dom-helpers-tests.ts b/types/dom-helpers/dom-helpers-tests.ts new file mode 100644 index 0000000000..60266ae725 --- /dev/null +++ b/types/dom-helpers/dom-helpers-tests.ts @@ -0,0 +1,105 @@ +import * as helpers from "dom-helpers"; +import * as ownerDocument from "dom-helpers/ownerDocument"; +import * as ownerWindow from "dom-helpers/ownerWindow"; +import * as activeElement from "dom-helpers/activeElement"; + +import * as classes from "dom-helpers/class"; +import * as hasClass from "dom-helpers/class/hasClass"; +import * as removeClass from "dom-helpers/class/removeClass"; +import * as addClass from "dom-helpers/class/addClass"; + +import * as events from "dom-helpers/events"; +import * as on from "dom-helpers/events/on"; +import * as off from "dom-helpers/events/off"; +import * as listen from "dom-helpers/events/listen"; +import * as filter from "dom-helpers/events/filter"; + +import * as query from "dom-helpers/query"; +import * as matches from "dom-helpers/query/matches"; +import * as height from "dom-helpers/query/height"; +import * as width from "dom-helpers/query/width"; +import * as offset from "dom-helpers/query/offset"; +import * as offsetParent from "dom-helpers/query/offsetParent"; +import * as position from "dom-helpers/query/position"; +import * as contains from "dom-helpers/query/contains"; +import * as scrollParent from "dom-helpers/query/scrollParent"; +import * as scrollTop from "dom-helpers/query/scrollTop"; +import * as querySelectorAll from "dom-helpers/query/querySelectorAll"; +import * as closest from "dom-helpers/query/closest"; + +import * as css from "dom-helpers/style"; +import * as getComputedStyle from "dom-helpers/style/getComputedStyle"; +import * as removeStyle from "dom-helpers/style/removeStyle"; + +import * as transition from "dom-helpers/transition"; +import * as end from "dom-helpers/transition/end"; +import * as properties from "dom-helpers/transition/properties"; + +const element = helpers.activeElement() || activeElement(); +const win = + helpers.ownerWindow(element || null || undefined) || + ownerWindow(element || null || undefined); +const doc = helpers.ownerDocument(element) || ownerDocument(element); +const id = helpers.requestAnimationFrame(() => {}); +helpers.requestAnimationFrame.cancel(id); + +const padding: string = css(element, "padding"); +css(element, "padding", 10); +css(element, "padding", "12px"); + +events.on(element, "click", () => {}); +on(element, "click", () => {}); +events.off(element, "click", () => {}, true); +off(element, "click", () => {}, true); +events.listen(element, "click", () => {})(); +listen(element, "click", () => {})(); +events.on(element, "click", filter("div > a", () => {})); +on(element, "click", events.filter("div > a", () => {})); + +classes.addClass(element, "class"); +classes.removeClass(element, "class"); +classes.hasClass(element, "class"); + +addClass(element, "class"); +removeClass(element, "class"); +hasClass(element, "class"); + +const match: boolean = + query.matches(element, ".class") || matches(element, ".class"); +const h: number = query.height(element) || height(element); +const w: number = query.width(element) || width(element); +const _offset: { top: number; left: number; bottom: number; right: number } = + query.offset(element) || offset(element); +const _offsetParent: Element = + query.offsetParent(element) || offsetParent(element); +const _position: { top: number; left: number; bottom: number; right: number } = + query.position(element) || position(element); +const _contains: boolean = + query.contains(element, element) || contains(element, element); +const _scrollParent: Element = + query.scrollParent(element) || scrollParent(element); +const _scrollTop: number = query.scrollTop(element) || scrollTop(element); +query.scrollTop(element, 100); +scrollTop(element, 100); +const _querySelectorAll: HTMLElement[] = + (query.querySelectorAll(element, "*") as HTMLElement[]) || + (querySelectorAll(element, "*") as HTMLElement[]); +const _closest: Element = + query.closest(element, "*", element) || closest(element, "*", element); + +const _getComputedStyle: string = getComputedStyle(element).getPropertyValue( + "padding" +); +removeStyle(element, "padding"); + +transition.end(element, (event) => { + const currentTarget: Element = event.currentTarget; + const target: Element = event.target; +}, 100); + +end(element, (event) => { + const currentTarget: Element = event.currentTarget; + const target: Element = event.target; +}, 100); + +const transform: string = properties.transform; diff --git a/types/dom-helpers/events/filter.d.ts b/types/dom-helpers/events/filter.d.ts new file mode 100644 index 0000000000..fa54287155 --- /dev/null +++ b/types/dom-helpers/events/filter.d.ts @@ -0,0 +1,6 @@ +/** + * Returns a function handler that only fires when the target matches or is contained in the selector + * @example events.on(list, 'click', events.filter('li > a', handler)) + */ +declare const filter: (selector: string, listener: EventListener) => EventListener; +export = filter; diff --git a/types/dom-helpers/events/index.d.ts b/types/dom-helpers/events/index.d.ts new file mode 100644 index 0000000000..fb2e5e89c7 --- /dev/null +++ b/types/dom-helpers/events/index.d.ts @@ -0,0 +1,22 @@ +import * as on from './on'; +import * as off from './off'; +import * as listen from './listen'; +import * as filter from './filter'; + +declare const _default: { + on: typeof on; + off: typeof off; + listen: typeof listen; + filter: typeof filter; +}; + +declare const _export: { + on: typeof on; + off: typeof off; + listen: typeof listen; + filter: typeof filter; + + default: typeof _default; +}; + +export = _export; diff --git a/types/dom-helpers/events/listen.d.ts b/types/dom-helpers/events/listen.d.ts new file mode 100644 index 0000000000..ec12d5c0e3 --- /dev/null +++ b/types/dom-helpers/events/listen.d.ts @@ -0,0 +1,5 @@ +/** + * Wraps on and returns a function that calls off for you + */ +declare const listen: (element: Element, type: string, listener: EventListener, capture?: boolean) => () => void; +export = listen; diff --git a/types/dom-helpers/events/off.d.ts b/types/dom-helpers/events/off.d.ts new file mode 100644 index 0000000000..32699cb8a4 --- /dev/null +++ b/types/dom-helpers/events/off.d.ts @@ -0,0 +1,5 @@ +/** + * Capture is silently ignored in ie8 + */ +declare const off: (element: Element, type: string, listener: EventListener, capture?: boolean) => void; +export = off; diff --git a/types/dom-helpers/events/on.d.ts b/types/dom-helpers/events/on.d.ts new file mode 100644 index 0000000000..2028d70af6 --- /dev/null +++ b/types/dom-helpers/events/on.d.ts @@ -0,0 +1,5 @@ +/** + * Capture is silently ignored in ie8 + */ +declare const on: (element: Element, type: string, listener: EventListener, capture?: boolean) => void; +export = on; diff --git a/types/dom-helpers/index.d.ts b/types/dom-helpers/index.d.ts new file mode 100644 index 0000000000..3215fcc500 --- /dev/null +++ b/types/dom-helpers/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for dom-helpers 3.4 +// Project: https://github.com/react-bootstrap/dom-helpers +// Definitions by: Konstantin Vasiliev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { default as events } from "./events"; +import { default as query } from "./query"; +import * as style from "./style"; +import * as activeElement from "./activeElement"; +import * as ownerDocument from "./ownerDocument"; +import * as ownerWindow from "./ownerWindow"; +import * as requestAnimationFrame from "./util/requestAnimationFrame"; + +declare const _default: typeof events & + typeof query & { + style: typeof style; + activeElement: typeof activeElement; + ownerDocument: typeof ownerDocument; + ownerWindow: typeof ownerWindow; + requestAnimationFrame: typeof requestAnimationFrame; + }; + +declare const _export: { + style: typeof style; + activeElement: typeof activeElement; + ownerDocument: typeof ownerDocument; + ownerWindow: typeof ownerWindow; + requestAnimationFrame: typeof requestAnimationFrame; + + default: typeof _default; +}; + +export = _export; diff --git a/types/dom-helpers/ownerDocument.d.ts b/types/dom-helpers/ownerDocument.d.ts new file mode 100644 index 0000000000..248981141c --- /dev/null +++ b/types/dom-helpers/ownerDocument.d.ts @@ -0,0 +1,6 @@ +/** + * Returns the element's document owner + */ +declare const ownerDocument: (node?: Node | null) => Document; + +export = ownerDocument; diff --git a/types/dom-helpers/ownerWindow.d.ts b/types/dom-helpers/ownerWindow.d.ts new file mode 100644 index 0000000000..f827d3f073 --- /dev/null +++ b/types/dom-helpers/ownerWindow.d.ts @@ -0,0 +1,6 @@ +/** + * Returns the element's document window + */ +declare const ownerWindow: (node?: Node | null) => Window; + +export = ownerWindow; diff --git a/types/dom-helpers/query/closest.d.ts b/types/dom-helpers/query/closest.d.ts new file mode 100644 index 0000000000..5076d3bdf2 --- /dev/null +++ b/types/dom-helpers/query/closest.d.ts @@ -0,0 +1,7 @@ +declare const closest: ( + element: Element, + selector: string, + context: Element +) => Element; + +export = closest; diff --git a/types/dom-helpers/query/contains.d.ts b/types/dom-helpers/query/contains.d.ts new file mode 100644 index 0000000000..d5e03884aa --- /dev/null +++ b/types/dom-helpers/query/contains.d.ts @@ -0,0 +1,2 @@ +declare const contains: (context: Node, node: Node) => boolean; +export = contains; diff --git a/types/dom-helpers/query/height.d.ts b/types/dom-helpers/query/height.d.ts new file mode 100644 index 0000000000..807a3a0782 --- /dev/null +++ b/types/dom-helpers/query/height.d.ts @@ -0,0 +1,2 @@ +declare const height: (element: Element, useClientHeight?: boolean) => number; +export = height; diff --git a/types/dom-helpers/query/index.d.ts b/types/dom-helpers/query/index.d.ts new file mode 100644 index 0000000000..b0dff78ac1 --- /dev/null +++ b/types/dom-helpers/query/index.d.ts @@ -0,0 +1,43 @@ +import * as matches from "./matches"; +import * as height from "./height"; +import * as width from "./width"; +import * as offset from "./offset"; +import * as offsetParent from "./offsetParent"; +import * as position from "./position"; +import * as contains from "./contains"; +import * as scrollParent from "./scrollParent"; +import * as scrollTop from "./scrollTop"; +import * as querySelectorAll from "./querySelectorAll"; +import * as closest from "./closest"; + +declare const _default: { + matches: typeof matches; + height: typeof height; + width: typeof width; + offset: typeof offset; + offsetParent: typeof offsetParent; + position: typeof position; + contains: typeof contains; + scrollParent: typeof scrollParent; + scrollTop: typeof scrollTop; + querySelectorAll: typeof querySelectorAll; + closest: typeof closest; +}; + +declare const _export: { + matches: typeof matches; + height: typeof height; + width: typeof width; + offset: typeof offset; + offsetParent: typeof offsetParent; + position: typeof position; + contains: typeof contains; + scrollParent: typeof scrollParent; + scrollTop: typeof scrollTop; + querySelectorAll: typeof querySelectorAll; + closest: typeof closest; + + default: typeof _default; +}; + +export = _export; diff --git a/types/dom-helpers/query/isWindow.d.ts b/types/dom-helpers/query/isWindow.d.ts new file mode 100644 index 0000000000..e8e0c96534 --- /dev/null +++ b/types/dom-helpers/query/isWindow.d.ts @@ -0,0 +1,2 @@ +declare const isWindow: (node: any) => boolean; +export = isWindow; diff --git a/types/dom-helpers/query/matches.d.ts b/types/dom-helpers/query/matches.d.ts new file mode 100644 index 0000000000..709845bc61 --- /dev/null +++ b/types/dom-helpers/query/matches.d.ts @@ -0,0 +1,5 @@ +/** + * `matches()` polyfill that works in ie8 + */ +declare const matches: (element: Element, selectors: string) => boolean; +export = matches; diff --git a/types/dom-helpers/query/offset.d.ts b/types/dom-helpers/query/offset.d.ts new file mode 100644 index 0000000000..2b41598076 --- /dev/null +++ b/types/dom-helpers/query/offset.d.ts @@ -0,0 +1,11 @@ +declare namespace DomHelpersOffset { + interface DomHelpersRect { + bottom: number; + left: number; + right: number; + top: number; + } +} + +declare const DomHelpersOffset: (element: Element) => DomHelpersOffset.DomHelpersRect; +export = DomHelpersOffset; diff --git a/types/dom-helpers/query/offsetParent.d.ts b/types/dom-helpers/query/offsetParent.d.ts new file mode 100644 index 0000000000..ecdfeb9d71 --- /dev/null +++ b/types/dom-helpers/query/offsetParent.d.ts @@ -0,0 +1,5 @@ +/** + * Returns the parent node that the element is offset from + */ +declare const offsetParent: (element: Element) => Element; +export = offsetParent; diff --git a/types/dom-helpers/query/position.d.ts b/types/dom-helpers/query/position.d.ts new file mode 100644 index 0000000000..5f683f97e1 --- /dev/null +++ b/types/dom-helpers/query/position.d.ts @@ -0,0 +1,7 @@ +import { DomHelpersRect } from "./offset"; +/** + * Return "offset" of the node to its offsetParent, + * optionally you can specify the offset parent if different than the "real" one + */ +declare const position: (element: Element, offsetParent?: Node) => DomHelpersRect; +export = position; diff --git a/types/dom-helpers/query/querySelectorAll.d.ts b/types/dom-helpers/query/querySelectorAll.d.ts new file mode 100644 index 0000000000..21c256adfc --- /dev/null +++ b/types/dom-helpers/query/querySelectorAll.d.ts @@ -0,0 +1,8 @@ +/** + * Optimized qsa, uses `getElementBy{Id|TagName|ClassName}` if it can + */ +declare const querySelectorAll: ( + element: Element, + selector: string +) => Element[]; +export = querySelectorAll; diff --git a/types/dom-helpers/query/scrollLeft.d.ts b/types/dom-helpers/query/scrollLeft.d.ts new file mode 100644 index 0000000000..3a0c0a3fa3 --- /dev/null +++ b/types/dom-helpers/query/scrollLeft.d.ts @@ -0,0 +1,5 @@ +declare function _scrollLeft(element: Element): number; +declare function _scrollLeft(element: Element, value: number): void; + +declare const scrollLeft: typeof _scrollLeft; +export = scrollLeft; diff --git a/types/dom-helpers/query/scrollParent.d.ts b/types/dom-helpers/query/scrollParent.d.ts new file mode 100644 index 0000000000..f104f68bd3 --- /dev/null +++ b/types/dom-helpers/query/scrollParent.d.ts @@ -0,0 +1,2 @@ +declare const scrollParent: (element: Element) => Element; +export = scrollParent; diff --git a/types/dom-helpers/query/scrollTop.d.ts b/types/dom-helpers/query/scrollTop.d.ts new file mode 100644 index 0000000000..d56d9d17e1 --- /dev/null +++ b/types/dom-helpers/query/scrollTop.d.ts @@ -0,0 +1,6 @@ +declare function _scrollTop(element: Element): number; +declare function _scrollTop(element: Element, value: number): void; + +declare const scrollTop: typeof _scrollTop; + +export = scrollTop; diff --git a/types/dom-helpers/query/width.d.ts b/types/dom-helpers/query/width.d.ts new file mode 100644 index 0000000000..4b4fd15bb5 --- /dev/null +++ b/types/dom-helpers/query/width.d.ts @@ -0,0 +1,2 @@ +declare const width: (element: Element, useClientWidth?: boolean) => number; +export = width; diff --git a/types/dom-helpers/style/getComputedStyle.d.ts b/types/dom-helpers/style/getComputedStyle.d.ts new file mode 100644 index 0000000000..c8be2d3976 --- /dev/null +++ b/types/dom-helpers/style/getComputedStyle.d.ts @@ -0,0 +1,4 @@ +declare const getComputedStyle: ( + element: Element +) => { getPropertyValue: (prop: string) => string }; +export = getComputedStyle; diff --git a/types/dom-helpers/style/index.d.ts b/types/dom-helpers/style/index.d.ts new file mode 100644 index 0000000000..2cb8844194 --- /dev/null +++ b/types/dom-helpers/style/index.d.ts @@ -0,0 +1,9 @@ +declare function _style(element: Element, property: string): string; +declare function _style( + element: Element, + property: string | { [key: string]: any }, + value: any +): void; + +declare const style: typeof _style; +export = style; diff --git a/types/dom-helpers/style/removeStyle.d.ts b/types/dom-helpers/style/removeStyle.d.ts new file mode 100644 index 0000000000..4ccdcae438 --- /dev/null +++ b/types/dom-helpers/style/removeStyle.d.ts @@ -0,0 +1,2 @@ +declare const removeStyle: (element: Element, key: string) => void; +export = removeStyle; diff --git a/types/dom-helpers/transition/animate.d.ts b/types/dom-helpers/transition/animate.d.ts new file mode 100644 index 0000000000..9cd71843e5 --- /dev/null +++ b/types/dom-helpers/transition/animate.d.ts @@ -0,0 +1,23 @@ +interface DomHelpersAnimationArgs { + element: Element; + properties: { [key: string]: any }; + duration?: number; + easing?: boolean; + callback?: () => void; +} + +/** + * Programmatically start css transitions + */ +declare function _animate(args: DomHelpersAnimationArgs): { cancel: () => void }; +declare function _animate( + element: Element, + properties: { [key: string]: any }, + duration?: number, + easing?: boolean, + callback?: () => void +): { cancel: () => void }; + +declare const animate: typeof _animate; + +export = animate; diff --git a/types/dom-helpers/transition/end.d.ts b/types/dom-helpers/transition/end.d.ts new file mode 100644 index 0000000000..5b662395e4 --- /dev/null +++ b/types/dom-helpers/transition/end.d.ts @@ -0,0 +1,12 @@ +/** + * Listens for transition end, and ensures that the handler if called + * even if the transition fails to fire its end event. + * Will attempt to read duration from the element, otherwise one can be provided + */ +declare const end: ( + element: T, + handler: (event: { target: T, currentTarget: T }) => void, + duration?: number +) => void; + +export = end; diff --git a/types/dom-helpers/transition/index.d.ts b/types/dom-helpers/transition/index.d.ts new file mode 100644 index 0000000000..28b1ce9eb0 --- /dev/null +++ b/types/dom-helpers/transition/index.d.ts @@ -0,0 +1,16 @@ +import * as end from "./end"; +import * as properties from "./properties"; + +declare const _default: { + end: typeof end; + properties: typeof properties; +}; + +declare const _export: { + end: typeof end; + properties: typeof properties; + + default: typeof _default; +}; + +export = _export; diff --git a/types/dom-helpers/transition/properties.d.ts b/types/dom-helpers/transition/properties.d.ts new file mode 100644 index 0000000000..4049c19982 --- /dev/null +++ b/types/dom-helpers/transition/properties.d.ts @@ -0,0 +1,26 @@ +declare const _default: { + transform: string; + end: string; + property: string; + timing: string; + delay: string; + duration: string; +}; + +declare const _export: { + transform: string; + transitionProperty: string; + transitionTiming: string; + transitionDelay: string; + transitionDuration: string; + transitionEnd: string; + animationName: string; + animationDuration: string; + animationTiming: string; + animationDelay: string; + animationEnd: string; + + default: typeof _default, +}; + +export = _export; diff --git a/types/dom-helpers/tsconfig.json b/types/dom-helpers/tsconfig.json new file mode 100644 index 0000000000..bbaca98dbe --- /dev/null +++ b/types/dom-helpers/tsconfig.json @@ -0,0 +1,60 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "activeElement.d.ts", + "ownerDocument.d.ts", + "ownerWindow.d.ts", + "dom-helpers-tests.ts", + "class/addClass.d.ts", + "class/hasClass.d.ts", + "class/index.d.ts", + "class/removeClass.d.ts", + "events/filter.d.ts", + "events/index.d.ts", + "events/listen.d.ts", + "events/off.d.ts", + "events/on.d.ts", + "query/closest.d.ts", + "query/contains.d.ts", + "query/height.d.ts", + "query/index.d.ts", + "query/isWindow.d.ts", + "query/matches.d.ts", + "query/offset.d.ts", + "query/offsetParent.d.ts", + "query/position.d.ts", + "query/querySelectorAll.d.ts", + "query/scrollLeft.d.ts", + "query/scrollParent.d.ts", + "query/scrollTop.d.ts", + "query/width.d.ts", + "style/getComputedStyle.d.ts", + "style/index.d.ts", + "style/removeStyle.d.ts", + "transition/animate.d.ts", + "transition/end.d.ts", + "transition/index.d.ts", + "transition/properties.d.ts", + "util/requestAnimationFrame.d.ts", + "util/scrollbarSize.d.ts", + "util/scrollTo.d.ts" + ] +} diff --git a/types/dom-helpers/tslint.json b/types/dom-helpers/tslint.json new file mode 100644 index 0000000000..2d469ebdbd --- /dev/null +++ b/types/dom-helpers/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "prefer-declare-function": false + } +} diff --git a/types/dom-helpers/util/requestAnimationFrame.d.ts b/types/dom-helpers/util/requestAnimationFrame.d.ts new file mode 100644 index 0000000000..211fb7486f --- /dev/null +++ b/types/dom-helpers/util/requestAnimationFrame.d.ts @@ -0,0 +1,11 @@ +interface DomHelpersRaf { + /** + * Returns an ID for canceling + */ + (callback: () => void): number; + cancel: (id: number) => void; +} + +declare const requestAnimationFrame: DomHelpersRaf; + +export = requestAnimationFrame; diff --git a/types/dom-helpers/util/scrollTo.d.ts b/types/dom-helpers/util/scrollTo.d.ts new file mode 100644 index 0000000000..b336c1104a --- /dev/null +++ b/types/dom-helpers/util/scrollTo.d.ts @@ -0,0 +1,3 @@ +declare const scrollTo: (element: Element, scrollParent?: Element) => () => void; + +export = scrollTo; diff --git a/types/dom-helpers/util/scrollbarSize.d.ts b/types/dom-helpers/util/scrollbarSize.d.ts new file mode 100644 index 0000000000..67d6c840e2 --- /dev/null +++ b/types/dom-helpers/util/scrollbarSize.d.ts @@ -0,0 +1,6 @@ +/** + * Returns the scrollbar's width size in pixels + */ +declare const scrollbarSize: (recalc?: boolean) => number; + +export = scrollbarSize; From 50e3756d530572a85766b93a8e0b48672d237156 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 28 Nov 2018 17:54:31 +0100 Subject: [PATCH 0097/2268] rename non-node package twitter to twitter-for-web --- types/{twitter => twitter-for-web}/index.d.ts | 0 types/{twitter => twitter-for-web}/tsconfig.json | 0 types/{twitter => twitter-for-web}/tslint.json | 0 types/{twitter => twitter-for-web}/twitter-tests.ts | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename types/{twitter => twitter-for-web}/index.d.ts (100%) rename types/{twitter => twitter-for-web}/tsconfig.json (100%) rename types/{twitter => twitter-for-web}/tslint.json (100%) rename types/{twitter => twitter-for-web}/twitter-tests.ts (100%) diff --git a/types/twitter/index.d.ts b/types/twitter-for-web/index.d.ts similarity index 100% rename from types/twitter/index.d.ts rename to types/twitter-for-web/index.d.ts diff --git a/types/twitter/tsconfig.json b/types/twitter-for-web/tsconfig.json similarity index 100% rename from types/twitter/tsconfig.json rename to types/twitter-for-web/tsconfig.json diff --git a/types/twitter/tslint.json b/types/twitter-for-web/tslint.json similarity index 100% rename from types/twitter/tslint.json rename to types/twitter-for-web/tslint.json diff --git a/types/twitter/twitter-tests.ts b/types/twitter-for-web/twitter-tests.ts similarity index 100% rename from types/twitter/twitter-tests.ts rename to types/twitter-for-web/twitter-tests.ts From f226675f0576e0253c1aaf19ed7395aae27a5961 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 28 Nov 2018 18:04:33 +0100 Subject: [PATCH 0098/2268] Add types for twitter, fix twitter-for-web --- types/twitter-for-web/tsconfig.json | 4 +- ...tter-tests.ts => twitter-for-web-tests.ts} | 0 types/twitter/index.d.ts | 69 ++++++++++++++++++ types/twitter/tsconfig.json | 23 ++++++ types/twitter/tslint.json | 1 + types/twitter/twitter-tests.ts | 70 +++++++++++++++++++ 6 files changed, 165 insertions(+), 2 deletions(-) rename types/twitter-for-web/{twitter-tests.ts => twitter-for-web-tests.ts} (100%) create mode 100644 types/twitter/index.d.ts create mode 100644 types/twitter/tsconfig.json create mode 100644 types/twitter/tslint.json create mode 100644 types/twitter/twitter-tests.ts diff --git a/types/twitter-for-web/tsconfig.json b/types/twitter-for-web/tsconfig.json index f57f1c2156..4d4c648e4c 100644 --- a/types/twitter-for-web/tsconfig.json +++ b/types/twitter-for-web/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "twitter-tests.ts" + "twitter-for-web-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/twitter-for-web/twitter-tests.ts b/types/twitter-for-web/twitter-for-web-tests.ts similarity index 100% rename from types/twitter-for-web/twitter-tests.ts rename to types/twitter-for-web/twitter-for-web-tests.ts diff --git a/types/twitter/index.d.ts b/types/twitter/index.d.ts new file mode 100644 index 0000000000..dd962eb2cf --- /dev/null +++ b/types/twitter/index.d.ts @@ -0,0 +1,69 @@ +// Type definitions for twitter 1.7 +// Project: https://github.com/desmondmorris/node-twitter +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +import request = require('request'); +import { EventEmitter } from 'events'; + +export = Twitter; + +declare class Twitter { + readonly VERSION: string; + readonly allow_promise: boolean; + readonly request: typeof request; + + constructor(options: Twitter.AccessTokenOptions | Twitter.BearerTokenOptions); + + get(path: string, params: Twitter.RequestParams, callback: Twitter.Callback): void; + get(path: string, callback: Twitter.Callback): void; + get(path: string, params?: Twitter.RequestParams): Promise; + + post(path: string, params: Twitter.RequestParams, callback: Twitter.Callback): void; + post(path: string, callback: Twitter.Callback): void; + post(path: string, params?: Twitter.RequestParams): Promise; + + stream( + method: 'user' | 'site' | string, + params: { [key: string]: any }, + callback: (stream: EventEmitter) => void + ): void; + stream(method: 'user' | 'site' | string, callback: (stream: EventEmitter) => void): void; + stream(method: 'user' | 'site' | string, params?: { [key: string]: any }): EventEmitter; +} + +declare namespace Twitter { + interface Options { + consumer_key: string; + consumer_secret: string; + rest_base?: string; + stream_base?: string; + user_stream_base?: string; + site_stream_base?: string; + media_base?: string; + request_options?: request.CoreOptions; + } + + interface AccessTokenOptions extends Options { + access_token_key: string; + access_token_secret: string; + } + + interface BearerTokenOptions extends Options { + bearer_token: string; + } + + type Callback = (error: any, data: ResponseData, response: request.Response) => void; + + interface RequestParams { + [key: string]: any; + base?: string; + } + + interface ResponseData { + [key: string]: any; + } +} diff --git a/types/twitter/tsconfig.json b/types/twitter/tsconfig.json new file mode 100644 index 0000000000..919ff67515 --- /dev/null +++ b/types/twitter/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", + "twitter-tests.ts" + ] +} diff --git a/types/twitter/tslint.json b/types/twitter/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/twitter/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/twitter/twitter-tests.ts b/types/twitter/twitter-tests.ts new file mode 100644 index 0000000000..1d96ad760a --- /dev/null +++ b/types/twitter/twitter-tests.ts @@ -0,0 +1,70 @@ +import Twitter = require('twitter'); +import { EventEmitter } from 'stream'; + +let client = new Twitter({ + consumer_key: '', + consumer_secret: '', + access_token_key: '', + access_token_secret: '', + site_stream_base: '', +}); +client = new Twitter({ + consumer_key: '', + consumer_secret: '', + bearer_token: '', + site_stream_base: '', +}); + +client.get('favorites/list', (error, tweets, response) => { + if (error) throw error; + // $ExpectType ResponseData + tweets; + // $ExpectType Response + response; +}); + +client.post('statuses/update', { status: 'I Love Twitter' }, (error, tweet, response) => { + if (error) throw error; + // $ExpectType ResponseData + tweet; + // $ExpectType Response + response; +}); + +client.post('statuses/update').then(tweet => { + // $ExpectType ResponseData + tweet; +}); + +client.post('statuses/update', { status: 'I Love Twitter' }).then(tweet => { + // $ExpectType ResponseData + tweet; +}); + +let stream: EventEmitter = client.stream('statuses/filter', { track: 'javascript' }); +stream = client.stream('statuses/filter'); + +stream.on('data', event => { + console.log(event && event.text); +}); + +stream.on('error', error => { + throw error; +}); + +client.stream('statuses/filter', { track: 'javascript' }, stream => { + // $ExpectType EventEmitter + stream; + + stream.on('data', (event: any) => { + console.log(event && event.text); + }); + + stream.on('error', (error: any) => { + throw error; + }); +}); +client.stream('statuses/filter', stream => { + // $ExpectType EventEmitter + stream; +}); From 850c8337b5a1ccf88a967a69aad34959fcdfaa2a Mon Sep 17 00:00:00 2001 From: Kamontat Chantrachirathumrong Date: Wed, 28 Nov 2018 22:57:47 +0100 Subject: [PATCH 0099/2268] [improve] Improve type of prompts --- types/prompts/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index bfb08a8bd7..0db58ea435 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -52,12 +52,12 @@ declare namespace prompts { } interface Options { - onSubmit: (prompt: PromptObject, answer: any, answers: any[]) => void; - onCancel: (prompt: PromptObject, answers: any) => void; + onSubmit?: (prompt: PromptObject, answer: any, answers: any[]) => void; + onCancel?: (prompt: PromptObject, answers: any) => void; } interface PromptObject { - type: ValueOrFunc | Falsy; + type: ValueOrFunc | Falsy; name: ValueOrFunc; message?: ValueOrFunc; initial?: string | number | boolean; @@ -89,5 +89,7 @@ declare namespace prompts { type Falsy = false | null | undefined; + type PromptType = "text" | "password" | "invisible" | "number" | "confirm" | "list" | "toggle" | "select" | "multiselect" | "autocomplete" | Falsy + type ValueOrFunc = T | PrevCaller; } From 2100292089ba9dee0667b756c02774108b5f696e Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:07:23 +0100 Subject: [PATCH 0100/2268] [socket.io] add overload for origins method As seen in https://socket.io/docs/server-api/#server-origins-fn --- types/socket.io/index.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index f5e6c5fd00..d32fcaade6 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -143,6 +143,17 @@ declare namespace SocketIO { origins( v: string|string[] ): Server; /** + * Provides a function taking two arguments origin:String + * and callback(error, success), where success is a boolean + * value indicating whether origin is allowed or not. If + * success is set to false, error must be provided as a string + * value that will be appended to the server response, e.g. “Origin not allowed”. + * @param fn The function that will be called to check the origin + * return This Server + */ + origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; + + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From 70368743cc57f09eb5496e417014b260e2517418 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:10:45 +0100 Subject: [PATCH 0101/2268] fixed indentation --- types/socket.io/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index d32fcaade6..792fb85167 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -144,10 +144,10 @@ declare namespace SocketIO { /** * Provides a function taking two arguments origin:String - * and callback(error, success), where success is a boolean - * value indicating whether origin is allowed or not. If - * success is set to false, error must be provided as a string - * value that will be appended to the server response, e.g. “Origin not allowed”. + * and callback(error, success), where success is a boolean + * value indicating whether origin is allowed or not. If + * success is set to false, error must be provided as a string + * value that will be appended to the server response, e.g. “Origin not allowed”. * @param fn The function that will be called to check the origin * return This Server */ From 8cdfef9948972883fe751a3fcb2c5d0badc29a76 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:11:28 +0100 Subject: [PATCH 0102/2268] fixed indentation again --- types/socket.io/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index 792fb85167..1a2fb802e6 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -153,7 +153,7 @@ declare namespace SocketIO { */ origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; - /** + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From b3461ed26b0f4c6bc3d99fa4d1919eba4635a27d Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 29 Nov 2018 21:12:16 +0100 Subject: [PATCH 0103/2268] and fixed indentation once more --- types/socket.io/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/socket.io/index.d.ts b/types/socket.io/index.d.ts index 1a2fb802e6..e0abb6e972 100644 --- a/types/socket.io/index.d.ts +++ b/types/socket.io/index.d.ts @@ -153,7 +153,7 @@ declare namespace SocketIO { */ origins( fn: ( origin: string, callback: ( error: string | null, success: boolean ) => void ) => void ): Server; - /** + /** * Attaches socket.io to a server * @param srv The http.Server that we want to attach to * @param opts An optional parameters object From 8324b632a330fb669d3ee5b7440002d26ec4a266 Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Fri, 30 Nov 2018 13:06:31 +0100 Subject: [PATCH 0104/2268] Adding missing inputIconPosition to interface DateRangePickerShape --- types/react-dates/index.d.ts | 731 +++++++++++++++++++---------------- 1 file changed, 401 insertions(+), 330 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index 05058b2ca9..911dfc75c8 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -1,14 +1,14 @@ // Type definitions for react-dates v17.1.0 // Project: https://github.com/airbnb/react-dates -// Definitions by: Artur Ampilogov +// Definitions by: Artur Ampilogov // Nathan Holland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md - -import * as React from 'react'; -import * as moment from 'moment'; + +import * as React from "react"; +import * as moment from "moment"; export = ReactDates; @@ -18,451 +18,513 @@ declare namespace momentPropTypes { type momentDurationObj = any; } - declare namespace ReactDates { - // SHAPES + // SHAPES // // shapes/AnchorDirectionShape.js - type AnchorDirectionShape = 'left' | 'right'; + type AnchorDirectionShape = "left" | "right"; // shapes/CalendarInfoPositionShape.js - type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after'; + type CalendarInfoPositionShape = "top" | "bottom" | "before" | "after"; - // shapes/DateRangePickerShape.js interface DateRangePickerShape { // required props for a functional interactive DateRangePicker - startDate: momentPropTypes.momentObj | null, - startDateId: string, - endDate: momentPropTypes.momentObj | null, - endDateId: string, - focusedInput: FocusedInputShape | null, + startDate: momentPropTypes.momentObj | null; + startDateId: string; + endDate: momentPropTypes.momentObj | null; + endDateId: string; + focusedInput: FocusedInputShape | null; - onDatesChange: (arg: { - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null - }) => void, - onFocusChange: (arg: FocusedInputShape | null) => void, - - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + onDatesChange: ( + arg: { + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + } + ) => void; + onFocusChange: (arg: FocusedInputShape | null) => void; + + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; // input related props - startDatePlaceholderText?: string, - endDatePlaceholderText?: string, - disabled?: DisabledShape, - required?: boolean, - readOnly?: boolean, - screenReaderInputMessage?: string, - showClearDates?: boolean, - showDefaultInputIcon?: boolean, - customInputIcon?: string | JSX.Element, - customArrowIcon?: string | JSX.Element, - customCloseIcon?: string | JSX.Element, - noBorder?: boolean, - block?: boolean, - small?: boolean, - regular?: boolean, - keepFocusOnInput?: boolean, + startDatePlaceholderText?: string; + endDatePlaceholderText?: string; + disabled?: DisabledShape; + required?: boolean; + readOnly?: boolean; + screenReaderInputMessage?: string; + showClearDates?: boolean; + showDefaultInputIcon?: boolean; + inputIconPosition?: IconPositionShape; + customInputIcon?: string | JSX.Element; + customArrowIcon?: string | JSX.Element; + customCloseIcon?: string | JSX.Element; + noBorder?: boolean; + block?: boolean; + small?: boolean; + regular?: boolean; + keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - orientation?: OrientationShape, - anchorDirection?: AnchorDirectionShape, - openDirection?: OpenDirectionShape, - horizontalMargin?: number, - withPortal?: boolean, - withFullScreenPortal?: boolean, - appendToBody?: boolean, - disableScroll?: boolean, - daySize?: number, - isRTL?: boolean, - firstDayOfWeek?: DayOfWeekShape, - initialVisibleMonth?: () => momentPropTypes.momentObj, - numberOfMonths?: number, - keepOpenOnDateSelect?: boolean, - reopenPickerOnClearDates?: boolean, - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, - hideKeyboardShortcutsPanel?: boolean, - verticalHeight?: number, - transitionDuration?: number, - verticalSpacing?: number, + ) => string | JSX.Element; + orientation?: OrientationShape; + anchorDirection?: AnchorDirectionShape; + openDirection?: OpenDirectionShape; + horizontalMargin?: number; + withPortal?: boolean; + withFullScreenPortal?: boolean; + appendToBody?: boolean; + disableScroll?: boolean; + daySize?: number; + isRTL?: boolean; + firstDayOfWeek?: DayOfWeekShape; + initialVisibleMonth?: () => momentPropTypes.momentObj; + numberOfMonths?: number; + keepOpenOnDateSelect?: boolean; + reopenPickerOnClearDates?: boolean; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; + hideKeyboardShortcutsPanel?: boolean; + verticalHeight?: number; + transitionDuration?: number; + verticalSpacing?: number; // navigation related props - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; // day presentation and interaction related props - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - minimumNights?: number, - enableOutsideDays?: boolean, - isDayBlocked?: (day: any) => boolean, - isOutsideRange?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, - + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + minimumNights?: number; + enableOutsideDays?: boolean; + isDayBlocked?: (day: any) => boolean; + isOutsideRange?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; // internationalization props - displayFormat?: (string | (() => string)), - monthFormat?: string, - weekDayFormat?: string, - phrases?: DateRangePickerPhrases, - dayAriaLabelFormat?: string + displayFormat?: string | (() => string); + monthFormat?: string; + weekDayFormat?: string; + phrases?: DateRangePickerPhrases; + dayAriaLabelFormat?: string; } // shapes/DayOfWeekShape.js type DayOfWeekShape = 0 | 1 | 2 | 3 | 4 | 5 | 6; // shapes/DisabledShape.js - type DisabledShape = boolean | 'startDate' | 'endDate'; + type DisabledShape = boolean | "startDate" | "endDate"; // shapes/FocusedInputShape.js - type FocusedInputShape = 'startDate' | 'endDate'; + type FocusedInputShape = "startDate" | "endDate"; // shape/IconPositionShape.js - type IconPositionShape = 'before' | 'after'; + type IconPositionShape = "before" | "after"; // type/OpenDirectionShape.js - type OpenDirectionShape = 'down' | 'up'; + type OpenDirectionShape = "down" | "up"; // shpae/OrientationShape.js - type OrientationShape = 'horizontal' | 'vertical'; + type OrientationShape = "horizontal" | "vertical"; // shape/ScrollableOrientationShape.js - type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; - + type ScrollableOrientationShape = + | "horizontal" + | "vertical" + | "verticalScrollable"; // shapes/SingleDatePickerShape.js interface SingleDatePickerShape { - id: string, + id: string; // required props for a functional interactive SingleDatePicker - date: momentPropTypes.momentObj | null, - focused: boolean, - - onDateChange: (date: momentPropTypes.momentObj | null) => void, - onFocusChange: (arg: { focused: boolean | null }) => void, - + date: momentPropTypes.momentObj | null; + focused: boolean; + + onDateChange: (date: momentPropTypes.momentObj | null) => void; + onFocusChange: (arg: { focused: boolean | null }) => void; + // input related props - placeholder?: string, - disabled?: boolean, - required?: boolean, - readOnly?: boolean, - screenReaderInputMessage?: string, - showClearDate?: boolean, - customCloseIcon?: string | JSX.Element, - showDefaultInputIcon?: boolean, - inputIconPosition?: IconPositionShape, - customInputIcon?: string | JSX.Element, - noBorder?: boolean, - block?: boolean, - small?: boolean, - regular?: boolean, - verticalSpacing?: number, - keepFocusOnInput?: boolean, + placeholder?: string; + disabled?: boolean; + required?: boolean; + readOnly?: boolean; + screenReaderInputMessage?: string; + showClearDate?: boolean; + customCloseIcon?: string | JSX.Element; + showDefaultInputIcon?: boolean; + inputIconPosition?: IconPositionShape; + customInputIcon?: string | JSX.Element; + noBorder?: boolean; + block?: boolean; + small?: boolean; + regular?: boolean; + verticalSpacing?: number; + keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - orientation?: OrientationShape, - anchorDirection?: AnchorDirectionShape, - openDirection?: OpenDirectionShape, - horizontalMargin?: number, - withPortal?: boolean, - withFullScreenPortal?: boolean, - appendToBody?: boolean, - disableScroll?: boolean, - initialVisibleMonth?: () => momentPropTypes.momentObj, - firstDayOfWeek?: DayOfWeekShape, - numberOfMonths?: number, - keepOpenOnDateSelect?: boolean, - reopenPickerOnClearDates?: boolean, - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, - hideKeyboardShortcutsPanel?: boolean, - daySize?: number, - isRTL?: boolean, - verticalHeight?: number | null, - transitionDuration?: number, + ) => string | JSX.Element; + orientation?: OrientationShape; + anchorDirection?: AnchorDirectionShape; + openDirection?: OpenDirectionShape; + horizontalMargin?: number; + withPortal?: boolean; + withFullScreenPortal?: boolean; + appendToBody?: boolean; + disableScroll?: boolean; + initialVisibleMonth?: () => momentPropTypes.momentObj; + firstDayOfWeek?: DayOfWeekShape; + numberOfMonths?: number; + keepOpenOnDateSelect?: boolean; + reopenPickerOnClearDates?: boolean; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; + hideKeyboardShortcutsPanel?: boolean; + daySize?: number; + isRTL?: boolean; + verticalHeight?: number | null; + transitionDuration?: number; // navigation related props - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; // day presentation and interaction related props - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - enableOutsideDays?: boolean, - isDayBlocked?: (day: any) => boolean, - isOutsideRange?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + enableOutsideDays?: boolean; + isDayBlocked?: (day: any) => boolean; + isOutsideRange?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; // internationalization props - displayFormat?: (string | (() => string)), - monthFormat?: string, - weekDayFormat?: string, - phrases?: SingleDatePickerPhrases, - dayAriaLabelFormat?: string, + displayFormat?: string | (() => string); + monthFormat?: string; + weekDayFormat?: string; + phrases?: SingleDatePickerPhrases; + dayAriaLabelFormat?: string; } // PHRASES // // defaultPhrases.js type DateRangePickerPhrases = { - calendarLabel?: string, - closeDatePicker?: string, - clearDates?: string, - focusStartDate?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - keyboardNavigationInstructions?: string, - chooseAvailableStartDate?: (date: string) => string, - chooseAvailableEndDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string + calendarLabel?: string; + closeDatePicker?: string; + clearDates?: string; + focusStartDate?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + keyboardNavigationInstructions?: string; + chooseAvailableStartDate?: (date: string) => string; + chooseAvailableEndDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type DateRangePickerInputPhrases = { - focusStartDate?: string, - clearDates?: string, - keyboardNavigationInstructions?: string, - } + focusStartDate?: string; + clearDates?: string; + keyboardNavigationInstructions?: string; + }; // defaultPhrases.js - type SingleDatePickerPhrases = { - calendarLabel?: string, - closeDatePicker?: string, - clearDate?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - keyboardNavigationInstructions?: string, - chooseAvailableDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string, + type SingleDatePickerPhrases = { + calendarLabel?: string; + closeDatePicker?: string; + clearDate?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + keyboardNavigationInstructions?: string; + chooseAvailableDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type SingleDatePickerInputPhrases = { - clearDate?: string, - keyboardNavigationInstructions?: string, - } + clearDate?: string; + keyboardNavigationInstructions?: string; + }; // defaultPhrases.js type DayPickerPhrases = { - calendarLabel?: string, - jumpToPrevMonth?: string, - jumpToNextMonth?: string, - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, - chooseAvailableStartDate?: (date: string) => string, - chooseAvailableEndDate?: (date: string) => string, - chooseAvailableDate?: (date: string) => string, - dateIsUnavailable?: (date: string) => string, - dateIsSelected?: (date: string) => string, + calendarLabel?: string; + jumpToPrevMonth?: string; + jumpToNextMonth?: string; + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; + chooseAvailableStartDate?: (date: string) => string; + chooseAvailableEndDate?: (date: string) => string; + chooseAvailableDate?: (date: string) => string; + dateIsUnavailable?: (date: string) => string; + dateIsSelected?: (date: string) => string; }; // defaultPhrases.js type DayPickerKeyboardShortcutsPhrases = { - keyboardShortcuts?: string, - showKeyboardShortcutsPanel?: string, - hideKeyboardShortcutsPanel?: string, - openThisPanel?: string, - enterKey?: string, - leftArrowRightArrow?: string, - upArrowDownArrow?: string, - pageUpPageDown?: string, - homeEnd?: string, - escape?: string, - questionMark?: string, - selectFocusedDate?: string, - moveFocusByOneDay?: string, - moveFocusByOneWeek?: string, - moveFocusByOneMonth?: string, - moveFocustoStartAndEndOfWeek?: string, - returnFocusToInput?: string, + keyboardShortcuts?: string; + showKeyboardShortcutsPanel?: string; + hideKeyboardShortcutsPanel?: string; + openThisPanel?: string; + enterKey?: string; + leftArrowRightArrow?: string; + upArrowDownArrow?: string; + pageUpPageDown?: string; + homeEnd?: string; + escape?: string; + questionMark?: string; + selectFocusedDate?: string; + moveFocusByOneDay?: string; + moveFocusByOneWeek?: string; + moveFocusByOneMonth?: string; + moveFocustoStartAndEndOfWeek?: string; + returnFocusToInput?: string; }; // defaultPhrases.js type DayPickerNavigationPhrases = { - jumpToPrevMonth?: string, - jumpToNextMonth?: string, + jumpToPrevMonth?: string; + jumpToNextMonth?: string; }; - + // defaultPhrases.js type CalendarDayPhrases = { - chooseAvailableDate: (date: string) => string, - dateIsUnavailable: (date: string) => string, - dateIsSelected: (date: string) => string, + chooseAvailableDate: (date: string) => string; + dateIsUnavailable: (date: string) => string; + dateIsSelected: (date: string) => string; }; // COMPONENTS - // + // // components/DateRangePicker.js type DateRangePicker = React.ClassicComponentClass; var DateRangePicker: React.ClassicComponentClass; // components/DayPickerRangeController.jsx - interface DayPickerRangeControllerShape extends DayPickerShape{ + interface DayPickerRangeControllerShape extends DayPickerShape { // REQUIRED props - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null, - onDatesChange: (arg: { - startDate: momentPropTypes.momentObj | null, - endDate: momentPropTypes.momentObj | null - } - ) => void, - focusedInput: FocusedInputShape, - onFocusChange: (arg: FocusedInputShape | null) => void, + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + onDatesChange: ( + arg: { + startDate: momentPropTypes.momentObj | null; + endDate: momentPropTypes.momentObj | null; + } + ) => void; + focusedInput: FocusedInputShape; + onFocusChange: (arg: FocusedInputShape | null) => void; - startDateOffset?: (day: any) => any, - endDateOffset?: (day: any) => any, + startDateOffset?: (day: any) => any; + endDateOffset?: (day: any) => any; - onClose?: (final: { startDate: momentPropTypes.momentObj, endDate: momentPropTypes.momentObj }) => void, + onClose?: ( + final: { + startDate: momentPropTypes.momentObj; + endDate: momentPropTypes.momentObj; + } + ) => void; - keepOpenOnDateSelect?: boolean, - minimumNights?: number, - disabled?: DisabledShape, - isOutsideRange?: (day: any) => boolean, - isDayBlocked?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + keepOpenOnDateSelect?: boolean; + minimumNights?: number; + disabled?: DisabledShape; + isOutsideRange?: (day: any) => boolean; + isDayBlocked?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; } - type DayPickerRangeController = React.ClassicComponentClass; - var DayPickerRangeController: React.ClassicComponentClass; + type DayPickerRangeController = React.ClassicComponentClass< + DayPickerRangeControllerShape + >; + var DayPickerRangeController: React.ClassicComponentClass< + DayPickerRangeControllerShape + >; // components/DayPickerShape.jsx interface DayPickerShape { - renderMonthText?: (day: momentPropTypes.momentObj) => (string | JSX.Element), + renderMonthText?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; renderMonthElement?: ( props: { - month: momentPropTypes.momentObj; - onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; - onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; + month: momentPropTypes.momentObj; + onMonthSelect: ( + currentMonth: momentPropTypes.momentObj, + newMonthVal: string + ) => void; + onYearSelect: ( + currentMonth: momentPropTypes.momentObj, + newYearVal: string + ) => void; } - ) => string | JSX.Element, - enableOutsideDays?: boolean, - numberOfMonths?: number, - orientation?: ScrollableOrientationShape, - withPortal?: boolean, - initialVisibleMonth?: () => momentPropTypes.momentObj, - firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6, - hideKeyboardShortcutsPanel?: boolean, - daySize?: number, - verticalHeight?: number, - noBorder?: boolean, - transitionDuration?: number, + ) => string | JSX.Element; + enableOutsideDays?: boolean; + numberOfMonths?: number; + orientation?: ScrollableOrientationShape; + withPortal?: boolean; + initialVisibleMonth?: () => momentPropTypes.momentObj; + firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; + hideKeyboardShortcutsPanel?: boolean; + daySize?: number; + verticalHeight?: number; + noBorder?: boolean; + transitionDuration?: number; - navPrev?: string | JSX.Element, - navNext?: string | JSX.Element, + navPrev?: string | JSX.Element; + navNext?: string | JSX.Element; - onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void, - onOutsideClick?: (e: any) => void, - renderCalendarDay?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderDayContents?: (day: momentPropTypes.momentObj) => (string | JSX.Element), - renderCalendarInfo?: () => (string | JSX.Element), - calendarInfoPosition?: CalendarInfoPositionShape, + onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; + onOutsideClick?: (e: any) => void; + renderCalendarDay?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderDayContents?: ( + day: momentPropTypes.momentObj + ) => string | JSX.Element; + renderCalendarInfo?: () => string | JSX.Element; + calendarInfoPosition?: CalendarInfoPositionShape; // accessibility - onBlur?: () => void, - isFocused?: boolean, - showKeyboardShortcuts?: boolean, + onBlur?: () => void; + isFocused?: boolean; + showKeyboardShortcuts?: boolean; // i18n - monthFormat?: string, - weekDayFormat?: string, - phrases?: SingleDatePickerPhrases, - dayAriaLabelFormat?: string, + monthFormat?: string; + weekDayFormat?: string; + phrases?: SingleDatePickerPhrases; + dayAriaLabelFormat?: string; - isRTL?: boolean + isRTL?: boolean; } // components/DayPickerSingleDateController.jsx interface DayPickerSingleDateControllerShape extends DayPickerShape { - date: momentPropTypes.momentObj | null, - onDateChange: (date: momentPropTypes.momentObj | null) => void, - focused: boolean, - onFocusChange: (arg: { focused: boolean | null }) => void, + date: momentPropTypes.momentObj | null; + onDateChange: (date: momentPropTypes.momentObj | null) => void; + focused: boolean; + onFocusChange: (arg: { focused: boolean | null }) => void; - onClose?: (final: { date: momentPropTypes.momentObj }) => void, + onClose?: (final: { date: momentPropTypes.momentObj }) => void; - keepOpenOnDateSelect?: boolean, - isOutsideRange?: (day: any) => boolean, - isDayBlocked?: (day: any) => boolean, - isDayHighlighted?: (day: any) => boolean, + keepOpenOnDateSelect?: boolean; + isOutsideRange?: (day: any) => boolean; + isDayBlocked?: (day: any) => boolean; + isDayHighlighted?: (day: any) => boolean; } - type DayPickerSingleDateController = React.ClassicComponentClass; - var DayPickerSingleDateController: React.ClassicComponentClass; + type DayPickerSingleDateController = React.ClassicComponentClass< + DayPickerSingleDateControllerShape + >; + var DayPickerSingleDateController: React.ClassicComponentClass< + DayPickerSingleDateControllerShape + >; // components/SingleDatePicker.js type SingleDatePicker = React.ClassicComponentClass; @@ -479,9 +541,18 @@ declare namespace ReactDates { // utils/isSameDay.js var isSameDay: (a: moment.Moment, b: moment.Moment) => boolean; // utils/toISODateString.js - var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; + var toISODateString: ( + date: moment.MomentInput, + currentFormat: moment.MomentFormatSpecification + ) => string | null; // utils/toLocalizedDateString.js - var toLocalizedDateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; + var toLocalizedDateString: ( + date: moment.MomentInput, + currentFormat: moment.MomentFormatSpecification + ) => string | null; // utils/toMomentObject.js - var toMomentObject: (dateString: moment.MomentInput, customFormat: moment.MomentFormatSpecification) => moment.Moment | null; + var toMomentObject: ( + dateString: moment.MomentInput, + customFormat: moment.MomentFormatSpecification + ) => moment.Moment | null; } From fe68a448fbefa2874d3cc2cf5890204016cb179e Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Fri, 30 Nov 2018 13:16:38 +0100 Subject: [PATCH 0105/2268] Adding missing inputIconPosition to interface DateRangePickerShape --adjust code styling --- types/react-dates/index.d.ts | 110 ++++++++++------------------------- 1 file changed, 30 insertions(+), 80 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index 911dfc75c8..5596dbef42 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -7,8 +7,8 @@ // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md -import * as React from "react"; -import * as moment from "moment"; +import * as React from 'react'; +import * as moment from 'moment'; export = ReactDates; @@ -22,10 +22,10 @@ declare namespace ReactDates { // SHAPES // // shapes/AnchorDirectionShape.js - type AnchorDirectionShape = "left" | "right"; + type AnchorDirectionShape = 'left' | 'right'; // shapes/CalendarInfoPositionShape.js - type CalendarInfoPositionShape = "top" | "bottom" | "before" | "after"; + type CalendarInfoPositionShape = 'top' | 'bottom' | 'before' | 'after'; // shapes/DateRangePickerShape.js interface DateRangePickerShape { @@ -71,20 +71,12 @@ declare namespace ReactDates { keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; orientation?: OrientationShape; @@ -116,12 +108,8 @@ declare namespace ReactDates { onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; // day presentation and interaction related props - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; minimumNights?: number; enableOutsideDays?: boolean; isDayBlocked?: (day: any) => boolean; @@ -140,25 +128,22 @@ declare namespace ReactDates { type DayOfWeekShape = 0 | 1 | 2 | 3 | 4 | 5 | 6; // shapes/DisabledShape.js - type DisabledShape = boolean | "startDate" | "endDate"; + type DisabledShape = boolean | 'startDate' | 'endDate'; // shapes/FocusedInputShape.js - type FocusedInputShape = "startDate" | "endDate"; + type FocusedInputShape = 'startDate' | 'endDate'; // shape/IconPositionShape.js - type IconPositionShape = "before" | "after"; + type IconPositionShape = 'before' | 'after'; // type/OpenDirectionShape.js - type OpenDirectionShape = "down" | "up"; + type OpenDirectionShape = 'down' | 'up'; // shpae/OrientationShape.js - type OrientationShape = "horizontal" | "vertical"; + type OrientationShape = 'horizontal' | 'vertical'; // shape/ScrollableOrientationShape.js - type ScrollableOrientationShape = - | "horizontal" - | "vertical" - | "verticalScrollable"; + type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable'; // shapes/SingleDatePickerShape.js interface SingleDatePickerShape { @@ -190,20 +175,12 @@ declare namespace ReactDates { keepFocusOnInput?: boolean; // calendar presentation and interaction related props - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; orientation?: OrientationShape; @@ -240,12 +217,8 @@ declare namespace ReactDates { ) => void; // day presentation and interaction related props - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; enableOutsideDays?: boolean; isDayBlocked?: (day: any) => boolean; isOutsideRange?: (day: any) => boolean; @@ -438,29 +411,17 @@ declare namespace ReactDates { isDayHighlighted?: (day: any) => boolean; } - type DayPickerRangeController = React.ClassicComponentClass< - DayPickerRangeControllerShape - >; - var DayPickerRangeController: React.ClassicComponentClass< - DayPickerRangeControllerShape - >; + type DayPickerRangeController = React.ClassicComponentClass; + var DayPickerRangeController: React.ClassicComponentClass; // components/DayPickerShape.jsx interface DayPickerShape { - renderMonthText?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderMonthText?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderMonthElement?: ( props: { month: momentPropTypes.momentObj; - onMonthSelect: ( - currentMonth: momentPropTypes.momentObj, - newMonthVal: string - ) => void; - onYearSelect: ( - currentMonth: momentPropTypes.momentObj, - newYearVal: string - ) => void; + onMonthSelect: (currentMonth: momentPropTypes.momentObj, newMonthVal: string) => void; + onYearSelect: (currentMonth: momentPropTypes.momentObj, newYearVal: string) => void; } ) => string | JSX.Element; enableOutsideDays?: boolean; @@ -481,12 +442,8 @@ declare namespace ReactDates { onPrevMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; onNextMonthClick?: (newCurrentMonth: momentPropTypes.momentObj) => void; onOutsideClick?: (e: any) => void; - renderCalendarDay?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; - renderDayContents?: ( - day: momentPropTypes.momentObj - ) => string | JSX.Element; + renderCalendarDay?: (day: momentPropTypes.momentObj) => string | JSX.Element; + renderDayContents?: (day: momentPropTypes.momentObj) => string | JSX.Element; renderCalendarInfo?: () => string | JSX.Element; calendarInfoPosition?: CalendarInfoPositionShape; @@ -519,12 +476,8 @@ declare namespace ReactDates { isDayHighlighted?: (day: any) => boolean; } - type DayPickerSingleDateController = React.ClassicComponentClass< - DayPickerSingleDateControllerShape - >; - var DayPickerSingleDateController: React.ClassicComponentClass< - DayPickerSingleDateControllerShape - >; + type DayPickerSingleDateController = React.ClassicComponentClass; + var DayPickerSingleDateController: React.ClassicComponentClass; // components/SingleDatePicker.js type SingleDatePicker = React.ClassicComponentClass; @@ -541,10 +494,7 @@ declare namespace ReactDates { // utils/isSameDay.js var isSameDay: (a: moment.Moment, b: moment.Moment) => boolean; // utils/toISODateString.js - var toISODateString: ( - date: moment.MomentInput, - currentFormat: moment.MomentFormatSpecification - ) => string | null; + var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; // utils/toLocalizedDateString.js var toLocalizedDateString: ( date: moment.MomentInput, From 005314f76718b92006f94797a5f1b6d939a53f1d Mon Sep 17 00:00:00 2001 From: Alessandro Vergani Date: Fri, 30 Nov 2018 16:29:56 +0100 Subject: [PATCH 0106/2268] Update better-sqlite3 to match version 5.0 --- types/better-sqlite3/better-sqlite3-tests.ts | 42 ++++++++++++---- types/better-sqlite3/index.d.ts | 53 +++++++++++--------- types/better-sqlite3/tsconfig.json | 3 +- 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/types/better-sqlite3/better-sqlite3-tests.ts b/types/better-sqlite3/better-sqlite3-tests.ts index 7272d88f7e..cdc80f595e 100644 --- a/types/better-sqlite3/better-sqlite3-tests.ts +++ b/types/better-sqlite3/better-sqlite3-tests.ts @@ -6,7 +6,6 @@ const result: Database.RunResult = { changes: 1, lastInsertRowid: 1 }; const options: Database.Options = { fileMustExist: true, memory: true, readonly: true }; const registrationOptions: Database.RegistrationOptions = { deterministic: true, - name: '', safeIntegers: true, varargs: true }; @@ -15,26 +14,49 @@ let db = Database('.'); db = new Database('.', { memory: true }); db.exec('CREATE TABLE test (id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL);'); db.exec('INSERT INTO test(name) VALUES("name");'); -db.pragma('data_version', true); +db.pragma('data_version', { simple: true }); db.checkpoint(); db.checkpoint('main'); -db.register(() => { }); -db.register({ name: 'noop', deterministic: true, varargs: true }, () => { }); +db.function('noop', () => { }); +db.function('noop', { deterministic: true, varargs: true }, () => { }); +db.aggregate('add', { + start: 0, + step: (t, n) => t + n, + deterministic: true, + varargs: true +}); +db.aggregate('getAverage', { + start: () => [], + step: (array, nextValue) => { + array.push(nextValue); + }, + result: array => array.reduce((t: any, v: any) => t + v) / array.length, +}); +db.aggregate('addAll', { + start: 0, + step: (total, nextValue) => total + nextValue, + inverse: (total, droppedValue) => total - droppedValue, + result: total => Math.round(total), +}); db.defaultSafeIntegers(); db.defaultSafeIntegers(true); const stmt = db.prepare('SELECT * FROM test WHERE name == ?;'); stmt.get(['name']); stmt.all({ name: 'name' }); -stmt.each('name', (row: { name: string }) => { }); -stmt.each((row: { name: string }) => { }); +for (const row of stmt.iterate('name')) { +} stmt.pluck(); stmt.pluck(true); +stmt.expand(); +stmt.expand(true); stmt.bind('name'); stmt.safeIntegers(); stmt.safeIntegers(true); -const trans = db.transaction(['INSERT INTO test(name) VALUES(?);']); -trans.run('name'); -trans.bind('name'); -trans.run(); +const trans = db.transaction((param) => stmt.all(param)); +trans('name'); +trans.default('name'); +trans.default('name'); +trans.immediate('name'); +trans.exclusive('name'); diff --git a/types/better-sqlite3/index.d.ts b/types/better-sqlite3/index.d.ts index 5a4859e21f..abc85c3194 100644 --- a/types/better-sqlite3/index.d.ts +++ b/types/better-sqlite3/index.d.ts @@ -3,35 +3,32 @@ // Definitions by: Ben Davies // Mathew Rumsey // Santiago Aguilar +// Alessandro Vergani // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import Integer = require("integer"); -declare class Statement { +interface Statement { database: Database; source: string; - returnsData: boolean; - constructor(db: Database, sources: string[]); + reader: boolean; run(...params: any[]): Database.RunResult; get(...params: any[]): any; all(...params: any[]): any[]; - each(params: any, cb: (row: any) => void): void; - each(cb: (row: any) => void): void; - each(...params: any[]): void; + iterate(...params: any[]): IterableIterator; pluck(toggleState?: boolean): this; + expand(toggleState?: boolean): this; bind(...params: any[]): this; safeIntegers(toggleState?: boolean): this; } -declare class Transaction { - database: Database; - source: string; - constructor(db: Database, sources: string[]); - - run(...params: any[]): Database.RunResult; - bind(...params: any[]): this; - safeIntegers(toggleState?: boolean): this; +interface Transaction { + (...params: any[]): any; + default(...params: any[]): any; + deferred(...params: any[]): any; + immediate(...params: any[]): any; + exclusive(...params: any[]): any; } interface Database { @@ -42,15 +39,14 @@ interface Database { inTransaction: boolean; prepare(source: string): Statement; - transaction(sources: string[]): Transaction; + transaction(fn: (...params: any[]) => any): Transaction; exec(source: string): this; - pragma(source: string, simplify?: boolean): any; + pragma(source: string, options?: Database.PragmaOptions): any; checkpoint(databaseName?: string): this; - register(cb: (...params: any[]) => any): this; - register( - options: Database.RegistrationOptions, - cb: (...params: any[]) => any - ): this; + function(name: string, cb: (...params: any[]) => any): this; + function(name: string, options: Database.RegistrationOptions, cb: (...params: any[]) => any): this; + aggregate(name: string, options: Database.AggregateOptions): this; + loadExtension(path: string): this; close(): this; defaultSafeIntegers(toggleState?: boolean): this; } @@ -63,7 +59,7 @@ declare class SqliteError implements Error { } interface DatabaseConstructor { - new (filename: string, options?: Database.Options): Database; + new(filename: string, options?: Database.Options): Database; (filename: string, options?: Database.Options): Database; prototype: Database; @@ -81,14 +77,25 @@ declare namespace Database { memory?: boolean; readonly?: boolean; fileMustExist?: boolean; + timeout?: number; + } + + interface PragmaOptions { + simple?: boolean; } interface RegistrationOptions { - name?: string; varargs?: boolean; deterministic?: boolean; safeIntegers?: boolean; } + + interface AggregateOptions extends RegistrationOptions { + start?: any; + step: (total: any, next: any) => any; + inverse?: (totla: any, dropped: any) => any; + result?: (totla: any) => any; + } } declare const Database: DatabaseConstructor; diff --git a/types/better-sqlite3/tsconfig.json b/types/better-sqlite3/tsconfig.json index 30a480355b..19cd56ac36 100644 --- a/types/better-sqlite3/tsconfig.json +++ b/types/better-sqlite3/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "target": "es6", "lib": [ "es6" ], @@ -20,4 +21,4 @@ "index.d.ts", "better-sqlite3-tests.ts" ] -} \ No newline at end of file +} From 86e80e4f78aee19a33d0864e5e18403b0a881f86 Mon Sep 17 00:00:00 2001 From: David Brett Date: Fri, 30 Nov 2018 14:12:07 -0500 Subject: [PATCH 0107/2268] Adding ProgressBarOptions to exports for progress --- types/progress/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index 74596c4c13..6f6e2ea33d 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -10,22 +10,22 @@ /** * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. */ -interface ProgressBarOptions { +export interface ProgressBarOptions { /** * Total number of ticks to complete. */ total: number; - + /** * current completed index */ - curr?: number; - + curr?: number; + /** * head character defaulting to complete character */ - head?: string; - + head?: string; + /** * The displayed width of the progress bar defaulting to total. */ @@ -120,7 +120,7 @@ declare class ProgressBar { * overall completion to. */ update(ratio: number, tokens?: any): void; - + /** * "interrupt" the progress bar and write a message above it. */ @@ -128,7 +128,7 @@ declare class ProgressBar { /** * Terminates a progress bar. - */ + */ terminate(): void; /** @@ -138,4 +138,4 @@ declare class ProgressBar { } declare namespace ProgressBar { } -export = ProgressBar; +export default ProgressBar; From c2cf09838355de2914d34c4b83a22388004274ff Mon Sep 17 00:00:00 2001 From: David Brett Date: Fri, 30 Nov 2018 15:13:16 -0500 Subject: [PATCH 0108/2268] Adding types for multi-progress --- types/multi-progress/index.d.ts | 42 +++++++++++ types/multi-progress/multi-progress-tests.ts | 18 +++++ types/multi-progress/tsconfig.json | 23 ++++++ types/multi-progress/tslint.json | 79 ++++++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 types/multi-progress/index.d.ts create mode 100644 types/multi-progress/multi-progress-tests.ts create mode 100644 types/multi-progress/tsconfig.json create mode 100644 types/multi-progress/tslint.json diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts new file mode 100644 index 0000000000..e1ae12a4e0 --- /dev/null +++ b/types/multi-progress/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for multi-progress v2.0.0 +// Project: https://github.com/pitaj/multi-progress +// Definitions by: David Brett +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import ProgressBar, { ProgressBarOptions } from '../progress' +import { Stream } from 'stream'; + +declare class MultiProgress { + /** + * Create a new @see MultiProgress with the given stream, or stderr by default + * @param stream A stream to write the progress bars to + */ + constructor(stream?: Stream) + + /** + * Add a new bar + */ + newBar: (format: string, options: ProgressBarOptions) => ProgressBar; + + /** + * Close all bars + */ + terminate: () => void; + + /** + * Render the given progress bar + */ + move: (index: number) => void; + + /** + * Move the bar indicated by index forward the number of steps indicated by value + */ + tick: (index: number, value: number, options?: any) => void; + + /** + * Update the bar indicated by index to the value given + */ + update: (index: number, value: number, options?: any) => void; +} diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts new file mode 100644 index 0000000000..3397a48428 --- /dev/null +++ b/types/multi-progress/multi-progress-tests.ts @@ -0,0 +1,18 @@ +/** + * Example from https://github.com/pitaj/multi-progress + */ + +// require the library +var MultiProgress = require("multi-progress"); + +// spawn an instance with the optional stream to write to +// use of `new` is optional +var multi = new MultiProgress(process.stderr); + +// create a progress bar +var bar = multi.newBar(' downloading [:bar] :percent :etas', { + complete: '=', + incomplete: ' ', + width: 30, + total: 20 +}); diff --git a/types/multi-progress/tsconfig.json b/types/multi-progress/tsconfig.json new file mode 100644 index 0000000000..72100a32f7 --- /dev/null +++ b/types/multi-progress/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "multi-progress-tests.ts" + ] +} \ No newline at end of file diff --git a/types/multi-progress/tslint.json b/types/multi-progress/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/multi-progress/tslint.json @@ -0,0 +1,79 @@ +{ + "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 + } +} From bd7721366d8a06b212a6d0124257eeb22c934a80 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 1 Dec 2018 10:39:37 +0100 Subject: [PATCH 0109/2268] move old jsonfile types to sub-dir --- types/jsonfile/{ => v4}/index.d.ts | 0 types/jsonfile/{ => v4}/jsonfile-tests.ts | 0 types/jsonfile/{ => v4}/tsconfig.json | 0 types/jsonfile/{ => v4}/tslint.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename types/jsonfile/{ => v4}/index.d.ts (100%) rename types/jsonfile/{ => v4}/jsonfile-tests.ts (100%) rename types/jsonfile/{ => v4}/tsconfig.json (100%) rename types/jsonfile/{ => v4}/tslint.json (100%) diff --git a/types/jsonfile/index.d.ts b/types/jsonfile/v4/index.d.ts similarity index 100% rename from types/jsonfile/index.d.ts rename to types/jsonfile/v4/index.d.ts diff --git a/types/jsonfile/jsonfile-tests.ts b/types/jsonfile/v4/jsonfile-tests.ts similarity index 100% rename from types/jsonfile/jsonfile-tests.ts rename to types/jsonfile/v4/jsonfile-tests.ts diff --git a/types/jsonfile/tsconfig.json b/types/jsonfile/v4/tsconfig.json similarity index 100% rename from types/jsonfile/tsconfig.json rename to types/jsonfile/v4/tsconfig.json diff --git a/types/jsonfile/tslint.json b/types/jsonfile/v4/tslint.json similarity index 100% rename from types/jsonfile/tslint.json rename to types/jsonfile/v4/tslint.json From ee597ce77eca580b2699a891ea8ef5d74ff86403 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 1 Dec 2018 11:03:48 +0100 Subject: [PATCH 0110/2268] Add types for jsonfile v5, fix v4 --- types/jsonfile/index.d.ts | 71 ++++++++++++++++++++++++++++++++ types/jsonfile/jsonfile-tests.ts | 67 ++++++++++++++++++++++++++++++ types/jsonfile/tsconfig.json | 23 +++++++++++ types/jsonfile/tslint.json | 1 + types/jsonfile/v4/tsconfig.json | 11 +++-- 5 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 types/jsonfile/index.d.ts create mode 100644 types/jsonfile/jsonfile-tests.ts create mode 100644 types/jsonfile/tsconfig.json create mode 100644 types/jsonfile/tslint.json diff --git a/types/jsonfile/index.d.ts b/types/jsonfile/index.d.ts new file mode 100644 index 0000000000..cc0009ece3 --- /dev/null +++ b/types/jsonfile/index.d.ts @@ -0,0 +1,71 @@ +// Type definitions for jsonfile 5.0 +// Project: https://github.com/jprichardson/node-jsonfile#readme +// Definitions by: Daniel Bowring +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +import { Url } from 'url'; +import { + PathLike, + readFile as fsReadFile, + readFileSync as fsReadFileSync, + writeFile as fsWriteFile, + writeFileSync as fsWriteFileSync, +} from 'fs'; + +export type Path = PathLike | Url; + +export interface FS { + readFile: typeof fsReadFile; + readFileSync: typeof fsReadFileSync; + writeFile: typeof fsWriteFile; + writeFileSync: typeof fsWriteFileSync; +} + +export type JFReadOptions = + | { + encoding?: string | null; + flag?: string; + throws?: boolean; + fs?: FS; + reviver?: (key: any, value: any) => any; + } + | string + | null + | undefined; + +export type JFWriteOptions = + | { + encoding?: string | null; + mode?: string | number; + flag?: string; + fs?: FS; + EOL?: string; + spaces?: string | number; + replacer?: (key: string, value: any) => any; + } + | string + | null; + +export type ReadCallback = (err: NodeJS.ErrnoException | null, data: any) => void; +export type WriteCallback = (err: NodeJS.ErrnoException) => void; + +export function readFile(file: Path, options: JFReadOptions, callback: ReadCallback): void; +export function readFile(file: Path, callback: ReadCallback): void; +export function readFile(file: Path, options?: JFReadOptions): Promise; + +export function readFileSync(file: Path, options?: JFReadOptions): any; + +export function writeFile( + file: Path, + obj: any, + options: JFWriteOptions, + callback: WriteCallback +): void; +export function writeFile(file: Path, obj: any, callback: WriteCallback): void; +export function writeFile(file: Path, obj: any, options?: JFWriteOptions): Promise; + +export function writeFileSync(file: Path, obj: any, options?: JFWriteOptions): void; diff --git a/types/jsonfile/jsonfile-tests.ts b/types/jsonfile/jsonfile-tests.ts new file mode 100644 index 0000000000..4725e3c8a3 --- /dev/null +++ b/types/jsonfile/jsonfile-tests.ts @@ -0,0 +1,67 @@ +import * as jsonfile from 'jsonfile'; + +const file = '/tmp/data.json'; +const obj = { name: 'JP' }; + +// $ExpectType void +jsonfile.readFile(file, { encoding: 'utf8', throws: true }, (err, obj) => { + // $ExpectType ErrnoException | null + err; + // $ExpectType any + obj; +}); + +// $ExpectType void +jsonfile.readFile(file, (err, obj) => { + // $ExpectType ErrnoException | null + err; + // $ExpectType any + obj; +}); + +jsonfile.readFile(file).then(obj => { + // $ExpectType any + obj; +}); +jsonfile.readFile(file, { encoding: 'utf8', throws: true }).then(obj => { + // $ExpectType any + obj; +}); + +// $ExpectType any +jsonfile.readFileSync(file); +jsonfile.readFileSync(file, { encoding: 'utf8', throws: true }); + +// $ExpectType void +jsonfile.writeFile(file, obj, err => { + // $ExpectType ErrnoException + err; +}); + +// $ExpectType void +jsonfile.writeFile(file, obj, { spaces: 2 }, err => { + // $ExpectType ErrnoException + err; +}); + +// $ExpectType void +jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, err => { + // $ExpectType ErrnoException + err; +}); + +// $ExpectType void +jsonfile.writeFile(file, obj, { flag: 'a' }, err => { + // $ExpectType ErrnoException + err; +}); + +// $ExpectType Promise +jsonfile.writeFile(file, obj); +// $ExpectType Promise +jsonfile.writeFile(file, obj, { flag: 'a' }); + +jsonfile.writeFileSync(file, obj); +jsonfile.writeFileSync(file, obj, { spaces: 2 }); +jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' }); +jsonfile.writeFileSync(file, obj, { flag: 'a' }); diff --git a/types/jsonfile/tsconfig.json b/types/jsonfile/tsconfig.json new file mode 100644 index 0000000000..17ac9b0896 --- /dev/null +++ b/types/jsonfile/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", + "jsonfile-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jsonfile/tslint.json b/types/jsonfile/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jsonfile/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jsonfile/v4/tsconfig.json b/types/jsonfile/v4/tsconfig.json index 17ac9b0896..e6505d789e 100644 --- a/types/jsonfile/v4/tsconfig.json +++ b/types/jsonfile/v4/tsconfig.json @@ -7,10 +7,15 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], + "paths": { + "jsonfile": [ + "jsonfile/v4" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, @@ -20,4 +25,4 @@ "index.d.ts", "jsonfile-tests.ts" ] -} \ No newline at end of file +} From a5f3d28c1586222844571d5ac788bddd1c33c1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 16:53:47 +0100 Subject: [PATCH 0111/2268] Slight improvement to alias, organize tests more systematically. --- types/yargs/index.d.ts | 4 +- types/yargs/yargs-tests.ts | 121 ++++++++++++++++++++----------------- 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 1c40eea4c5..a4e9b6bce5 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -36,8 +36,8 @@ declare namespace yargs { (args: ReadonlyArray, cwd?: string): { [K in keyof Arguments]: Arguments[K] }; // Aliases for previously declared options can inherit the types of those options. - alias(shortName: K1, longName: K2): Argv; - alias(shortName: K2, longName: K1): Argv; + alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; + alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index f32023ec99..0d2f1d5bcd 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -668,59 +668,19 @@ function Argv$scriptName() { } function Argv$inferOptionTypes() { - const argv1 = yargs - .option("u", { type: "string" }) - .alias("u", "url") + // $ExpectType { [x: string]: any; array: string[]; boolean: boolean; count: number; number: number; string: string; _: string[]; $0: string; } + yargs + .option("array", { type: "array" }) + .option("boolean", { type: "boolean" }) + .option("count", { type: "count" }) + .option("number", { type: "number" }) + .option("string", { type: "string" }) .argv; - // $ExpectType string - argv1.u; - // $ExpectType string - argv1.url; - - const argv2 = yargs - .option("verbose", { default: false }) - .alias("v", "verbose") - .argv; - - // $ExpectType boolean - argv2.v; - // $ExpectType boolean - argv2.verbose; - - const argv3 = yargs - .option({ - count: { number: true }, - date: { coerce: Date.parse } - }) - .alias("c", "count") - .argv; - - // $ExpectType number - argv3.c; - // $ExpectType number - argv3.count; - // $ExpectType number - argv3.date; - - const argv4 = yargs - .string(["u", "url"]) - .alias("url", "uri") - .argv; - - // $ExpectType string - argv4.u; - // $ExpectType string - argv4.url; - // $ExpectType string - argv4.uri; - // $ExpectType any - argv4.bogus; - type Color = "red" | "blue" | "green"; const colors: Color[] = ["red", "blue", "green"]; - const argv5 = yargs + const argv = yargs .array("array") .boolean("boolean") .choices("color", colors) @@ -732,19 +692,68 @@ function Argv$inferOptionTypes() { .argv; // $ExpectType string[] - argv5.array; + argv.array; // $ExpectType boolean - argv5.boolean; + argv.boolean; // $ExpectType Color - argv5.color; + argv.color; // $ExpectType number - argv5.count; + argv.count; // $ExpectType Date - argv5.date; + argv.date; // $ExpectType string - argv5.normalize; + argv.normalize; // $ExpectType number - argv5.number; + argv.number; // $ExpectType string - argv5.string; + argv.string; +} + +function Argv$fallbackToAnyForUnknownOptions() { + // $ExpectType any + yargs.argv.bogus; + + // $ExpectType any + yargs + .option({a: { type: "string" }, b: { type: "boolean" } }) + .argv + .bogus; +} + +function Argv$inferOptionTypesForAliases() { + // $ExpectType { [x: string]: any; u: string; url: string; _: string[]; $0: string; } + yargs + .option("u", { type: "string" }) + .alias("u", "url") + .argv; + + // $ExpectType { [x: string]: any; v: boolean; loud: boolean; noisy: boolean; verbose: boolean; n: boolean; _: string[]; $0: string; } + yargs + .option("v", { default: false }) + .alias("v", ["loud", "noisy", "verbose"]) + .alias("n", "noisy") + .argv; + + // $ExpectType { [x: string]: any; n: number; count: number; num: number; _: string[]; $0: string; } + yargs + .option("n", { number: true }) + .alias("n", "count") + .alias("num", ["n", "count"]) + .argv; +} + +function Argv$inferOptionTypesFromCoercions() { + // $ExpectType number + yargs + .option("date", { coerce: Date.parse }) + .argv + .date; + + // $ExpectType { [x: string]: any; date: number; factor: number; _: string[]; $0: string; } + yargs + .options({ + date: { coerce: Date.parse }, + factor: { coerce: parseFloat } + }) + .argv; } From d8787cebbae95cda2c83885a50aae85e97875902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 17:58:54 +0100 Subject: [PATCH 0112/2268] Fix for count, more tests. --- types/yargs/index.d.ts | 1 + types/yargs/yargs-tests.ts | 77 +++++++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index a4e9b6bce5..4710fb779c 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -327,6 +327,7 @@ declare namespace yargs { O extends { boolean: true } ? boolean : O extends { number: true } ? number : O extends { string: true } ? string : + O extends { count: true } ? number : O extends { normalize: true } ? string : O extends { choices: Array } ? C : O extends { default: infer D } ? D : diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 0d2f1d5bcd..8e07580fdd 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -667,6 +667,9 @@ function Argv$scriptName() { .scriptName("my-script"); } +type Color = "red" | "blue" | "green"; +const colors: Color[] = ["red", "blue", "green"]; + function Argv$inferOptionTypes() { // $ExpectType { [x: string]: any; array: string[]; boolean: boolean; count: number; number: number; string: string; _: string[]; $0: string; } yargs @@ -677,15 +680,36 @@ function Argv$inferOptionTypes() { .option("string", { type: "string" }) .argv; - type Color = "red" | "blue" | "green"; - const colors: Color[] = ["red", "blue", "green"]; + // $ExpectType { [x: string]: any; a: number; b: boolean; c: string; _: string[]; $0: string; } + yargs + .option("a", { default: 42 }) + .option("b", { default: false }) + .option("c", { default: "tmp" }) + .argv; + + // $ExpectType { [x: string]: any; array: string[]; boolean: boolean; number: number; string: string; _: string[]; $0: string; } + yargs + .option("array", { array: true }) + .option("boolean", { boolean: true }) + .option("number", { number: true }) + .option("string", { string: true }) + .argv; + + // $ExpectType { [x: string]: any; choices: Color; coerce: Date; count: number; normalize: string; _: string[]; $0: string; } + yargs + .option("choices", { choices: colors }) + .option("coerce", { coerce: () => new Date() }) + .option("count", { count: true }) + .option("normalize", { normalize: true }) + .argv; const argv = yargs .array("array") .boolean("boolean") - .choices("color", colors) + .choices("choices", colors) + .coerce("coerce", Date.parse) .count("count") - .default("date", new Date()) + .default("default", new Date()) .normalize("normalize") .number("number") .string("string") @@ -696,11 +720,13 @@ function Argv$inferOptionTypes() { // $ExpectType boolean argv.boolean; // $ExpectType Color - argv.color; + argv.choices; + // $ExpectType number + argv.coerce; // $ExpectType number argv.count; // $ExpectType Date - argv.date; + argv.default; // $ExpectType string argv.normalize; // $ExpectType number @@ -709,6 +735,29 @@ function Argv$inferOptionTypes() { argv.string; } +function Argv$inferMultipleOptionTypes() { + // $ExpectType { [x: string]: any; a: string; b: boolean; c: number; d: number; e: number; _: string[]; $0: string; } + yargs + .option({ a: { type: "string" }, b: { type: "boolean" } }) + .number(["c", "d", "e"]) + .argv; + + // $ExpectType { [x: string]: any; a: number; b: string; c: boolean; _: string[]; $0: string; } + yargs + .default({ a: 42, b: "b", c: false }) + .argv; + + // $ExpectType { [x: string]: any; a: number; b: string; c: Date; _: string[]; $0: string; } + yargs + .coerce({ a: Date.parse, b: String.prototype.toLowerCase, c: (s: string) => new Date(s) }) + .argv; + + // $ExpectType { [x: string]: any; a: number; b: string; c: Color; _: string[]; $0: string; } + yargs + .choices({ a: [1, 2, 3], b: ["black", "white"], c: colors }) + .argv; +} + function Argv$fallbackToAnyForUnknownOptions() { // $ExpectType any yargs.argv.bogus; @@ -741,19 +790,3 @@ function Argv$inferOptionTypesForAliases() { .alias("num", ["n", "count"]) .argv; } - -function Argv$inferOptionTypesFromCoercions() { - // $ExpectType number - yargs - .option("date", { coerce: Date.parse }) - .argv - .date; - - // $ExpectType { [x: string]: any; date: number; factor: number; _: string[]; $0: string; } - yargs - .options({ - date: { coerce: Date.parse }, - factor: { coerce: parseFloat } - }) - .argv; -} From 0c54262bee24af492b175c36a4e57a7311c212c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 18:05:16 +0100 Subject: [PATCH 0113/2268] More restructuring of tests. --- types/yargs/yargs-tests.ts | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 8e07580fdd..984c35300d 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -703,36 +703,32 @@ function Argv$inferOptionTypes() { .option("normalize", { normalize: true }) .argv; - const argv = yargs - .array("array") - .boolean("boolean") - .choices("choices", colors) - .coerce("coerce", Date.parse) - .count("count") - .default("default", new Date()) - .normalize("normalize") - .number("number") - .string("string") - .argv; - // $ExpectType string[] - argv.array; + yargs.array("x").argv.x; + // $ExpectType boolean - argv.boolean; + yargs.boolean("x").argv.x; + // $ExpectType Color - argv.choices; + yargs.choices("x", colors).argv.x; + // $ExpectType number - argv.coerce; + yargs.coerce("x", Date.parse).argv.x; + // $ExpectType number - argv.count; + yargs.count("x").argv.x; + // $ExpectType Date - argv.default; + yargs.default("x", new Date()).argv.x; + // $ExpectType string - argv.normalize; + yargs.normalize("x").argv.x; + // $ExpectType number - argv.number; + yargs.number("x").argv.x; + // $ExpectType string - argv.string; + yargs.string("x").argv.x; } function Argv$inferMultipleOptionTypes() { From f59869ebafc0a2fae42d91b46a357b5eb77b1fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 23:04:15 +0100 Subject: [PATCH 0114/2268] Handle optional vs. required options. --- types/yargs/index.d.ts | 38 ++++++++++----- types/yargs/yargs-tests.ts | 94 ++++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 36 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 4710fb779c..be5ffbd574 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -44,21 +44,21 @@ declare namespace yargs { argv: { [K in keyof Arguments]: Arguments[K] }; - array(key: K | ReadonlyArray): Argv; + array(key: K | ReadonlyArray): Argv; - boolean(key: K | ReadonlyArray): Argv; + boolean(key: K | ReadonlyArray): Argv; check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - choices>(key: K, values: C): Argv; - choices }>(choices: C): Argv; + choices>(key: K, values: C): Argv; + choices }>(choices: C): Argv; // For previously declared options, we can infer the parameter type of the coercion function. coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv; coerce any }>(opts: O): Argv }>; - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; - coerce any }>(opts: O): Argv }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; + coerce any }>(opts: O): Argv | undefined }>; command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; @@ -94,12 +94,14 @@ declare namespace yargs { * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ + demand(key: K | ReadonlyArray, msg?: string | true): Argv>; demand(key: string | ReadonlyArray, msg: string): Argv; demand(key: string | ReadonlyArray, required?: boolean): Argv; demand(positionals: number, msg: string): Argv; demand(positionals: number, required?: boolean): Argv; demand(positionals: number, max: number, msg?: string): Argv; + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; demandOption(key: string | ReadonlyArray, msg?: string): Argv; demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; @@ -150,9 +152,9 @@ declare namespace yargs { nargs(key: string, count: number): Argv; nargs(nargs: { [key: string]: number }): Argv; - normalize(key: K | ReadonlyArray): Argv; + normalize(key: K | ReadonlyArray): Argv; - number(key: K | ReadonlyArray): Argv; + number(key: K | ReadonlyArray): Argv; option(key: K, options: O): Argv }>; option(options: O): Argv>; @@ -177,6 +179,7 @@ declare namespace yargs { * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ + require(key: K | ReadonlyArray, msg?: string | true): Argv>; require(key: string, msg: string): Argv; require(key: string, required: boolean): Argv; require(keys: ReadonlyArray, msg: string): Argv; @@ -188,6 +191,7 @@ declare namespace yargs { * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ + required(key: K | ReadonlyArray, msg?: string | true): Argv>; required(key: string, msg: string): Argv; required(key: string, required: boolean): Argv; required(keys: ReadonlyArray, msg: string): Argv; @@ -218,7 +222,7 @@ declare namespace yargs { strict(): Argv; - string(key: K | ReadonlyArray): Argv; + string(key: K | ReadonlyArray): Argv; // Intended to be used with '.wrap()' terminalWidth(): number; @@ -317,20 +321,30 @@ declare namespace yargs { type?: PositionalOptionsType; } + /* Remove undefined as a possible value for keys K in T */ + type Required = Pick> & { [key in K]: Exclude }; + type InferredOptionType = + O extends { default: infer D } ? D : + O extends { type: "count" } ? number : + O extends { count: true } ? number : + O extends { required: string | true } ? RequiredOptionType : + O extends { require: string | true } ? RequiredOptionType : + O extends { demand: string | true } ? RequiredOptionType : + O extends { demandOption: string | true } ? RequiredOptionType : + RequiredOptionType | undefined; + + type RequiredOptionType = O extends { type: "array" } ? string[] : O extends { type: "boolean" } ? boolean : O extends { type: "number" } ? number : O extends { type: "string" } ? string : - O extends { type: "count" } ? number : O extends { array: true } ? string[] : O extends { boolean: true } ? boolean : O extends { number: true } ? number : O extends { string: true } ? string : - O extends { count: true } ? number : O extends { normalize: true } ? string : O extends { choices: Array } ? C : - O extends { default: infer D } ? D : O extends { coerce: (arg: any) => infer T } ? T : any; diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 984c35300d..33493c21d3 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -671,13 +671,13 @@ type Color = "red" | "blue" | "green"; const colors: Color[] = ["red", "blue", "green"]; function Argv$inferOptionTypes() { - // $ExpectType { [x: string]: any; array: string[]; boolean: boolean; count: number; number: number; string: string; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; a: string[] | undefined; b: boolean | undefined; c: number; n: number | undefined; s: string | undefined; _: string[]; $0: string; } yargs - .option("array", { type: "array" }) - .option("boolean", { type: "boolean" }) - .option("count", { type: "count" }) - .option("number", { type: "number" }) - .option("string", { type: "string" }) + .option("a", { type: "array" }) + .option("b", { type: "boolean" }) + .option("c", { type: "count" }) + .option("n", { type: "number" }) + .option("s", { type: "string" }) .argv; // $ExpectType { [x: string]: any; a: number; b: boolean; c: string; _: string[]; $0: string; } @@ -687,32 +687,32 @@ function Argv$inferOptionTypes() { .option("c", { default: "tmp" }) .argv; - // $ExpectType { [x: string]: any; array: string[]; boolean: boolean; number: number; string: string; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; a: string[] | undefined; b: boolean | undefined; n: number | undefined; s: string | undefined; _: string[]; $0: string; } yargs - .option("array", { array: true }) - .option("boolean", { boolean: true }) - .option("number", { number: true }) - .option("string", { string: true }) + .option("a", { array: true }) + .option("b", { boolean: true }) + .option("n", { number: true }) + .option("s", { string: true }) .argv; - // $ExpectType { [x: string]: any; choices: Color; coerce: Date; count: number; normalize: string; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; choices: Color; coerce: Date | undefined; count: number; normalize: string | undefined; _: string[]; $0: string; } yargs - .option("choices", { choices: colors }) + .option("choices", { choices: colors, required: true }) .option("coerce", { coerce: () => new Date() }) .option("count", { count: true }) .option("normalize", { normalize: true }) .argv; - // $ExpectType string[] + // $ExpectType string[] | undefined yargs.array("x").argv.x; - // $ExpectType boolean + // $ExpectType boolean | undefined yargs.boolean("x").argv.x; - // $ExpectType Color + // $ExpectType "red" | "blue" | "green" | undefined yargs.choices("x", colors).argv.x; - // $ExpectType number + // $ExpectType number | undefined yargs.coerce("x", Date.parse).argv.x; // $ExpectType number @@ -721,21 +721,66 @@ function Argv$inferOptionTypes() { // $ExpectType Date yargs.default("x", new Date()).argv.x; - // $ExpectType string + // $ExpectType string | undefined yargs.normalize("x").argv.x; - // $ExpectType number + // $ExpectType number | undefined yargs.number("x").argv.x; - // $ExpectType string + // $ExpectType string | undefined yargs.string("x").argv.x; } +function Argv$inferRequiredOptionTypes() { + // $ExpectType string + yargs.string("x").demand("x").argv.x; + + // $ExpectType string + yargs.string("x").demandOption("x").argv.x; + + // $ExpectType string | undefined + yargs.string("x").demandOption("x", false).argv.x; + + // $ExpectType { [x: string]: any; x: string; y: number; _: string[]; $0: string; } + yargs.string("x").number("y").demandOption(["x", "y"]).argv; + + // $ExpectType { [x: string]: any; x: string; y: number; _: string[]; $0: string; } + yargs.string("x").number("y").demandOption(["x", "y"], true).argv; + + // $ExpectType { [x: string]: any; x: string | undefined; y: number | undefined; _: string[]; $0: string; } + yargs.string("x").number("y").demandOption(["x", "y"], false).argv; + + // $ExpectType string + yargs.option("x", { string: true, require: true }).argv.x; + + // $ExpectType string + yargs.option("x", { string: true, required: true }).argv.x; + + // $ExpectType string + yargs.option("x", { string: true, demand: true }).argv.x; + + // $ExpectType string + yargs.option("x", { string: true, demandOption: true }).argv.x; + + // $ExpectType string | undefined + yargs.option("x", { string: true, demandOption: false }).argv.x; + + // $ExpectType number + yargs.option("x", { count: true }).argv.x; + + // $ExpectType number + yargs.option("x", { number: true, default: 42 }).argv.x; + + // $ExpectType string[] + yargs.option("x", { array: true, demandOption: true }).argv.x; +} + function Argv$inferMultipleOptionTypes() { // $ExpectType { [x: string]: any; a: string; b: boolean; c: number; d: number; e: number; _: string[]; $0: string; } yargs - .option({ a: { type: "string" }, b: { type: "boolean" } }) + .option({ a: { default: "a" }, b: { default: false } }) .number(["c", "d", "e"]) + .demandOption(["c", "d", "e"]) .argv; // $ExpectType { [x: string]: any; a: number; b: string; c: boolean; _: string[]; $0: string; } @@ -748,9 +793,10 @@ function Argv$inferMultipleOptionTypes() { .coerce({ a: Date.parse, b: String.prototype.toLowerCase, c: (s: string) => new Date(s) }) .argv; - // $ExpectType { [x: string]: any; a: number; b: string; c: Color; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; a: number | undefined; b: string | undefined; c: Color; _: string[]; $0: string; } yargs .choices({ a: [1, 2, 3], b: ["black", "white"], c: colors }) + .demandOption("c") .argv; } @@ -766,7 +812,7 @@ function Argv$fallbackToAnyForUnknownOptions() { } function Argv$inferOptionTypesForAliases() { - // $ExpectType { [x: string]: any; u: string; url: string; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; u: string | undefined; url: string | undefined; _: string[]; $0: string; } yargs .option("u", { type: "string" }) .alias("u", "url") @@ -781,7 +827,7 @@ function Argv$inferOptionTypesForAliases() { // $ExpectType { [x: string]: any; n: number; count: number; num: number; _: string[]; $0: string; } yargs - .option("n", { number: true }) + .option("n", { number: true, demandOption: true }) .alias("n", "count") .alias("num", ["n", "count"]) .argv; From 3e4524e66ab994f4e0ef08b60306f91559e026ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 23:10:12 +0100 Subject: [PATCH 0115/2268] Consistently use [key in ... for mapped types. --- types/yargs/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index be5ffbd574..2babcf6b12 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -32,8 +32,8 @@ declare namespace yargs { // For the return type / argv property, we create a mapped type over // Arguments to simplify the inferred type signature in client code. interface Argv { - (): { [K in keyof Arguments]: Arguments[K] }; - (args: ReadonlyArray, cwd?: string): { [K in keyof Arguments]: Arguments[K] }; + (): { [key in keyof Arguments]: Arguments[key] }; + (args: ReadonlyArray, cwd?: string): { [key in keyof Arguments]: Arguments[key] }; // Aliases for previously declared options can inherit the types of those options. alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; @@ -42,7 +42,7 @@ declare namespace yargs { alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; - argv: { [K in keyof Arguments]: Arguments[K] }; + argv: { [key in keyof Arguments]: Arguments[key] }; array(key: K | ReadonlyArray): Argv; @@ -51,14 +51,14 @@ declare namespace yargs { check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; choices>(key: K, values: C): Argv; - choices }>(choices: C): Argv; + choices }>(choices: C): Argv; // For previously declared options, we can infer the parameter type of the coercion function. coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv; - coerce any }>(opts: O): Argv }>; + coerce any }>(opts: O): Argv }>; coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; - coerce any }>(opts: O): Argv | undefined }>; + coerce any }>(opts: O): Argv | undefined }>; command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; @@ -348,7 +348,7 @@ declare namespace yargs { O extends { coerce: (arg: any) => infer T } ? T : any; - type InferredOptionTypes = { [K in keyof O]: InferredOptionType }; + type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; interface CommandModule { aliases?: ReadonlyArray | string; From 6473debf344d892663cf7ae7a68d4343b185297b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sat, 1 Dec 2018 23:34:17 +0100 Subject: [PATCH 0116/2268] Improve handling of arrays, defaulting to (string | number)[]. --- types/yargs/index.d.ts | 14 +++++++-- types/yargs/yargs-tests.ts | 62 +++++++++++++++++++++++++++++--------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 2babcf6b12..3be62e433b 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -44,7 +44,7 @@ declare namespace yargs { argv: { [key in keyof Arguments]: Arguments[key] }; - array(key: K | ReadonlyArray): Argv; + array(key: K | ReadonlyArray): Argv | undefined }>; boolean(key: K | ReadonlyArray): Argv; @@ -335,11 +335,19 @@ declare namespace yargs { RequiredOptionType | undefined; type RequiredOptionType = - O extends { type: "array" } ? string[] : + O extends { type: "array", string: true } ? string[] : + O extends { type: "array", number: true } ? number[] : + O extends { type: "array", normalize: true } ? string[] : + O extends { type: "string", array: true } ? string[] : + O extends { type: "number", array: true } ? number[] : + O extends { string: true, array: true } ? string[] : + O extends { number: true, array: true } ? number[] : + O extends { normalize: true, array: true } ? string[] : + O extends { type: "array" } ? Array : O extends { type: "boolean" } ? boolean : O extends { type: "number" } ? number : O extends { type: "string" } ? string : - O extends { array: true } ? string[] : + O extends { array: true } ? Array : O extends { boolean: true } ? boolean : O extends { number: true } ? number : O extends { string: true } ? string : diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 33493c21d3..6f3e77e14a 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -671,7 +671,7 @@ type Color = "red" | "blue" | "green"; const colors: Color[] = ["red", "blue", "green"]; function Argv$inferOptionTypes() { - // $ExpectType { [x: string]: any; a: string[] | undefined; b: boolean | undefined; c: number; n: number | undefined; s: string | undefined; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; a: (string | number)[] | undefined; b: boolean | undefined; c: number; n: number | undefined; s: string | undefined; _: string[]; $0: string; } yargs .option("a", { type: "array" }) .option("b", { type: "boolean" }) @@ -687,7 +687,7 @@ function Argv$inferOptionTypes() { .option("c", { default: "tmp" }) .argv; - // $ExpectType { [x: string]: any; a: string[] | undefined; b: boolean | undefined; n: number | undefined; s: string | undefined; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; a: (string | number)[] | undefined; b: boolean | undefined; n: number | undefined; s: string | undefined; _: string[]; $0: string; } yargs .option("a", { array: true }) .option("b", { boolean: true }) @@ -703,7 +703,7 @@ function Argv$inferOptionTypes() { .option("normalize", { normalize: true }) .argv; - // $ExpectType string[] | undefined + // $ExpectType (string | number)[] | undefined yargs.array("x").argv.x; // $ExpectType boolean | undefined @@ -771,7 +771,7 @@ function Argv$inferRequiredOptionTypes() { // $ExpectType number yargs.option("x", { number: true, default: 42 }).argv.x; - // $ExpectType string[] + // $ExpectType (string | number)[] yargs.option("x", { array: true, demandOption: true }).argv.x; } @@ -800,17 +800,6 @@ function Argv$inferMultipleOptionTypes() { .argv; } -function Argv$fallbackToAnyForUnknownOptions() { - // $ExpectType any - yargs.argv.bogus; - - // $ExpectType any - yargs - .option({a: { type: "string" }, b: { type: "boolean" } }) - .argv - .bogus; -} - function Argv$inferOptionTypesForAliases() { // $ExpectType { [x: string]: any; u: string | undefined; url: string | undefined; _: string[]; $0: string; } yargs @@ -832,3 +821,46 @@ function Argv$inferOptionTypesForAliases() { .alias("num", ["n", "count"]) .argv; } + +function Argv$inferArrayOptionTypes() { + // $ExpectType (string | number)[] + yargs.option("a", { array: true, demandOption: true }).argv.a; + + // $ExpectType string[] + yargs.option("a", { array: true, string: true, demandOption: true }).argv.a; + + // $ExpectType number[] + yargs.option("a", { array: true, number: true, demandOption: true }).argv.a; + + // $ExpectType string[] + yargs.option("a", { array: true, normalize: true, demandOption: true }).argv.a; + + // $ExpectType string[] | undefined + yargs.option("a", { array: true, type: "string" }).argv.a; + + // $ExpectType number[] | undefined + yargs.option("a", { array: true, type: "number" }).argv.a; + + // $ExpectType string[] | undefined + yargs.option("a", { array: true, normalize: true }).argv.a; + + // $ExpectType string[] | undefined + yargs.option("a", { string: true, type: "array" }).argv.a; + + // $ExpectType number[] | undefined + yargs.option("a", { number: true, type: "array" }).argv.a; + + // $ExpectType string[] | undefined + yargs.option("a", { normalize: true, type: "array" }).argv.a; +} + +function Argv$fallbackToAnyForUnknownOptions() { + // $ExpectType any + yargs.argv.bogus; + + // $ExpectType any + yargs + .option({a: { type: "string" }, b: { type: "boolean" } }) + .argv + .bogus; +} From 0aee094572011b575f449baf70630a616742dce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sun, 2 Dec 2018 00:56:18 +0100 Subject: [PATCH 0117/2268] More improvements to array/number/string handling, and use Omit to reset types for repeated options. --- types/yargs/index.d.ts | 64 ++++++++++++++++++++++++-------------- types/yargs/yargs-tests.ts | 61 +++++++++++++++++++++++++++++++++++- 2 files changed, 100 insertions(+), 25 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 3be62e433b..ac8dbbb749 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -44,21 +44,22 @@ declare namespace yargs { argv: { [key in keyof Arguments]: Arguments[key] }; - array(key: K | ReadonlyArray): Argv | undefined }>; + array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; + array(key: K | ReadonlyArray): Argv & { [key in K]: Array | undefined }>; - boolean(key: K | ReadonlyArray): Argv; + boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - choices>(key: K, values: C): Argv; - choices }>(choices: C): Argv; + choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; + choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; // For previously declared options, we can infer the parameter type of the coercion function. - coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv; - coerce any }>(opts: O): Argv }>; + coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv & { [key in K]: V }>; + coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType }>; - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; - coerce any }>(opts: O): Argv | undefined }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; + coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; @@ -85,23 +86,23 @@ declare namespace yargs { conflicts(key: string, value: string | ReadonlyArray): Argv; conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; - count(key: K | ReadonlyArray): Argv; + count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; - default(key: K, value: V, description?: string): Argv; - default(defaults: D, description?: string): Argv; + default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; + default(defaults: D, description?: string): Argv & D>; /** * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - demand(key: K | ReadonlyArray, msg?: string | true): Argv>; + demand(key: K | ReadonlyArray, msg?: string | true): Argv>; demand(key: string | ReadonlyArray, msg: string): Argv; demand(key: string | ReadonlyArray, required?: boolean): Argv; demand(positionals: number, msg: string): Argv; demand(positionals: number, required?: boolean): Argv; demand(positionals: number, max: number, msg?: string): Argv; - demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; demandOption(key: string | ReadonlyArray, msg?: string): Argv; demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; @@ -152,15 +153,17 @@ declare namespace yargs { nargs(key: string, count: number): Argv; nargs(nargs: { [key: string]: number }): Argv; - normalize(key: K | ReadonlyArray): Argv; + normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + normalize(key: K | ReadonlyArray): Argv & { [key in K]: string | undefined }>; - number(key: K | ReadonlyArray): Argv; + number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; + number(key: K | ReadonlyArray): Argv & { [key in K]: number | undefined }>; - option(key: K, options: O): Argv }>; - option(options: O): Argv>; + option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + option(options: O): Argv & InferredOptionTypes>; - options(key: K, options: O): Argv }>; - options(options: O): Argv>; + options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + options(options: O): Argv & InferredOptionTypes>; parse(): Arguments; parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): Arguments; @@ -179,7 +182,7 @@ declare namespace yargs { * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - require(key: K | ReadonlyArray, msg?: string | true): Argv>; + require(key: K | ReadonlyArray, msg?: string | true): Argv>; require(key: string, msg: string): Argv; require(key: string, required: boolean): Argv; require(keys: ReadonlyArray, msg: string): Argv; @@ -191,7 +194,7 @@ declare namespace yargs { * @deprecated since version 6.6.0 * Use '.demandCommand()' or '.demandOption()' instead */ - required(key: K | ReadonlyArray, msg?: string | true): Argv>; + required(key: K | ReadonlyArray, msg?: string | true): Argv>; required(key: string, msg: string): Argv; required(key: string, required: boolean): Argv; required(keys: ReadonlyArray, msg: string): Argv; @@ -222,7 +225,8 @@ declare namespace yargs { strict(): Argv; - string(key: K | ReadonlyArray): Argv; + string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + string(key: K | ReadonlyArray): Argv & { [key in K]: string | undefined }>; // Intended to be used with '.wrap()' terminalWidth(): number; @@ -321,8 +325,20 @@ declare namespace yargs { type?: PositionalOptionsType; } - /* Remove undefined as a possible value for keys K in T */ - type Required = Pick> & { [key in K]: Exclude }; + /** Remove keys K in T */ + type Omit = Pick>; + + /** Remove undefined as a possible value for keys K in T */ + type Defined = Omit & { [key in K]: Exclude }; + + /** Convert T to T[] and T | undefined to T[] | undefined */ + type ToArray = Array> | Extract; + + /** Gives string[] | undefined or string[] if T is an array type, otherwise string */ + type ToString = T extends any[] ? string[] : T extends any[] | undefined ? string[] | undefined : string | undefined; + + /** Gives number[] | undefined or number[] if T is an array type, otherwise number */ + type ToNumber = T extends any[] ? number[] : T extends any[] | undefined ? number[] | undefined : number | undefined; type InferredOptionType = O extends { default: infer D } ? D : diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 6f3e77e14a..688082e523 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -695,7 +695,7 @@ function Argv$inferOptionTypes() { .option("s", { string: true }) .argv; - // $ExpectType { [x: string]: any; choices: Color; coerce: Date | undefined; count: number; normalize: string | undefined; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; count: number; choices: Color; coerce: Date | undefined; normalize: string | undefined; _: string[]; $0: string; } yargs .option("choices", { choices: colors, required: true }) .option("coerce", { coerce: () => new Date() }) @@ -852,6 +852,65 @@ function Argv$inferArrayOptionTypes() { // $ExpectType string[] | undefined yargs.option("a", { normalize: true, type: "array" }).argv.a; + + // $ExpectType string[] | undefined + yargs.string("a").array("a").argv.a; + + // $ExpectType string[] | undefined + yargs.array("a").string("a").argv.a; + + // $ExpectType string[] + yargs.string("a").array("a").demandOption("a").argv.a; + + // $ExpectType string[] + yargs.array("a").string("a").demandOption("a").argv.a; + + // $ExpectType string[] + yargs.string("a").demandOption("a").array("a").argv.a; + + // $ExpectType string[] + yargs.array("a").demandOption("a").string("a").argv.a; + + // $ExpectType number[] + yargs.number("a").array("a").demandOption("a").argv.a; + + // $ExpectType number[] + yargs.array("a").number("a").demandOption("a").argv.a; + + // $ExpectType number[] + yargs.array("a").demandOption("a").number("a").argv.a; + + // $ExpectType string[] + yargs.normalize("a").array("a").demandOption("a").argv.a; + + // $ExpectType string[] + yargs.array("a").normalize("a").demandOption("a").argv.a; + + // $ExpectType string[] + yargs.array("a").demandOption("a").normalize("a").argv.a; +} + +function Argv$usesTheLastInferredOptionType() { + // $ExpectType boolean | undefined + yargs.string("a").boolean("a").argv.a; + + // FIXME: $ExpectType string | undefined + // FIXME: yargs.number("a").string("a").argv.a; + + // FIXME: $ExpectType number | undefined + // FIXME: yargs.string("a").number("a").argv.a; + + // $ExpectType boolean | undefined + yargs.string("a").option("a", { number: true }).boolean("a").argv.a; + + // $ExpectType boolean | undefined + yargs.number("a").option("a", { string: true }).boolean("a").argv.a; + + // $ExpectType string | undefined + yargs.boolean("a").option("a", { number: true }).option("a", { string: true }).argv.a; + + // $ExpectType number | undefined + yargs.boolean("a").option("a", { string: true }).option("a", { number: true }).argv.a; } function Argv$fallbackToAnyForUnknownOptions() { From 6dda01ad332ee57f5fb11b87206dd93fd213d7ba Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 01:50:12 +0100 Subject: [PATCH 0118/2268] move fingerprintjs types to v1 sub-folder --- types/fingerprintjs2/{ => v1}/fingerprintjs2-tests.ts | 0 types/fingerprintjs2/{ => v1}/index.d.ts | 0 types/fingerprintjs2/{ => v1}/tsconfig.json | 0 types/fingerprintjs2/{ => v1}/tslint.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename types/fingerprintjs2/{ => v1}/fingerprintjs2-tests.ts (100%) rename types/fingerprintjs2/{ => v1}/index.d.ts (100%) rename types/fingerprintjs2/{ => v1}/tsconfig.json (100%) rename types/fingerprintjs2/{ => v1}/tslint.json (100%) diff --git a/types/fingerprintjs2/fingerprintjs2-tests.ts b/types/fingerprintjs2/v1/fingerprintjs2-tests.ts similarity index 100% rename from types/fingerprintjs2/fingerprintjs2-tests.ts rename to types/fingerprintjs2/v1/fingerprintjs2-tests.ts diff --git a/types/fingerprintjs2/index.d.ts b/types/fingerprintjs2/v1/index.d.ts similarity index 100% rename from types/fingerprintjs2/index.d.ts rename to types/fingerprintjs2/v1/index.d.ts diff --git a/types/fingerprintjs2/tsconfig.json b/types/fingerprintjs2/v1/tsconfig.json similarity index 100% rename from types/fingerprintjs2/tsconfig.json rename to types/fingerprintjs2/v1/tsconfig.json diff --git a/types/fingerprintjs2/tslint.json b/types/fingerprintjs2/v1/tslint.json similarity index 100% rename from types/fingerprintjs2/tslint.json rename to types/fingerprintjs2/v1/tslint.json From dc80f4fdbb210e70c3ba2b8c4e02b50c501bd027 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:32:55 +0300 Subject: [PATCH 0119/2268] added fn type for order --- types/sequelize/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index f25aacc3e4..4ab0ee11a8 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3330,7 +3330,7 @@ declare namespace sequelize { * first element is the column / function to order by, the second is the direction. For example: * `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. */ - order?: string | col | literal | Array | { model: Model, as?: string }> | Array | { model: Model, as?: string }>>; + order?: string | col | literal | Array | { model: Model, as?: string } | fn> | fn | Array | { model: Model, as?: string }| fn>| fn>; /** * Limit the results @@ -5240,13 +5240,13 @@ declare namespace sequelize { * `this.constructor.prototype.find.apply(this, arguments)` */ classMethods?: Object; - + /** * Change the database schema. PG only feature, but also works with other dialects. */ schema?: string; - - + + /** * Change the database schema delimiter. Defaults to "." on PG but for other dialects can be also changed to "_". */ From c8b9249b2b51ecb7920617e8ddf101633bb90f91 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:35:40 +0300 Subject: [PATCH 0120/2268] added tests for order with order --- types/sequelize/sequelize-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 6b7ea6ea0a..4f0520ff84 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -946,6 +946,8 @@ User.findAll( { where : { user_id : 1 }, attributes : ['a', 'b'], include : [{ m User.findAll( { order : s.literal( 'email =' ) } ); User.findAll( { order : [s.literal( 'email = ' + s.escape( 'test@sequelizejs.com' ) )] } ); User.findAll( { order : [['id', ';DELETE YOLO INJECTIONS']] } ); +User.findAll( { order : Sequelize.random() } ); +User.findAll( { order : [Sequelize.random()] } ); User.findAll( { include : [User], order : [[User, 'id', ';DELETE YOLO INJECTIONS']] } ); User.findAll( { include : [User], order : [['id', 'ASC NULLS LAST'], [User, 'id', 'DESC NULLS FIRST']] } ); User.findAll( { include : [{ model : User, where : { title : 'DoDat' }, include : [{ model : User }] }] } ); From dcbe9083a25abff7d02ed78d64f7bc056db4f849 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:39:14 +0300 Subject: [PATCH 0121/2268] updated tests to use s. --- types/sequelize/sequelize-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 4f0520ff84..943fed79e3 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -946,8 +946,8 @@ User.findAll( { where : { user_id : 1 }, attributes : ['a', 'b'], include : [{ m User.findAll( { order : s.literal( 'email =' ) } ); User.findAll( { order : [s.literal( 'email = ' + s.escape( 'test@sequelizejs.com' ) )] } ); User.findAll( { order : [['id', ';DELETE YOLO INJECTIONS']] } ); -User.findAll( { order : Sequelize.random() } ); -User.findAll( { order : [Sequelize.random()] } ); +User.findAll( { order : s.random() } ); +User.findAll( { order : [s.random()] } ); User.findAll( { include : [User], order : [[User, 'id', ';DELETE YOLO INJECTIONS']] } ); User.findAll( { include : [User], order : [['id', 'ASC NULLS LAST'], [User, 'id', 'DESC NULLS FIRST']] } ); User.findAll( { include : [{ model : User, where : { title : 'DoDat' }, include : [{ model : User }] }] } ); From cefa24199f09265e6dec5b0ddddc0bd0b229ab82 Mon Sep 17 00:00:00 2001 From: Dima Smirnov Date: Sun, 2 Dec 2018 15:50:21 +0300 Subject: [PATCH 0122/2268] increased the version number in the header --- types/sequelize/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 4ab0ee11a8..06f27421cb 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sequelize 4.27.10 +// Type definitions for Sequelize 4.27.11 // Project: http://sequelizejs.com // Definitions by: samuelneff // Peter Harris @@ -15,6 +15,7 @@ // Nick Schultz // Thomas Breleur // Antoine Boisadam +// Dima Smirnov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 From a515e8ae200e7344bd599d09a058babd06b94959 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 18:16:02 +0100 Subject: [PATCH 0123/2268] Add types for fingerprintjs2 v2, fix config for v1 --- types/fingerprintjs2/fingerprintjs2-tests.ts | 135 +++++++++++++++++++ types/fingerprintjs2/index.d.ts | 124 +++++++++++++++++ types/fingerprintjs2/tsconfig.json | 24 ++++ types/fingerprintjs2/tslint.json | 1 + types/fingerprintjs2/v1/tsconfig.json | 11 +- 5 files changed, 292 insertions(+), 3 deletions(-) create mode 100644 types/fingerprintjs2/fingerprintjs2-tests.ts create mode 100644 types/fingerprintjs2/index.d.ts create mode 100644 types/fingerprintjs2/tsconfig.json create mode 100644 types/fingerprintjs2/tslint.json diff --git a/types/fingerprintjs2/fingerprintjs2-tests.ts b/types/fingerprintjs2/fingerprintjs2-tests.ts new file mode 100644 index 0000000000..f11caae127 --- /dev/null +++ b/types/fingerprintjs2/fingerprintjs2-tests.ts @@ -0,0 +1,135 @@ +import * as fingerprint2 from 'fingerprintjs2'; + +function defaultCallback(components: fingerprint2.Component[]) {} +function v18Callback(murmur: string, components: fingerprint2.V18Component[]) {} + +function test_x64hash128() { + // $ExpectType string + fingerprint2.x64hash128('abc', 99); +} + +function test_get_default_settings() { + fingerprint2.get(defaultCallback); +} + +function test_get_with_options() { + fingerprint2.get({ excludes: { userAgent: true } }, defaultCallback); +} + +function test_getPromise_default_settings() { + // $ExpectType Promise + fingerprint2.getPromise(); +} + +function test_getPromise_with_options() { + // $ExpectType Promise + fingerprint2.getPromise({ excludes: { userAgent: true } }); +} + +function test_getV18_default_settings() { + fingerprint2.getV18(v18Callback); +} + +function test_getV18_with_options() { + fingerprint2.getV18({ excludes: { userAgent: true } }, v18Callback); +} + +function test_get_audio_options() { + const options: fingerprint2.Options = { + audio: { + timeout: 10, + excludeIOS11: true, + }, + }; + fingerprint2.get(options, defaultCallback); +} + +function test_get_fonts_options() { + const options: fingerprint2.Options = { + fonts: { + swfContainerId: 'swfContainerId', + swfPath: 'pathToSwf', + userDefinedFonts: ['font1', 'font2'], + extendedJsFonts: true, + }, + }; + fingerprint2.get(options, defaultCallback); +} + +function test_get_screen_options() { + const options: fingerprint2.Options = { + screen: { + detectScreenOrientation: true, + }, + }; + fingerprint2.get(options, defaultCallback); +} + +function test_get_plugins_options() { + const options: fingerprint2.Options = { + plugins: { + sortPluginsFor: [/foo/i], + excludeIE: true, + }, + }; + fingerprint2.get(options, defaultCallback); +} + +function test_get_extraComponents_options() { + const options: fingerprint2.Options = { + extraComponents: [ + { + key: 'foo', + getData(done, options) { + // $ExpectType (value: any) => void + done; + // $ExpectType Options + options; + + done('foo'); + }, + pauseBefore: false, + }, + ], + }; + fingerprint2.get(options, defaultCallback); +} + +function test_get_excludes_options() { + let options: fingerprint2.Options; + + options = { excludes: { userAgent: true } }; + options = { excludes: { language: true } }; + options = { excludes: { colorDepth: true } }; + options = { excludes: { deviceMemory: true } }; + options = { excludes: { pixelRatio: true } }; + options = { excludes: { hardwareConcurrency: true } }; + options = { excludes: { screenResolution: true } }; + options = { excludes: { availableScreenResolution: true } }; + options = { excludes: { timezoneOffset: true } }; + options = { excludes: { timezone: true } }; + options = { excludes: { sessionStorage: true } }; + options = { excludes: { localStorage: true } }; + options = { excludes: { indexedDb: true } }; + options = { excludes: { addBehavior: true } }; + options = { excludes: { openDatabase: true } }; + options = { excludes: { cpuClass: true } }; + options = { excludes: { platform: true } }; + options = { excludes: { doNotTrack: true } }; + options = { excludes: { plugins: true } }; + options = { excludes: { canvas: true } }; + options = { excludes: { webgl: true } }; + options = { excludes: { webglVendorAndRenderer: true } }; + options = { excludes: { adBlock: true } }; + options = { excludes: { hasLiedLanguages: true } }; + options = { excludes: { hasLiedResolution: true } }; + options = { excludes: { hasLiedOs: true } }; + options = { excludes: { hasLiedBrowser: true } }; + options = { excludes: { touchSupport: true } }; + options = { excludes: { fonts: true } }; + options = { excludes: { fontsFlash: true } }; + options = { excludes: { audio: true } }; + options = { excludes: { enumerateDevices: true } }; + + fingerprint2.get(options, defaultCallback); +} diff --git a/types/fingerprintjs2/index.d.ts b/types/fingerprintjs2/index.d.ts new file mode 100644 index 0000000000..1b8a50fe77 --- /dev/null +++ b/types/fingerprintjs2/index.d.ts @@ -0,0 +1,124 @@ +// Type definitions for fingerprintjs2 2.0 +// Project: https://github.com/Valve/fingerprintjs2 +// Definitions by: Curt Mullin +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace Fingerprint2; +export = Fingerprint2; + +declare var Fingerprint2: Fingerprint2.Static; + +declare namespace Fingerprint2 { + interface Static { + VERSION: string; + + get(options: Options, callback: (components: Component[]) => void): void; + get(callback: (components: Component[]) => void): void; + getPromise(options?: Options): Promise; + getV18( + options: Options, + callback: (murmur: string, components: V18Component[]) => void + ): void; + getV18(callback: (murmur: string, components: V18Component[]) => void): void; + + x64hash128(value: string, num: number): string; + } + + interface Component { + key: string; + value: any; + } + + interface V18Component { + key: string; + value: string; + } + + interface Options { + preprocessor?: (key: string, value: any) => any; + + audio?: { + timeout: number; + /** + * On iOS 11, audio context can only be used in response to user interaction. + * We require users to explicitly enable audio fingerprinting on iOS 11. + * See https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088 + */ + excludeIOS11: boolean; + }; + + fonts?: { + swfContainerId: string; + swfPath: string; + userDefinedFonts: string[]; + extendedJsFonts: boolean; + }; + + screen?: { + /** + * To ensure consistent fingerprints when users rotate their mobile devices + */ + detectScreenOrientation: boolean; + }; + + plugins?: { + sortPluginsFor: RegExp[]; + excludeIE: boolean; + }; + + extraComponents?: Array<{ + key: string; + getData(done: (value: any) => void, options: Options): void; + pauseBefore?: boolean; + }>; + + excludes?: { + userAgent?: boolean; + language?: boolean; + colorDepth?: boolean; + deviceMemory?: boolean; + /** + * devicePixelRatio depends on browser zoom, and it's impossible to detect browser zoom + */ + pixelRatio?: boolean; + hardwareConcurrency?: boolean; + screenResolution?: boolean; + availableScreenResolution?: boolean; + timezoneOffset?: boolean; + timezone?: boolean; + sessionStorage?: boolean; + localStorage?: boolean; + indexedDb?: boolean; + addBehavior?: boolean; + openDatabase?: boolean; + cpuClass?: boolean; + platform?: boolean; + /** + * DNT depends on incognito mode for some browsers (Chrome) and it's impossible to detect incognito mode + */ + doNotTrack?: boolean; + plugins?: boolean; + canvas?: boolean; + webgl?: boolean; + webglVendorAndRenderer?: boolean; + adBlock?: boolean; + hasLiedLanguages?: boolean; + hasLiedResolution?: boolean; + hasLiedOs?: boolean; + hasLiedBrowser?: boolean; + touchSupport?: boolean; + fonts?: boolean; + fontsFlash?: boolean; + audio?: boolean; + /** + * Unreliable on Windows, see https://github.com/Valve/fingerprintjs2/issues/375 + */ + enumerateDevices?: boolean; + }; + + NOT_AVAILABLE?: string; + ERROR?: string; + EXCLUDED?: string; + } +} diff --git a/types/fingerprintjs2/tsconfig.json b/types/fingerprintjs2/tsconfig.json new file mode 100644 index 0000000000..b274c3c488 --- /dev/null +++ b/types/fingerprintjs2/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", + "fingerprintjs2-tests.ts" + ] +} \ No newline at end of file diff --git a/types/fingerprintjs2/tslint.json b/types/fingerprintjs2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fingerprintjs2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fingerprintjs2/v1/tsconfig.json b/types/fingerprintjs2/v1/tsconfig.json index b274c3c488..4f7e97d591 100644 --- a/types/fingerprintjs2/v1/tsconfig.json +++ b/types/fingerprintjs2/v1/tsconfig.json @@ -9,10 +9,15 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], + "paths": { + "fingerprintjs2": [ + "fingerprintjs2/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true @@ -21,4 +26,4 @@ "index.d.ts", "fingerprintjs2-tests.ts" ] -} \ No newline at end of file +} From ee2293da4b1ac471cd34b86a62c65e083608bc32 Mon Sep 17 00:00:00 2001 From: denis Date: Fri, 30 Nov 2018 23:12:01 +0100 Subject: [PATCH 0124/2268] Add core and utils --- .../ckeditor__ckeditor5-core-tests.ts | 328 ++++ types/ckeditor__ckeditor5-core/index.d.ts | 269 ++++ types/ckeditor__ckeditor5-core/tsconfig.json | 26 + types/ckeditor__ckeditor5-core/tslint.json | 22 + .../ckeditor__ckeditor5-engine-tests.ts | 81 + types/ckeditor__ckeditor5-engine/index.d.ts | 1368 +++++++++++++++++ .../ckeditor__ckeditor5-engine/tsconfig.json | 24 + types/ckeditor__ckeditor5-engine/tslint.json | 20 + .../ckeditor__ckeditor5-utils-tests.ts | 26 +- types/ckeditor__ckeditor5-utils/index.d.ts | 8 +- 10 files changed, 2160 insertions(+), 12 deletions(-) create mode 100644 types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts create mode 100644 types/ckeditor__ckeditor5-core/index.d.ts create mode 100644 types/ckeditor__ckeditor5-core/tsconfig.json create mode 100644 types/ckeditor__ckeditor5-core/tslint.json create mode 100644 types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts create mode 100644 types/ckeditor__ckeditor5-engine/index.d.ts create mode 100644 types/ckeditor__ckeditor5-engine/tsconfig.json create mode 100644 types/ckeditor__ckeditor5-engine/tslint.json diff --git a/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts b/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts new file mode 100644 index 0000000000..68a20aff51 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/ckeditor__ckeditor5-core-tests.ts @@ -0,0 +1,328 @@ +import * as utils from "ckeditor__ckeditor5-utils"; +import * as core from "ckeditor__ckeditor5-core"; +import * as engine from "ckeditor__ckeditor5-engine"; + +declare let bool: boolean; +declare let command: core.Command; +declare let commandCollection: core.CommandCollection; +declare let commands: core.Command[]; +declare let componentFactory: core.ComponentFactory; +declare let config: utils.Config; +declare let conversion: engine.conversion.Conversion; +declare let dataController: engine.controller.DataController; +declare let editingController: engine.controller.EditingController; +declare let editingKeystrokeHandler: core.EditingKeystrokeHandler; +declare let editor: core.editor.Editor; +declare let focusTracker: utils.FocusTracker; +declare let htmlElement: HTMLElement; +declare let keystrokes: core.EditingKeystrokeHandler; +declare let locale: utils.Locale; +declare let model: engine.model.Model; +declare let num: number; +declare let pendingActions: core.PendingActions; +declare let plugin: core.Plugin; +declare let pluginCollection: core.PluginCollection; +declare let pluginCollectionStr: core.PluginCollection>; +declare let pluginStr: core.Plugin; +declare let myPlugin: MyPlugin; +declare let myPluginMaybe: MyPlugin | undefined; +declare let myPlugins: MyPlugin[]; +declare let str: string; +declare let strOrUndef: string | undefined; +declare let strs: string[]; +declare let ui: core.editor.EditorUI; +declare let undef: undefined; +declare let view: core.EditorUIView; + +class MyPlugin extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } + + static get pluginName() { + return "A"; + } + + myMethod() { + return "this is MyPlugin method"; + } +} + +class SomeCommand extends core.Command { + execute() {} +} + +// core/editor/utils/dataapimixin ============================================= + +class DataApiEditor extends core.editor.Editor implements core.editor.utils.DataApi { + // mixin by DataApiMixin + getData: () => string; + setData: (data: string) => void; +} +utils.mix(DataApiEditor, core.editor.utils.DataApiMixin); +const dataApiEditor = new DataApiEditor(); + +dataApiEditor.setData("foo"); +str = dataApiEditor.getData(); + +// core/editor/utils/elementapimixin ========================================== + +class ElementApiEditor extends core.editor.Editor implements core.editor.utils.ElementApi { + // mixin by ElementApiMixin + readonly sourceElement: HTMLElement; + updateSourceElement: () => void; +} +utils.mix(ElementApiEditor, core.editor.utils.ElementApiMixin); +const elementApiEditor = new ElementApiEditor(); + +htmlElement = elementApiEditor.sourceElement; +elementApiEditor.updateSourceElement(); + +// core/editor/utils/attachtoform ============================================= + +// $ExpectError +core.editor.utils.attachToForm(editor); +core.editor.utils.attachToForm(elementApiEditor); + +// core/editor/editor ========================================================= + +commandCollection = editor.commands; +config = editor.config; +editingController = editor.editing; +conversion = editor.conversion; +dataController = editor.data; +editor.isReadOnly = bool; +editingKeystrokeHandler = editor.keystrokes; +locale = editor.locale; +model = editor.model; +pluginCollection = editor.plugins; + +if (editor.state === "initializing") { + console.log("new Editor()"); +} else if (editor.state === "ready") { + console.log("Editor.create()"); +} else if (editor.state === "destroyed") { + console.log("editor.destroy"); +} else { + const n: never = editor.state; +} + +editor.state = "ready"; + +core.editor.Editor.builtinPlugins = [plugin, pluginStr, plugin]; +const plugins: Array> = core.editor.Editor.builtinPlugins; + +core.editor.Editor.defaultConfig = { + foo: { + a: 1, + b: 2 + } +}; + +editor = new core.editor.Editor(); +editor = new core.editor.Editor({language: "pl"}); + +editor.destroy(); +editor.destroy().then(() => { + console.log(`${editor.state} == destroyed`); +}); + +editor.execute("someCommand"); +editor.execute("someCommand2", "arg1", 2); + +editor.initPlugins(); +editor.initPlugins().then(() => { + console.log(`init ${Array.from(editor.plugins).length} plugins`); +}); + +locale.t = editor.t; +str = editor.t("Label"); +str = editor.t('Created file "%0" in %1ms.', ["fileName", "100"]); + +// core/editor/editorui ======================================================= + +componentFactory = ui.componentFactory; +editor = ui.editor; +focusTracker = ui.focusTracker; +view = ui.view; + +ui = new core.editor.EditorUI(editor, view); +ui.destroy(); +ui.update(); + +// core/editor/editorwithui =================================================== + +declare let ewui: core.editor.EditorWithUI; +htmlElement = ewui.element!; +ui = ewui.ui; + +// core/command =============================================================== + +editor = command.editor; + +bool = command.isEnabled; + +undef = command.value; +strOrUndef = new core.Command(editor).value; + +command = new core.Command(editor); + +command.destroy(); + +command.execute(); + +command.refresh(); + +// core/commandcollection ===================================================== + +commandCollection = new core.CommandCollection(); + +const collectionsPairs = Array.from(commandCollection); +const collectionsPair = collectionsPairs[0]; +str = collectionsPair[0]; +command = collectionsPair[1]; + +commandCollection.add("foo", new SomeCommand(editor)); + +command = commandCollection.commands().next().value; +commands = Array.from(commandCollection.commands()); + +commandCollection.destroy(); + +commandCollection.execute("foo"); +commandCollection.execute("bar", 1, "param"); + +command = commandCollection.get("foo"); + +str = commandCollection.names().next().value; +strs = Array.from(commandCollection.names()); + +// core/editingkeystrokehandler =============================================== + +keystrokes = new core.EditingKeystrokeHandler(editor); + +editor = keystrokes.editor; + +keystrokes.press({keyCode: 123}); + +keystrokes.set("Ctrl+A", "foo"); +keystrokes.set(["shift", "33"], "foo"); +keystrokes.set(["ctrl", "A"], "foo", {priority: 10}); +keystrokes.set(["ctrl", "A"], "foo", {priority: "high"}); +keystrokes.set(["ctrl", "A"], () => console.log("key")); +keystrokes.set(["ctrl", "A"], (keyEvtData, cancel) => { + console.log(keyEvtData.keyCode); + cancel(); +}); + +// core/pendingactions ======================================================== + +pendingActions = new core.PendingActions(editor); + +str = core.PendingActions.pluginName; + +const firstAction = pendingActions.first; + +bool = pendingActions.hasAny; + +strs = Array.from(pendingActions, action => action.message); + +const action1 = pendingActions.add("Action 1"); + +pendingActions.remove(action1); + +firstAction!.fire("I'm an Observable with a message"); +str = firstAction!.message; +str = action1.message; + +// core/plugin ================================================================ + +class MyPluginMini extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } +} + +class MyPluginAll extends core.Plugin { + constructor(editor: core.editor.Editor) { + super(editor); + } + + static get pluginName() { + return "All"; + } + + static get requires() { + return [MyPlugin, MyPluginMini]; + } + + afterInit() {return Math.random() ? null : Promise.resolve("resolved"); } + destroy() {return Math.random() ? null : Promise.resolve("destroy"); } + init() {return Math.random() ? null : Promise.resolve("init"); } +} + +plugin = new MyPlugin(editor); +plugin = new MyPluginMini(editor); +pluginStr = new MyPluginAll(editor); + +const Plugin: MyPlugin = new MyPlugin(editor); +const pluginMini: MyPluginMini = new MyPluginMini(editor); +const pluginAll: MyPluginAll = new MyPluginAll(editor); + +editor = myPlugin.editor; + +str = MyPluginAll.pluginName; +strOrUndef = MyPluginMini.pluginName; // Todo: should be undefined. + +plugin = new MyPluginAll.requires[0](editor); + +const fs: Function[] = MyPluginAll.requires; +const fsOrUndef = MyPluginMini.requires; // Todo: should be undefined. + +// $ExpectError +pluginMini.afterInit(); +pluginAll.afterInit(); + +// $ExpectError +pluginMini.destroy(); +pluginAll.destroy(); + +// $ExpectError +pluginMini.init(); +pluginAll.init(); + +// core/plugincollection ====================================================== + +pluginCollectionStr = new core.PluginCollection(editor, [MyPluginAll]); +// $ExpectError +pluginCollectionStr = new core.PluginCollection(editor, [MyPlugin]); + +const aColl = new core.PluginCollection(editor, [MyPluginAll, MyPluginMini]); + +const myColl = new core.PluginCollection(editor, [MyPlugin]); + +const myCollArray = Array.from(myColl); +myPlugins = myCollArray.map(entry => entry[1]); +myPlugin = new (myCollArray[0][0])(editor); + +myColl.destroy() + .then(destroyedPlugins => { + num = destroyedPlugins.length; + const plugin = destroyedPlugins[0]; + editor = plugin.editor; + plugin.init!(); + plugin.destroy(); + str = plugin.myMethod(); + }); + +myPluginMaybe = myColl.get("A"); +myPluginMaybe = myColl.get(MyPlugin); + +myColl.load([MyPlugin, "A"]) + .then((loadedPlugins) => { + const plugin = loadedPlugins[0]; + editor = plugin.editor; + str = plugin.myMethod(); + }); + +myColl.load([MyPlugin, "A"], [MyPlugin, "A"]); diff --git a/types/ckeditor__ckeditor5-core/index.d.ts b/types/ckeditor__ckeditor5-core/index.d.ts new file mode 100644 index 0000000000..63ae237739 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/index.d.ts @@ -0,0 +1,269 @@ +// Type definitions for @ckeditor/ckeditor5-core 11.0 +// Project: https://github.com/ckeditor/ckeditor5-core +// Definitions by: denisname +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as engine from "ckeditor__ckeditor5-engine"; +import * as ckutils from "ckeditor__ckeditor5-utils"; + +// TODO: depends on other libraries +export interface AlignmentConfig {} +export interface AutosaveConfig {} +export interface CKFinderAdapterConfig {} +export interface CloudServicesConfig {} +export interface FontFamilyConfig {} +export interface FontSizeConfig {} +export interface HeadingConfig {} +export interface HighlightConfig {} +export interface ImageConfig {} +export interface MediaEmbedConfig {} +export interface TypingConfig {} +export interface ComponentFactory {} // CKEditor 5 UI +export interface EditorUIView {} // CKEditor 5 UI + +export namespace editor { + namespace utils { + // core/editor/utils/attachtoform + + function attachToForm(editor: Editor & ElementApi): void; + + // core/editor/utils/dataapimixin + + const DataApiMixin: DataApi; + + interface DataApi { + getData(): string; + setData(data: string): void; + } + + // core/editor/utils/elementapimixin + + const ElementApiMixin: ElementApi; + + interface ElementApi { + readonly sourceElement: HTMLElement; + updateSourceElement(): void; + } + } + + // core/editor/editor + + class Editor implements ckutils.Emitter, ckutils.Observable { + readonly commands: CommandCollection; + readonly config: ckutils.Config; + readonly conversion: engine.conversion.Conversion; + readonly data: engine.controller.DataController; + readonly editing: engine.controller.EditingController; + isReadOnly: boolean; + readonly keystrokes: EditingKeystrokeHandler; + readonly locale: ckutils.Locale; + readonly model: engine.model.Model; + readonly plugins: PluginCollection>; + state: "initializing" | "ready" | "destroyed"; + + static builtinPlugins: Array>; + static defaultConfig: object; + + constructor(config?: object); + destroy(): Promise; + execute(commandName: string, ...commandParams: any[]): void; + initPlugins(): Promise; + t(str: string, values?: string[]): string; + + static create(config: object): Promise; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // core/editor/editorconfig + + interface EditorConfig { + alignment: AlignmentConfig; + autosave: AutosaveConfig; + balloonToolbar: string[]; + blockToolbar: string[]; + ckfinder: CKFinderAdapterConfig; + cloudServices: CloudServicesConfig; + fontFamily: FontFamilyConfig; + fontSize: FontSizeConfig; + heading: HeadingConfig; + highlight: HighlightConfig; + image: ImageConfig; + language: string; + mediaEmbed: MediaEmbedConfig; + plugins: Array; + removePlugins: string[]; + toolbar: string[] | {items: string[]; viewportTopOffset: number; }; + typing: TypingConfig; + } + + // core/editor/editorui + + class EditorUI implements ckutils.Emitter { + readonly componentFactory: ComponentFactory; + readonly editor: Editor; + readonly focusTracker: ckutils.FocusTracker; + readonly view: EditorUIView; + + constructor(editor: Editor, view: EditorUIView); + destroy(): void; + update(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + } + + // core/editor/editorwithui + + interface EditorWithUI { + readonly element: HTMLElement | null; + readonly ui: EditorUI; + } +} + +// core/command + +export class Command implements ckutils.Emitter, ckutils.Observable { + readonly editor: editor.Editor; + readonly isEnabled: boolean; + readonly value: T | undefined; + + constructor(editor: editor.Editor); + destroy(): void; + execute(): void; + refresh(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; +} + +// core/commandcollection + +export class CommandCollection { + constructor(); + [Symbol.iterator](): Iterator<[string, Command]>; + add(commandName: string, command: Command): void; + commands(): IterableIterator; + destroy(): void; + execute(commandName: string, ...commandParams: any[]): void; + get(commandName: string): Command; + names(): IterableIterator; +} + +// core/editingkeystrokehandler + +export class EditingKeystrokeHandler extends ckutils.KeystrokeHandler { + readonly editor: editor.Editor; + + constructor(editor: editor.Editor); + set( + keystroke: string | Array, + callback: string | ((keyEvtData: engine.view.observer.KeyEventData, cancel: () => void) => void), + options?: {priority: ckutils.PriorityString | number} + ): void; +} + +// core/pendingactions + +export class PendingActions extends Plugin { + static readonly pluginName: "PendingActions"; + + first: null | ckutils.Observable & {message: string}; + readonly hasAny: boolean; + + [Symbol.iterator](): Iterator; + add(message: string): ckutils.Observable & {message: string}; + remove(action: ckutils.Observable & {message: string}): void; +} + +// core/plugin + +export abstract class Plugin implements ckutils.Emitter, ckutils.Observable { + readonly editor: editor.Editor; + + static readonly pluginName?: string; + static readonly requires?: Array Plugin>; + + constructor(editor: editor.Editor); + afterInit?(): null | Promise; + destroy?(): null | Promise; + init?(): null | Promise; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; +} + +// PluginInterface, see Plugin + +// core/plugincollection + +export class PluginCollection

> { + constructor( + editor: editor.Editor, + availablePlugins?: Array P> + ); + + [Symbol.iterator](): Iterator<[new(editor: editor.Editor) => P, P]>; + + destroy(): Promise}>>; + + get( + key: string | (new(editor: editor.Editor) => P) + ): P | undefined; + + load( + plugins: Array P)>, + removePlugins?: Array P)> + ): Promise; +} diff --git a/types/ckeditor__ckeditor5-core/tsconfig.json b/types/ckeditor__ckeditor5-core/tsconfig.json new file mode 100644 index 0000000000..5f53bb9035 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6", + "dom", + "es2015.promise" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ckeditor__ckeditor5-core-tests.ts" + ] +} diff --git a/types/ckeditor__ckeditor5-core/tslint.json b/types/ckeditor__ckeditor5-core/tslint.json new file mode 100644 index 0000000000..b4dd998211 --- /dev/null +++ b/types/ckeditor__ckeditor5-core/tslint.json @@ -0,0 +1,22 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": { + "options": [ + ["Object", "Avoid using the `Object` type. Did you mean `object`?"], + ["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"], + ["Number", "Avoid using the `Number` type. Did you mean `number`?"], + ["String", "Avoid using the `String` type. Did you mean `string`?"], + ["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"] + ] + }, + "no-empty-interface": false, + "prefer-switch": false, + "quotemark": [ + true, + "double", + "avoid-escape", + "avoid-template" + ] + } +} diff --git a/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts b/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts new file mode 100644 index 0000000000..676f30ac3b --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/ckeditor__ckeditor5-engine-tests.ts @@ -0,0 +1,81 @@ +import * as engine from "ckeditor__ckeditor5-engine"; + +declare let pattern: engine.view.MatcherPattern; + +pattern = {name: /^p/}; + +pattern = { + attributes: { + title: "foobar", + foo: /^\w+/, + bar: true, + } +}; + +pattern = { + classes: "foobar" +}; + +pattern = { + classes: /foo.../ +}; + +pattern = { + classes: ["baz", "bar", /foo.../] +}; + +pattern = { + styles: { + position: "absolute", + color: /^\w*blue$/ + } +}; + +pattern = { + name: "span", + styles: { + "font-weight": "bold" + }, + classes: "highlighted" +}; + +pattern = (element: engine.view.Element) => { + if (element.name === "div" && element.childCount > 0) { + return {name: true}; + } + + return null; +}; + +pattern = (element: engine.view.Element) => { + if (element.name === "p") { + const fontSize = element.getStyle("font-size")!; + const size = fontSize.match(/(\d+)/px); + + if (size && Number(size[1]) > 26) { + return {name: true, attribute: ["font-size"]}; + } + } + + return null; +}; + +declare let viewDefinition: engine.view.ElementDefinition; + +viewDefinition = "p"; + +viewDefinition = { + name: "h1", + classes: ["foo", "bar"], +}; + +viewDefinition = { + name: "span", + styles: { + "font-size": "12px", + "font-weight": "bold", + }, + attributes: { + "data-id": "123", + } +}; diff --git a/types/ckeditor__ckeditor5-engine/index.d.ts b/types/ckeditor__ckeditor5-engine/index.d.ts new file mode 100644 index 0000000000..280b6ea213 --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/index.d.ts @@ -0,0 +1,1368 @@ +// Type definitions for @ckeditor/ckeditor5-engine 11.0 +// Project: https://github.com/ckeditor/ckeditor5-engine +// Definitions by: denisname +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as ckutils from "ckeditor__ckeditor5-utils"; + +export namespace controller { + // engine/controller/datacontroller + + class DataController implements ckutils.Emitter, ckutils.Observable { + readonly downcastDispatcher: conversion.DowncastDispatcher; + readonly mapper: conversion.Mapper; + readonly model: model.Model; + readonly processor: dataprocessor.DataProcessor; + readonly upcastDispatcher: conversion.UpcastDispatcher; + + constructor(model: model.Model, dataProcessor?: dataprocessor.DataProcessor); + destroy(): void; + get(rootName?: string): string; + init(data: string, rootName?: string): Promise; + parse(data: string, context?: model.SchemaContextDefinition): model.DocumentFragment; + stringify(modelElementOrFragment: Element | model.DocumentFragment): string; + toModel(viewElementOrFragment: Element | model.DocumentFragment, context?: model.SchemaContextDefinition): model.DocumentFragment; + toView(modelElementOrFragment: Element | model.DocumentFragment): model.DocumentFragment; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // engine/controller/editingcontroller + + class EditingController implements ckutils.Emitter, ckutils.Observable { + readonly downcastDispatcher: conversion.DowncastDispatcher; + readonly mapper: conversion.Mapper; + readonly model: model.Model; + readonly view: view.View; + + constructor(model: model.Model); + destroy(): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } +} + +export namespace conversion { + // engine/conversion/conversion + + class Conversion { + constructor(); + attributeToAttribute(definition?: {model: string | Object, view?: string | Object, upcastAlso?: view.MatcherPattern | view.MatcherPattern[]}): void; + attributeToElement(definition: ConverterDefinition): void; + elementToElement(definition: ConverterDefinition): void; + for(groupName: string): {add: () => void}; + register(groupName: string, dispatchers: Array): void; + } + + interface ConverterDefinition { + converterPriority: ckutils.PriorityString; + model: any; + upcastAlso: view.MatcherPattern | view.MatcherPattern[]; + view: view.ElementDefinition | Object; + } + + // engine/conversion/downcast-converters + + interface HighlightDescriptor { + attributes: Object; + classes: string | string[]; + id: string; + priority: number; + } + + // engine/conversion/downcast-selection-converters + + function clearAttributes(): Function; + + function convertCollapsedSelection(): Function; + + function convertRangeSelection(): Function; + + // engine/conversion/downcastdispatcher + + class DowncastDispatcher { + // TODO + } + + // engine/conversion/mapper + + class Mapper { + constructor(); + bindElementToMarker(element: view.Element, name: string): void; + bindElements(modelElement: model.Element, viewElement: view.Element): void; + clearBindings(): void; + getModelLength(viewNode: view.Element): number; + markerNameToElements(name: string): Set | null; + registerViewToModelLength(viewElementName: string, lengthCallback: Function): void; + toModelElement(viewElement: view.Element): model.Element | undefined; + toModelPosition(viewPosition: view.Position): model.Position; + toModelRange(viewRange: view.Range): model.Range; + toViewElement(modelElement: model.Element): view.Element | undefined; + toViewPosition(modelPosition: model.Position, options?: {isPhantom: boolean}): view.Position; + toViewRange(modelRange: model.Range): view.Range; + unbindElementsFromMarkerName(name: string): void; + unbindModelElement(modelElement: model.Element): void; + unbindViewElement(viewElement: view.Element): void; + } + + // engine/conversion/modelconsumable + + class ModelConsumable { + constructor(); + add(item: model.Item | model.Selection | model.Range, type: string): void; + consume(item: model.Item | model.Selection | model.Range, type: string): boolean; + revert(item: model.Item | model.Selection | model.Range, type: string): null | boolean; + test(item: model.Item | model.Selection | model.Range, type: string): null | boolean; + } + + // engine/conversion/upcast-converters + + function convertText(): Function; + + function convertToModelFragment(): Function; + + function upcastAttributeToAttribute( + config: {view: string | {key: string, name: string, value: string | RegExp | Function}, + model: string | {key: string, value: string | Function}, + converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToAttribute( + config: {view: view.MatcherPattern, model: string | {key: string, value: string | Function}, converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToElement( + config: {view: view.MatcherPattern, model: string | Element | Function, converterPriority?: ckutils.PriorityString} + ): Function; + + function upcastElementToMarker( + config: {view: view.MatcherPattern, model: string | Function, converterPriority?: ckutils.PriorityString} + ): Function; + + // engine/conversion/upcast-selection-converters + + function convertSelectionChange(model: model.Model, mapper: Mapper): Function; + + // engine/conversion/upcastdispatcher + + class UpcastDispatcher { + // TODO + } + + interface ViewConversionApi { + // TODO + } + + // engine/conversion/viewconsumable + + class ViewConsumable { + // TODO + } +} + +export namespace dataprocessor { + // engine/dataprocessor/basichtmlwriter + + class BasicHtmlWriter implements HtmlWriter { + getHtml(fragment: model.DocumentFragment): string; + } + + // engine/dataprocessor/dataprocessor + + interface DataProcessor { + // TODO + } + + // engine/dataprocessor/htmldataprocessor + + class HtmlDataProcessor implements DataProcessor { + // TODO + } + + // engine/dataprocessor/htmlwriter + + interface HtmlWriter { + getHtml(fragment: model.DocumentFragment): string; + } + + // engine/dataprocessor/xmldataprocessor + + class XmlDataProcessor implements DataProcessor { + // TODO + } +} + +export namespace devUtils { + // engine/dev-utils/enableenginedebug + + class DebugPlugin {} + + function disableEngineDebug(): void; + + function enableEngineDebug(_logger: {log: (...arg: any[]) => string, error: (...arg: any[]) => string}): DebugPlugin; + + // engine/dev-utils/model + + namespace devmodel { + function getData( + model: model.Model, + options?: { + withoutSelection?: boolean, + rootName?: string, + convertMarkers?: boolean + } + ): string; + + function parse( + data: string, + schema: model.Schema, + batch: model.Batch, + options?: { + selectionAttributes?: Object[], + lastRangeBackward?: boolean, + context?: model.SchemaContextDefinition + } + ): model.Element | model.Text | model.DocumentFragment | Object; + + function setData(model: string, data: Object, options: {rootName?: string, selectionAttributes?: Object[], lastRangeBackward?: boolean, batchType?: string}): void; + + function stringify( + node: model.RootElement | model.Element | model.Text | model.DocumentFragment, + selectionOrPositionOrRange: model.Selection | model.Position | model.Range, // TODO optional + markers: Iterable | null + ): string; + } + + // engine/dev-utils/operationreplayer + + class OperationReplayer { + // TODO + } + + // engine/dev-utils/view + + function getData( + view: view.View, + options?: { + withoutSelection?: boolean, + rootName?: boolean, + showType?: boolean, + showPriority?: boolean, + showAttributeElementId?: boolean, + renderUIElements?: boolean, + } + ): string; + + function parse( + data: string, + options: { + order?: number[], + lastRangeBackward?: boolean, + rootElement?: view.Element | view.DocumentFragment, + sameSelectionCharacters?: boolean + } + ): view.Text | view.Element | view.DocumentFragment | Object; + + function setData( + view: view.View, + data: string, + options: {rootName?: string} + ): void; + + function stringify( + node: view.Text | view.Element | view.DocumentFragment, + selectionOrPositionOrRange?: view.DocumentSelection | view.Position | view.Range, + options?: { + showType?: boolean, + showPriority?: boolean, + showAttributeElementId?: boolean, + ignoreRoot?: boolean, + sameSelectionCharacters?: boolean, + renderUIElements?: boolean, + } + ): string; +} + +export namespace model { + namespace operation { + // engine/model/operation/attributeoperation + + class AttributeOperation { + // TODO + } + + // engine/model/operation/detachoperation + + class DetachOperation { + // TODO + } + + // engine/model/operation/insertoperation + + class InsertOperation { + // TODO + } + + // engine/model/operation/markeroperation + + class MarkerOperation { + // TODO + } + + // engine/model/operation/mergeoperation + + class MergeOperation { + // TODO + } + + // engine/model/operation/moveoperation + + class MoveOperation { + // TODO + } + + // engine/model/operation/nooperation + + class NoOperation { + // TODO + } + + // engine/model/operation/operation + + class Operation { + // TODO + } + + // engine/model/operation/operationfactory + + class OperationFactory { + // TODO + } + + // engine/model/operation/renameoperation + + class RenameOperation { + // TODO + } + + // engine/model/operation/rootattributeoperation + + class RootAttributeOperation { + // TODO + } + + // engine/model/operation/splitoperation + + class SplitOperation { + // TODO + } + + // engine/model/operation/transform + + class TransformationContext { + // TODO + } + + function transform(a: Operation, b: Operation, context: TransformationContext): Operation[]; + + function transformSets(operationsA: Operation[], operationsB: Operation[], options: {document: Document | null, useRelations: boolean, padWithNoOps: boolean}): object; + } + + namespace utils { + function deleteContent( + model: Model, + selection: Selection | DocumentSelection, + batch: Batch, + options?: {leaveUnmerged: boolean, doNotResetEntireContent: boolean} + ): void; + + function getSelectedContent( + model: Model, + selection: Selection | DocumentSelection + ): DocumentFragment; + + function insertContent( + model: Model, + content: DocumentFragment | Item, + selectable?: Selection | DocumentSelection | Position | Element | Iterable | Range | null + ): void; + + function modifySelection( + model: Model, + selection: Selection | DocumentSelection, + options?: {direction?: "forward" | "backward", unit?: "character" | "codePoint" | "word"} + ): void; + + function injectSelectionPostFixer( + model: Model + ): void; + } + + // engine/model/batch + + class Batch { + // TODO + } + + // engine/model/differ + + class Differ { + // TODO + } + + // engine/model/document + + class Document { + // TODO + } + + // engine/model/documentfragment + + class DocumentFragment { + readonly childCount: number; + readonly isEmpty: boolean; + readonly markers: Map; + readonly maxOffset: number; + readonly parent: null; + readonly root: DocumentFragment; + + protected constructor(children?: Node | Iterable); + [Symbol.iterator](): Iterator; + getChild(index: number): Node | null; + getChildIndex(node: Node): number | null; + getChildStartOffset(node: Node): number | null; + getChildren(): Iterable; + getNodeByPath(relativePath: number[]): Node | DocumentFragment; + getPath(): number[]; /*TS3.0: []*/ + is(type: string): boolean; + offsetToIndex(offset: number): number; + toJSON(): Object; + protected _appendChild(items: Item | Iterable): void; + protected _insertChild(index: number, items: Item | Iterable): void; + protected _removeChildren(index: number, howMany?: number): Node[]; + + static fromJSON(json: object): DocumentFragment; + } + + // engine/model/documentselection + + class DocumentSelection { + // TODO + } + + // engine/model/element + + class Element extends Node { + readonly childCount: number; + readonly isEmpty: boolean; + readonly maxOffset: number; + readonly name: string; + + protected constructor( + name: string, + attrs?: Map | ReadonlyArray<[string, any]>, + children?: Node | Iterable + ); + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildStartOffset(node: Node): number; + getChildren(): Iterable; + getNodeByPath(relativePath: number[]): Node; + is(type: string, name?: string): boolean; + offsetToIndex(offset: number): number; + toJSON(): object; + protected _appendChild(nodes: Item | Iterable): void; + protected _clone(deep?: boolean): Element; + protected _insertChild(index: number, items: Item | Iterable): void; + protected _removeChildren(index: number, howMany?: number): Node[]; + + static fromJSON(json: object): Element; + } + + // engine/model/history + + class History { + // TODO + } + + // engine/model/item + + type Item = Node | TextProxy; + + // engine/model/liveposition + + class LivePosition { + // TODO + } + + // engine/model/liverange + + class LiveRange { + // TODO + } + + // engine/model/markercollection + + class Marker { + // TODO + } + + class MarkerCollection { + // TODO + } + + // engine/model/model + + class Model implements ckutils.Emitter, ckutils.Observable { + readonly document: Document; + readonly markers: MarkerCollection; + readonly schema: Schema; + + applyOperation(operation: operation.Operation): void; + change(callback: Function): any; + deleteContent(selection: Selection | DocumentSelection, batch: Batch, options: {leaveUnmerged?: boolean, doNotResetEntireContent?: boolean}): void; + destroy(): void; + enqueueChange(batchOrType: Batch | "transparent" | "default", callback: Function): void; + getSelectedContent(selection: Selection | DocumentSelection): DocumentFragment; + hasContent(rangeOrElement: Range | Element): boolean; + insertContent(content: DocumentFragment | Item, selectable?: Selection | DocumentSelection | Position | Element | Iterable | Range | null): void; + modifySelection(selection: Selection | DocumentSelection, options?: {direction?: "forward" | "backward", unit?: "character" | "codePoint" | "word"}): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + // engine/model/node + + class Node { + readonly document: Document | null; + readonly endOffset: number | null; + readonly index: number | null; + readonly nextSibling: Node | null; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly previousSibling: Node | null; + readonly root: Node | DocumentFragment; + readonly startOffset: number | null; + + constructor(attrs?: Map | ReadonlyArray<[string, any]>); + getAncestors(options: {includeSelf: boolean, parentFirst: boolean}): Node[]; + getAttribute(key: string): any /*| undefined*/; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getCommonAncestor(node: Node, options?: {includeSelf: boolean}): Element | DocumentFragment | null; + getPath(): number[]; + hasAttribute(key: string): boolean; + + is(type: "element"): this is Element; + is(type: "rootElement"): this is RootElement; + is(type: "text"): this is Text; + is(type: "textProxy"): this is TextProxy; + is(type: "documentFragment"): this is DocumentFragment; + is(type: string, name: string): boolean; + + isAfter(node: Node): boolean; + isBefore(node: Node): boolean; + toJSON(): object; + } + + type NodeSet = Node | TextProxy | string | NodeList | DocumentFragment | Iterable; + + // engine/model/nodelist + + class NodeList implements Iterable { + readonly length: number; + readonly maxOffset: number; + + [Symbol.iterator](): Iterator; + getNode(index: number): Node | null; + getNodeIndex(node: Node): number | null; + getNodeStartOffset(node: Node): number | null; + indexToOffset(index: number): number; + offsetToIndex(offset: number): number; + toJSON(): Node[]; + } + + // engine/model/position + + class Position { + readonly index: number; + readonly isAtEnd: boolean; + readonly isAtStart: boolean; + readonly nodeAfter: Node | null; + readonly nodeBefore: Node; + offset: number; + readonly parent: Element; + readonly path: number[]; + readonly root: Element | DocumentFragment; + stickiness: PositionStickiness; + readonly textNode: Text | null; + + constructor(root: Element | DocumentFragment, path: number[], stickiness?: PositionStickiness); + compareWith(otherPosition: Position): PositionRelation; + getAncestors(): Item[]; + getCommonAncestor(position: Position): Element | DocumentFragment | null; + getCommonPath(position: Position): number[]; + getLastMatchingPosition(skip: (t: TreeWalkerValue) => boolean, options: object): Position; + getParentPath(): number[]; + getShiftedBy(shift: number): Position; + getTransformedByOperation(operation: operation.Operation): Position; + hasSameParentAs(position: Position): boolean; + isAfter(otherPosition: Position): boolean; + isBefore(otherPosition: Position): boolean; + isEqual(otherPosition: Position): boolean; + isTouching(otherPosition: Position): boolean; + toJSON(): object; + + static createAfter(item: Item): Position; + static createAt(itemOrPosition: Item | Position, offset?: number | "end" | "before" | "after"): void; + static createBefore(item: Item): Position; + static createFromParentAndOffset(parent: Element | DocumentFragment, offset: number): Position; + static createFromPosition(position: Position): Position; + static fromJSON(json: object, doc: Document): Position; + } + + type PositionRelation = "before" | "after" | "same"; + + type PositionStickiness = "toNone" | "toNext" | "toPrevious"; + + // engine/model/range + + class Range implements Iterable { + readonly end: Position; + isCollapsed: boolean; + isFlat: boolean; + root: Element | DocumentFragment; + readonly start: Position; + + constructor(start: Position, end?: Position); + [Symbol.iterator](): Iterator; + containsItem(item: Item): void; + containsPosition(position: Position): boolean; + containsRange(otherRange: Range, loose?: boolean): boolean; + getCommonAncestor(): Element | DocumentFragment | null; + getDifference(otherRange: Range): Range[]; + getIntersection(otherRange: Range): Range | null; + getMinimalFlatRanges(): Range[]; + getPositions(options: object): Iterable; + getTransformedByOperation(operation: operation.Operation): Range[]; + getTransformedByOperations(operations: Iterable): Range[]; + getWalker(options: { + startPosition: Position, + singleCharacters: boolean, + shallow: boolean, + ignoreElementEnd: boolean, + }): void; + isEqual(otherRange: Range): boolean; + isIntersecting(otherRange: Range): boolean; + toJSON(): object; + } + + function getItems(options: object): Iterable; + + // engine/model/rootelement + + class RootElement extends Element { + readonly document: Document | null; + readonly rootName: string; + + constructor(doc: Document, name: string, rootName: string); + // TODO: toJSON(): string; + } + + // engine/model/schema + + class Schema { + // TODO + } + + class SchemaContext { + // TODO + } + + interface SchemaCompiledItemDefinition { + name: string; + allowIn: string | string[]; + allowAttributes: string | string[]; + isBlock: boolean; + isLimit: boolean; + isObject: boolean; + } + + type SchemaContextDefinition = Node | Position | SchemaContext | string | Array; + + interface SchemaContextItem { + name: string; + getAttributeKeys: Iterable; + getAttribute: (key: string) => string; + } + + interface SchemaItemDefinition { + allowIn: string | string[]; + allowAttributes: string | string[]; + allowContentOf: string | string[]; + allowWhere: string | string[]; + allowAttributesOf: string | string[]; + inheritTypesFrom: string | string[]; + inheritAllFrom: string | string[]; + isBlock: boolean; + isLimit: boolean; + isObject: boolean; + } + + // engine/model/selection + + class Selection implements ckutils.Emitter { + // TODO + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + } + + // engine/model/text + + class Text extends Node { + readonly data: string; + protected _data: string; + + protected constructor(data: string, attrs?: Map | ReadonlyArray<[string, any]>); + toJSON(): object; + protected _clone(): Text; + + static fromJSON(json: object): Text; + } + + // engine/model/textproxy + + class TextProxy { + readonly data: string; + readonly document: Document | null; + readonly endOffset: number; + readonly isPartial: boolean; + readonly offsetInText: number; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly root: Node | DocumentFragment; + readonly startOffset: number; + readonly textNode: Text; + + protected constructor(textNode: Text, offsetInText: number, length: number); + getAncestors(options: {includeSelf?: boolean, parentFirst?: boolean}): Array; + getAttribute(key: string): any; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getPath(): number[]; + hasAttribute(key: string): boolean; + is(type: "textProxy"): this is TextProxy; + is(type: string): boolean; + } + + // engine/model/treewalker + + class TreeWalker implements Iterable { + readonly boundaries: Range; + readonly direction: "backward" | "forward"; + readonly ignoreElementEnd: boolean; + readonly position: Position; + readonly shallow: boolean; + readonly singleCharacters: boolean; + + constructor(options?: { + direction?: "forward" | "backward", + boundaries?: Range, + startPosition: Position, + singleCharacters?: boolean, + shallow?: boolean, + ignoreElementEnd?: boolean + }); + [Symbol.iterator](): Iterator; + next(): TreeWalkerValue; + skip(skip: (t: TreeWalkerValue) => boolean): void; + } + + interface TreeWalkerValue { + item: Item; + length: number; + nextPosition: Position; + previousPosition: Position; + type: TreeWalkerValueType; + } + + type TreeWalkerValueType = "elementStart" | "elementEnd" | "character" | "text"; + + // engine/model/writer + + class Writer { + // TODO + } +} + +export namespace utils { + // engine/utils/bindtwostepcarettoattribute + + function bindTwoStepCaretToAttribute(view: view.View, model: model.Model, emitter: ckutils.Emitter, attribute: string): void; +} + +export namespace view { + namespace observer { + // engine/view/observer/clickobserver + + class ClickObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/compositionobserver + + class CompositionObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/domeventdata + + class DomEventData { + // TODO + } + + // engine/view/observer/domeventobserver + + class DomEventObserver extends Observer { + readonly domEventType: string | string[]; + useCapture: boolean; + + fire(eventType: string, domEvent: Event, additionalData?: Object): void; + onDomEvent(): void; + } + + // engine/view/observer/fakeselectionobserver + + class FakeSelectionObserver extends Observer { + constructor(view: View); + destroy(): void; + observe(): void; + } + + // engine/view/observer/focusobserver + + class FocusObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/keyobserver + + class KeyEventData extends DomEventData implements ckutils.KeystrokeInfo { + // KeystrokeInfo + altKey?: boolean; + ctrlKey?: boolean; + keyCode: number; + keystroke: number; + shiftKey?: boolean; + } + + class KeyObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/mouseobserver + + class MouseObserver extends DomEventObserver { + // TODO + } + + // engine/view/observer/mutationobserver + + class MutationObserver extends Observer { + domConverter: DomConverter; + renderer: Renderer; + } + + interface MutatedChildren { + newChildren: Node[]; + node: Element; + oldChildren: Node[]; + type: string; + } + + interface MutatedText { + newText: string; + node: Text; + oldText: string; + type: string; + } + + // engine/view/observer/observer + + class Observer { + readonly document: Document; + readonly isEnabled: boolean; + readonly view: View; + + constructor(view: View); + destroy(): void; + disable(): void; + enable(): void; + observe(domElement: HTMLElement, name: string): void; + } + + // engine/view/observer/selectionobserver + + class SelectionObserver extends Observer { + readonly domConverter: DomConverter; + readonly mutationObserver: MutationObserver; + readonly selection: DocumentSelection; + } + } + + // engine/view/attributeelement + + class AttributeElement extends Element { + readonly id: string | number; + readonly priority: number; + protected _clonesGroup: Set | null; + protected _id: string | number; + protected _priority: number; + + static DEFAULT_PRIORITY: number; + + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getElementsWithSameId(): Set; + getFillerOffset(): number | null; + isSimilar(otherElement: Element): boolean; + protected _clone(deep: boolean): AttributeElement; + } + + // engine/view/containerelement + + class ContainerElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): number | null; + } + + // engine/view/document + + class Document implements ckutils.Emitter, ckutils.Observable { + readonly isComposing: boolean; + readonly isFocused: boolean; + isReadOnly: boolean; + readonly roots: ckutils.Collection; + readonly selection: DocumentSelection; + + constructor(); + getRoot(name?: string): RootEditableElement | null; + registerPostFixer(postFixer: (downcastWriter: DowncastWriter) => boolean): void; + protected _callPostFixers(writer: DowncastWriter): void; + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } + + type ChangeType = "children" | "attributes" | "text"; + + // engine/view/documentfragment + + class DocumentFragment { + readonly childCount: number; + readonly isEmpty: boolean; + readonly parent: null; + readonly root: DocumentFragment; + protected _children: Element[]; + + protected constructor(children?: Node | Iterable); + [Symbol.iterator](): Iterator; + _appendChild(items: Item | Iterable): number; + _insertChild(index: number, items: Item | Iterable): number; + _removeChildren(index: number, howMany?: number): Node[]; + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildren(): Iterable; + is(type: string): boolean; + } + + // engine/view/documentselection + + class DocumentSelection { + // TODO + } + + // engine/view/domconverter + + class DomConverter { + // TODO + } + + // engine/view/downcastwriter + + class DowncastWriter { + // TODO + } + + // engine/view/editableelement + + class EditableElement extends ContainerElement { + // TODO + } + + // engine/view/element + + class Element extends Node { + readonly childCount: number; + readonly isEmpty: boolean; + readonly name: string; + protected _attrs: Map; + protected _children: Node[]; + protected _classes: Set; + protected _customProperties: Map; + protected _styles: Map; + + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + _removeChildren(index: number, howMany?: number): Node[]; + _removeClass(className: string[] | string): void; + findAncestor(patterns: Object | string | RegExp | Function): Element | null; + getAttribute(key: string): string | undefined; + getAttributeKeys(): Iterable; + getAttributes(): Iterable; + getChild(index: number): Node; + getChildIndex(node: Node): number; + getChildren(): Iterable; + getClassNames(): Iterable; + getCustomProperties(): Iterable; + getCustomProperty(key: string | symbol): any; + getFillerOffset(): void; + getIdentity(): string; + getStyle(property: string): string | undefined; + getStyleNames(): Iterable; + hasAttribute(key: string): boolean; + hasClass(className: string): void; + hasStyle(property: string): void; + is(type: string, name?: string): boolean; + isSimilar(otherElement: Element): boolean; + protected _addClass(className: string[] | string): void; + protected _appendChild(items: Item | Iterable): number; + protected _clone(deep?: boolean): Element; + protected _insertChild(index: number, items: Item | Iterable): number; + protected _removeAttribute(key: string): boolean; + protected _removeCustomProperty(key: string | symbol): boolean; + protected _removeStyle(property: string[] | string): void; + protected _setAttribute(key: string, value: string): void; + protected _setCustomProperty(key: string | symbol, value: any): void; + protected _setStyle(property: string | {[key: string]: string}, value?: string): void; + } + + // engine/view/elementdefinition + + type ElementDefinition = string | { + attributes?: {[key: string]: string}; + classes?: string | string[]; + name: string; + priority?: number; + styles?: {[key: string]: string}; + }; + + // engine/view/emptyelement + + class EmptyElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): null; + } + + // engine/view/filler + + const INLINE_FILLER_LENGTH: number; + + const INLINE_FILLER: string; + + function BR_FILLER(): void; + + function NBSP_FILLER(): void; + + function getDataWithoutFiller(domText: Text): string; + + function injectQuirksHandling(view: View): void; + + function isBlockFiller(domNode: /*TODO globals.*/Node, blockFiller: Function): boolean; + + function isInlineFiller(domText: /*TODO globals.*/Text): boolean; + + function startsWithFiller(domNode: /*TODO globals.*/Text): boolean; + + // engine/view/item + + type Item = Node | TextProxy; + + // engine/view/matcher + + class Matcher { + // TODO + } + + type MatcherPattern = + ((element: Element) => null | {name: boolean; attribute?: string[]; }) | + string | + RegExp | + { + attributes?: {[key: string]: string | RegExp | boolean}; + classes?: string | RegExp | Array; + name?: string | RegExp; + styles?: {[key: string]: string | RegExp}; + }; + + // engine/view/node + + class Node { + readonly document: Document | null; + readonly index: number | null; + readonly nextSibling: Node | null; + readonly parent: Element | DocumentFragment | null; + readonly previousSibling: Node | null; + readonly root: Node | DocumentFragment; + + constructor(); + _fireChange(type: ChangeType, node: Node): void; + getAncestors(options: {includeSelf: boolean, parentFirst?: boolean}): Array; + getCommonAncestor(node: Node, options: {includeSelf?: boolean}): Element | DocumentFragment | null; + getPath(): number[]; + + is(type: "element"): this is Element; + is(type: "containerElement"): this is ContainerElement; + is(type: "attributeElement"): this is AttributeElement; + is(type: "emptyElement"): this is EmptyElement; + is(type: "uiElement"): this is UIElement; + is(type: "documentFragment"): this is DocumentFragment; + is(type: "text"): this is Text; + is(type: "textProxy"): this is TextProxy; + is(type: string, name: string): boolean; + + isAfter(node: Node): boolean; + isBefore(node: Node): boolean; + isSimilar(otherElement: Node): boolean; + toJSON(): object; + protected _clone(): Node; + protected _remove(): void; + } + + // engine/view/placeholder + + function attachPlaceholder(view: View, element: Element, placeholderText: string, checkFunction?: Function): void; + + function detachPlaceholder(view: View, element: Element): void; + + // engine/view/position + + class Position { + // TODO + } + + type PositionRelation = "before" | "after" | "same" | "different"; + + // engine/view/range + + class Range { + // TODO + } + + // engine/view/renderer + + class Renderer { + // TODO + } + + // engine/view/rooteditableelement + + class RootEditableElement extends EditableElement { + // TODO + } + + // engine/view/selection + + class Selection { + // TODO + } + + // engine/view/text + + class Text extends Node { + readonly data: string; + protected _data: string; + protected _textData: string; + + protected constructor(data: string); + isSimilar(otherNode: Text): boolean; + protected _clone(): Text; + } + + // engine/view/textproxy + + class TextProxy { + readonly data: string; + readonly document: Document | null; + readonly isPartial: boolean; + readonly offsetInText: number; + readonly offsetSize: number; + readonly parent: Element | DocumentFragment | null; + readonly root: Node | DocumentFragment; + readonly textNode: Text; + + protected constructor(textNode: Text, offsetInText: number, length: number); + getAncestors(options: {includeSelf?: boolean, parentFirst?: boolean}): Array; + is(type: "textProxy"): this is TextProxy; + is(type: string): boolean; + } + + // engine/view/treewalker + + class TreeWalker { + readonly boundaries: Range; + readonly direction: TreeWalkerDirection; + readonly ignoreElementEnd: boolean; + readonly position: Position; + readonly shallow: boolean; + readonly singleCharacters: boolean; + + constructor(options: { + boundaries?: Range, + startPosition?: Position, + direction?: TreeWalkerDirection, + singleCharacters?: boolean, + shallow?: boolean, + ignoreElementEnd?: boolean; + }); + [Symbol.iterator](): Iterator; + next(): TreeWalkerValue; + skip(skip: (treeWalkerValue: TreeWalkerValue) => boolean): void; + } + + type TreeWalkerDirection = "forward" | "backward"; + + interface TreeWalkerValue { + item: Item; + length: number; + nextPosition: Position; + previousPosition: Position; + type: TreeWalkerValueType; + } + + type TreeWalkerValueType = "elementStart" | "elementEnd" | "text"; + + // engine/view/uielement + + class UIElement extends Element { + protected constructor( + name: string, + attrs?: object | Iterable<[string, string]> | Map, + children?: Node | Iterable + ); + getFillerOffset(): null; + render(domDocument: /*TODO: globals.*/Document): HTMLElement; + toDomElement(domDocument: /*TODO: globals.*/Document): HTMLElement; + } + + // engine/view/upcastwriter + + class UpcastWriter { + // TODO + } + + // engine/view/view + + class View implements ckutils.Emitter, ckutils.Observable { + // TODO + + // Emitter + delegate(...events: string[]): ckutils.EmitterMixinDelegateChain; + fire(eventOrInfo: string | ckutils.EventInfo, ...args: any[]): any; + listenTo(emitter: ckutils.Emitter, event: string, callback: Function, options?: {priority?: ckutils.PriorityString | number }): void; + off(event: string, callback?: Function): void; + on(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + once(event: string, callback: Function, options?: {priority: ckutils.PriorityString | number}): void; + stopDelegating(event?: string, emitter?: ckutils.Emitter): void; + stopListening(emitter?: ckutils.Emitter, event?: string, callback?: Function): void; + + // Observable + bind(...bindProperties: string[]): ckutils.BindChain; + decorate(methodName: string): void; + set(name: object): void; + set(name: string, value: any): void; + unbind(...unbindProperties: string[]): void; + } +} diff --git a/types/ckeditor__ckeditor5-engine/tsconfig.json b/types/ckeditor__ckeditor5-engine/tsconfig.json new file mode 100644 index 0000000000..36da122d77 --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/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", + "ckeditor__ckeditor5-engine-tests.ts" + ] +} diff --git a/types/ckeditor__ckeditor5-engine/tslint.json b/types/ckeditor__ckeditor5-engine/tslint.json new file mode 100644 index 0000000000..6a214f0cfd --- /dev/null +++ b/types/ckeditor__ckeditor5-engine/tslint.json @@ -0,0 +1,20 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": { + "options": [ + ["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"], + ["Number", "Avoid using the `Number` type. Did you mean `number`?"], + ["String", "Avoid using the `String` type. Did you mean `string`?"], + ["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"] + ] + }, + "no-empty-interface": false, + "quotemark": [ + true, + "double", + "avoid-escape", + "avoid-template" + ] + } +} diff --git a/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts b/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts index 82c272a6ec..19f21f667a 100644 --- a/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts +++ b/types/ckeditor__ckeditor5-utils/ckeditor__ckeditor5-utils-tests.ts @@ -489,24 +489,30 @@ utils.mapsEqual(map, map); // utils/mix ================================================================== -class Editor { - b: () => number; -} - interface SomeMixin { a: () => string; } +class Editor implements SomeMixin { + a: () => string; + b() { return 3; } +} + const SomeMixin = { - a() { - return "a"; - } + a() { return "a"; } +}; + +const SomeMixinNum = { + a() { return 3; } }; utils.mix(Editor, SomeMixin); -const mixEditor = new Editor() as Editor & SomeMixin; -mixEditor.a(); -mixEditor.b(); +// $ExpectError +utils.mix(Editor, SomeMixinNum); + +const editor = new Editor(); +str = editor.a(); +num = editor.b(); // utils/nth ================================================================== diff --git a/types/ckeditor__ckeditor5-utils/index.d.ts b/types/ckeditor__ckeditor5-utils/index.d.ts index 8d9d50e889..50571483f8 100644 --- a/types/ckeditor__ckeditor5-utils/index.d.ts +++ b/types/ckeditor__ckeditor5-utils/index.d.ts @@ -367,7 +367,11 @@ export class KeystrokeHandler { destroy(): void; listenTo(emitter: Emitter): void; press(keyEvtData: KeystrokeInfo): boolean; - set(keystroke: string | Array, callback: Function, options?: {priority?: PriorityString | number}): void; + set( + keystroke: string | Array, + callback: (keyEvtData: KeystrokeInfo, cancel: () => void) => void, + options?: {priority?: PriorityString | number} + ): void; } // utils/locale @@ -392,7 +396,7 @@ export function mapsEqual(mapsA: Map, mapsB: Map): boolean; // utils/mix -export function mix(baseClass: {new(): any}, ...mixins: any[]): void; +export function mix(baseClass: {new(...p: any[]): T}, ...mixins: Array>): void; // utils/nth From 25db1d4746951c960276b85740fe375f83c5629b Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 19:13:47 -0200 Subject: [PATCH 0125/2268] adding missing options from option type --- types/passport-bnet/index.d.ts | 21 ++++++++++----------- types/passport-oauth2/index.d.ts | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index 86255c782d..c8e6dd923c 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; +import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest, _StrategyOptionsBase } from 'passport-oauth2'; declare class BnetStrategy extends OAuth2Strategy { constructor(options: BnetStrategy.StrategyOptions, verify: VerifyFunction); @@ -12,17 +12,16 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - interface _BaseBnetOptions { - region?: string; - scopeSeparator?: string; - customHeaders?: object; - authorizationURL?: string; - tokenURL?: string; - scope?: string; - clientID: string; - clientSecret: string; - callbackURL?: string; + //Utility types for excluding properties from interfaces + type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; + type Omit = Pick>; + + // passport--bnet accepts any options that passport-oauth2 accepts, but add the option region and makes authorizationURL and tokenURL optional + interface _BaseBnetOptions + extends Partial>, Omit<_StrategyOptionsBase, 'authorizationURL' | 'tokenURL'> { + + region?: string; } interface StrategyOptions extends _BaseBnetOptions { diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index d985852bd6..c3723b50b7 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -9,6 +9,7 @@ import { Request } from 'express'; import { Strategy } from 'passport'; import { OAuth2 } from 'oauth'; +import { OutgoingHttpHeaders } from 'http'; declare class OAuth2Strategy extends Strategy { name: string; @@ -32,6 +33,23 @@ declare class OAuth2Strategy extends Strategy { } declare namespace OAuth2Strategy { + interface Metadata { + authorizationURL: string; + tokenURL: string; + clientID: string; + } + + type StateStoreStoreCallback = (err: Error | null, state: any) => void; + type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void + + interface StateStore { + store(req: Request, callback: StateStoreStoreCallback): void; + store(req: Request, meta: Metadata, callback: StateStoreStoreCallback): void; + + verify(req: Request, state: string, callback: StateStoreVerifyCallback): void; + verify(req: Request, state: string, meta: Metadata, callback: StateStoreVerifyCallback): void; + } + type VerifyCallback = (err?: Error | null, user?: object, info?: object) => void; type VerifyFunction = @@ -47,6 +65,11 @@ declare namespace OAuth2Strategy { clientID: string; clientSecret: string; callbackURL?: string; + customHeaders?: OutgoingHttpHeaders; + scope?: string | string[]; + sessionKey?: string; + store?: StateStore; + state?: any; } interface StrategyOptions extends _StrategyOptionsBase { passReqToCallback?: false; From 370789b525c65708c28e6bde075e5f15a3d9cecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sun, 2 Dec 2018 23:17:16 +0100 Subject: [PATCH 0126/2268] More precise usage of Omit, fix ToString and ToNumber. --- types/yargs/index.d.ts | 43 ++++++++++++++++++++------------------ types/yargs/yargs-tests.ts | 20 ++++++++++++------ 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index ac8dbbb749..48fda7ea16 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -45,20 +45,19 @@ declare namespace yargs { argv: { [key in keyof Arguments]: Arguments[key] }; array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; - array(key: K | ReadonlyArray): Argv & { [key in K]: Array | undefined }>; + array(key: K | ReadonlyArray): Argv | undefined }>; - boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; + boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; + boolean(key: K | ReadonlyArray): Argv; check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; + choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; + choices>(key: K, values: C): Argv; choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; - // For previously declared options, we can infer the parameter type of the coercion function. - coerce(key: K | ReadonlyArray, func: (arg: T[K]) => V): Argv & { [key in K]: V }>; - coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType }>; - - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; @@ -86,9 +85,11 @@ declare namespace yargs { conflicts(key: string, value: string | ReadonlyArray): Argv; conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; - count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; + count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; + count(key: K | ReadonlyArray): Argv; - default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; + default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; + default(key: K, value: V, description?: string): Argv; default(defaults: D, description?: string): Argv & D>; /** @@ -154,15 +155,17 @@ declare namespace yargs { nargs(nargs: { [key: string]: number }): Argv; normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - normalize(key: K | ReadonlyArray): Argv & { [key in K]: string | undefined }>; + normalize(key: K | ReadonlyArray): Argv; number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; - number(key: K | ReadonlyArray): Argv & { [key in K]: number | undefined }>; + number(key: K | ReadonlyArray): Argv; - option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + option(key: K, options: O): Argv }>; option(options: O): Argv & InferredOptionTypes>; - options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + options(key: K, options: O): Argv }>; options(options: O): Argv & InferredOptionTypes>; parse(): Arguments; @@ -226,7 +229,7 @@ declare namespace yargs { strict(): Argv; string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - string(key: K | ReadonlyArray): Argv & { [key in K]: string | undefined }>; + string(key: K | ReadonlyArray): Argv; // Intended to be used with '.wrap()' terminalWidth(): number; @@ -326,7 +329,7 @@ declare namespace yargs { } /** Remove keys K in T */ - type Omit = Pick>; + type Omit = { [key in Exclude]: T[key] }; /** Remove undefined as a possible value for keys K in T */ type Defined = Omit & { [key in K]: Exclude }; @@ -334,11 +337,11 @@ declare namespace yargs { /** Convert T to T[] and T | undefined to T[] | undefined */ type ToArray = Array> | Extract; - /** Gives string[] | undefined or string[] if T is an array type, otherwise string */ - type ToString = T extends any[] ? string[] : T extends any[] | undefined ? string[] | undefined : string | undefined; + /** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */ + type ToString = (Exclude extends any[] ? string[] : string) | Extract; - /** Gives number[] | undefined or number[] if T is an array type, otherwise number */ - type ToNumber = T extends any[] ? number[] : T extends any[] | undefined ? number[] | undefined : number | undefined; + /** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */ + type ToNumber = (Exclude extends any[] ? number[] : number) | Extract; type InferredOptionType = O extends { default: infer D } ? D : diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 688082e523..78006d2c6e 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -695,7 +695,7 @@ function Argv$inferOptionTypes() { .option("s", { string: true }) .argv; - // $ExpectType { [x: string]: any; count: number; choices: Color; coerce: Date | undefined; normalize: string | undefined; _: string[]; $0: string; } + // $ExpectType { [x: string]: any; choices: Color; coerce: Date | undefined; count: number; normalize: string | undefined; _: string[]; $0: string; } yargs .option("choices", { choices: colors, required: true }) .option("coerce", { coerce: () => new Date() }) @@ -783,6 +783,13 @@ function Argv$inferMultipleOptionTypes() { .demandOption(["c", "d", "e"]) .argv; + // $ExpectType { [x: string]: any; a: string; b: boolean; c: number; d: number; e: number; _: string[]; $0: string; } + yargs + .options({ a: { default: "a" }, b: { default: false } }) + .number(["c", "d", "e"]) + .demandOption(["c", "d", "e"]) + .argv; + // $ExpectType { [x: string]: any; a: number; b: string; c: boolean; _: string[]; $0: string; } yargs .default({ a: 42, b: "b", c: false }) @@ -791,6 +798,7 @@ function Argv$inferMultipleOptionTypes() { // $ExpectType { [x: string]: any; a: number; b: string; c: Date; _: string[]; $0: string; } yargs .coerce({ a: Date.parse, b: String.prototype.toLowerCase, c: (s: string) => new Date(s) }) + .demandOption(["a", "b", "c"]) .argv; // $ExpectType { [x: string]: any; a: number | undefined; b: string | undefined; c: Color; _: string[]; $0: string; } @@ -890,15 +898,15 @@ function Argv$inferArrayOptionTypes() { yargs.array("a").demandOption("a").normalize("a").argv.a; } -function Argv$usesTheLastInferredOptionType() { +function Argv$inferRepeatedOptionTypes() { // $ExpectType boolean | undefined yargs.string("a").boolean("a").argv.a; - // FIXME: $ExpectType string | undefined - // FIXME: yargs.number("a").string("a").argv.a; + // $ExpectType string | undefined + yargs.number("a").string("a").argv.a; - // FIXME: $ExpectType number | undefined - // FIXME: yargs.string("a").number("a").argv.a; + // $ExpectType number | undefined + yargs.string("a").number("a").argv.a; // $ExpectType boolean | undefined yargs.string("a").option("a", { number: true }).boolean("a").argv.a; From f65661bf4095842da2fb02375bbf950eb2bd423b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sun, 2 Dec 2018 23:27:13 +0100 Subject: [PATCH 0127/2268] Remove blank line, keeping the alias overloads in one group.. --- types/yargs/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 48fda7ea16..321fb3669b 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -38,7 +38,6 @@ declare namespace yargs { // Aliases for previously declared options can inherit the types of those options. alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; - alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; From 2854b92db0b2be63fe6ccfb4d0abcdf5fed4df31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Sun, 2 Dec 2018 23:37:46 +0100 Subject: [PATCH 0128/2268] Bump required TypeScript version in yargs-parser to match yargs, and adapt the Arguments type. --- types/yargs-parser/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/yargs-parser/index.d.ts b/types/yargs-parser/index.d.ts index d50a3e9903..cf448e841c 100644 --- a/types/yargs-parser/index.d.ts +++ b/types/yargs-parser/index.d.ts @@ -2,12 +2,12 @@ // Project: https://github.com/yargs/yargs-parser#readme // Definitions by: Miles Johnson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.8 import { Arguments as YargsArguments } from 'yargs'; declare namespace yargsParser { - type Arguments = YargsArguments; + type Arguments = YargsArguments<{}>; interface DetailedArguments { argv: Arguments; From eb769a40abc07fe8fb5ec54d9aef0634dd808a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Viken=20Valv=C3=A5g?= Date: Mon, 3 Dec 2018 00:05:18 +0100 Subject: [PATCH 0129/2268] Use ReadonlyArray for choices. --- types/yargs/index.d.ts | 4 ++-- types/yargs/yargs-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index 321fb3669b..fd933bc78c 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -370,7 +370,7 @@ declare namespace yargs { O extends { number: true } ? number : O extends { string: true } ? string : O extends { normalize: true } ? string : - O extends { choices: Array } ? C : + O extends { choices: ReadonlyArray } ? C : O extends { coerce: (arg: any) => infer T } ? T : any; @@ -389,7 +389,7 @@ declare namespace yargs { type SyncCompletionFunction = (current: string, argv: any) => string[]; type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; type MiddlewareFunction = (args: Arguments) => void; - type Choices = Array; + type Choices = ReadonlyArray; type PositionalOptionsType = "boolean" | "number" | "string"; } diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 78006d2c6e..3a580400c2 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -668,7 +668,7 @@ function Argv$scriptName() { } type Color = "red" | "blue" | "green"; -const colors: Color[] = ["red", "blue", "green"]; +const colors: ReadonlyArray = ["red", "blue", "green"]; function Argv$inferOptionTypes() { // $ExpectType { [x: string]: any; a: (string | number)[] | undefined; b: boolean | undefined; c: number; n: number | undefined; s: string | undefined; _: string[]; $0: string; } From f32b52127dca1db30ad7def58a52534ca2dc9175 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 2 Dec 2018 19:31:42 -0800 Subject: [PATCH 0130/2268] fix [SerialPort]: Change `data` -> `delimiter` in ready-parser options See [the implementation](https://github.com/node-serialport/node-serialport/blob/8825d264436e91ca727a0c9b4d04a756479c4b1f/packages/parser-ready/ready.js#L22-L24) of the ready parser --- types/serialport/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/serialport/index.d.ts b/types/serialport/index.d.ts index 14ded3b6e3..c1a81376fa 100644 --- a/types/serialport/index.d.ts +++ b/types/serialport/index.d.ts @@ -103,7 +103,7 @@ declare namespace SerialPort { constructor(options: {delimiter: string | Buffer | number[], encoding?: 'ascii'|'utf8'|'utf16le'|'ucs2'|'base64'|'binary'|'hex'}); } class Ready extends Stream.Transform { - constructor(options: {data: string | Buffer | number[]}); + constructor(options: {delimiter: string | Buffer | number[]}); } class Regex extends Stream.Transform { constructor(options: {regex: RegExp}); From b1eb8bdee501bf2e2022593f74f6028ce76932fc Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 2 Dec 2018 19:40:16 -0800 Subject: [PATCH 0131/2268] Update serialport-tests.ts --- types/serialport/serialport-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/serialport/serialport-tests.ts b/types/serialport/serialport-tests.ts index 16cf2b6a70..d6541a63c2 100644 --- a/types/serialport/serialport-tests.ts +++ b/types/serialport/serialport-tests.ts @@ -107,7 +107,7 @@ function test_parsers() { const CCTalkParser = new SerialPort.parsers.CCTalk(); const DelimiterParser = new SerialPort.parsers.Delimiter({ delimiter: Buffer.from('EOL') }); const ReadlineParser = new SerialPort.parsers.Readline({ delimiter: '\r\n' }); - const ReadyParser = new SerialPort.parsers.Ready({ data: 'READY' }); + const ReadyParser = new SerialPort.parsers.Ready({ delimiter: 'READY' }); const RegexParser = new SerialPort.parsers.Regex({regex: /.*/}); port.pipe(ByteLengthParser); From c7e8761c67c32583d1081258e87e947d95088113 Mon Sep 17 00:00:00 2001 From: "h.naoufal" Date: Mon, 3 Dec 2018 10:16:34 +0100 Subject: [PATCH 0132/2268] fixing problems with occured through merging --- types/react-dates/index.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index f1db1c96b7..17ea9788f6 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -4,7 +4,6 @@ // Nathan Holland // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -Heads up, this will commit to master. // Required fields are made according to 'minimum REQUIRED setup' in https://github.com/airbnb/react-dates/blob/master/README.md import * as React from 'react'; @@ -496,10 +495,7 @@ declare namespace ReactDates { var toISODateString: (date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification) => string | null; // utils/toLocalizedDateString.js var toLocalizedDateString: ( - dat<<<<<<< master -56 -  -e: moment.MomentInput, + date: moment.MomentInput, currentFormat: moment.MomentFormatSpecification ) => string | null; // utils/toMomentObject.js From 10b983f728feebd9167645b76e93fd2b82e56239 Mon Sep 17 00:00:00 2001 From: Dusan Rostar Date: Mon, 3 Dec 2018 11:50:28 +0100 Subject: [PATCH 0133/2268] fixing typo in pasteFromWordRemoveStyles prop + tests --- types/ckeditor/ckeditor-tests.ts | 2 +- types/ckeditor/index.d.ts | 2 +- types/ckeditor/v2/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 6a0b50a4d8..9cbac28b0d 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -485,7 +485,7 @@ function test_dialog() { { id: 'tab-basic', label: 'Basic Settings', - elements: [] + elements: [] as any[] }, { id: 'tab-adv', diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 69c23d6a99..77e4407cef 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -761,7 +761,7 @@ declare namespace CKEDITOR { pasteFromWordNumberedHeadingToList?: boolean; pasteFromWordPromptCleanup?: boolean; pasteFromWordRemoveFontStyles?: boolean; - pasteFromWorkRemoveStyles?: boolean; + pasteFromWordRemoveStyles?: boolean; pasteFromWord_heuristicsEdgeList?: boolean; pasteFromWord_inlineImages?: boolean; plugins?: string; diff --git a/types/ckeditor/v2/index.d.ts b/types/ckeditor/v2/index.d.ts index ab7b88bbdd..93e7902090 100644 --- a/types/ckeditor/v2/index.d.ts +++ b/types/ckeditor/v2/index.d.ts @@ -718,7 +718,7 @@ declare namespace CKEDITOR { pasteFromWordNumberedHeadingToList?: boolean; pasteFromWordPromptCleanup?: boolean; pasteFromWordRemoveFontStyles?: boolean; - pasteFromWorkRemoveStyles?: boolean; + pasteFromWordRemoveStyles?: boolean; plugins?: string; protectedSource?: RegExp[]; From 09ceaf7b745f6db1a2ef594a7dcbb3813bbdafb1 Mon Sep 17 00:00:00 2001 From: Dusan Rostar Date: Mon, 3 Dec 2018 13:07:30 +0100 Subject: [PATCH 0134/2268] fixing casting problem after Travis build failed --- types/ckeditor/v2/ckeditor-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ckeditor/v2/ckeditor-tests.ts b/types/ckeditor/v2/ckeditor-tests.ts index ce93c75eba..3407a07501 100644 --- a/types/ckeditor/v2/ckeditor-tests.ts +++ b/types/ckeditor/v2/ckeditor-tests.ts @@ -337,7 +337,7 @@ function test_adding_dialog_by_definition() { { id: 'tab-basic', label: 'Basic Settings', - elements: [] + elements: [] as any[] }, { id: 'tab-adv', From f425f279923d7409a31bbdfdf2816db13ad454f4 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Mon, 3 Dec 2018 19:02:05 +0100 Subject: [PATCH 0135/2268] Changed filterBy See https://github.com/ericgio/react-bootstrap-typeahead/blob/116c5cdc7443099a0455757558108c6082b347f1/docs/Upgrading.md#v30 --- types/react-bootstrap-typeahead/index.d.ts | 13 ++++++++++++- .../react-bootstrap-typeahead-tests.tsx | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index fa970bc5b3..d0bfcea9a7 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -3,12 +3,23 @@ // Definitions by: Guymestef // Rajab Shakirov // Paito Anderson +// Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // TODO: ,

, , components import * as React from 'react'; +export interface TypeaheadFilterbyProps { + filterBy: string[]; + labelKey: (string | (() => void)); + multiple: boolean; + selected: any[]; + caseSensitive: boolean; + ignoreDiacritics: boolean; + text: string; +} + export interface TypeaheadProps { /* For localized accessibility: Should return a string indicating the number of results for screen readers. Receives the current results. */ a11yNumResults?: () => void; @@ -58,7 +69,7 @@ export interface TypeaheadProps { emptyLabel?: string; /* Either an array of fields in option to search, or a custom filtering callback. */ - filterBy?: (string[] | ((option: T | string, text: string) => boolean)); + filterBy?: (string[] | ((option: T | string, props: TypeaheadFilterbyProps) => boolean)); /* Highlights the menu item if there is only one result and allows selecting that item by hitting enter. Does not work with allowNew. */ diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 10237b1fa0..6c9143dfea 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -28,6 +28,14 @@ class BasicExample extends React.Component { onInputChange={(value, e) => {}} placeholder="Choose a state..." /> + (props.text.indexOf(option) !== -1) } + placeholder="Choose a state..." + />
); } From 672ec749ab95fa2893469c2a2ebd6badb4336d58 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Mon, 3 Dec 2018 19:12:14 +0100 Subject: [PATCH 0136/2268] Increase version --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index d0bfcea9a7..89188c8b86 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.2 +// Type definitions for react-bootstrap-typeahead 3.2.2 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From 4b872aca1265d8ba44347fbdc33c204d9c123f33 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Mon, 3 Dec 2018 19:19:10 +0100 Subject: [PATCH 0137/2268] Fixed version... --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 89188c8b86..9fa23ac5f5 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.2.2 +// Type definitions for react-bootstrap-typeahead 3.3 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From d944d9c929913c6c3bce93eea1ecc485dfa2bc5d Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Mon, 3 Dec 2018 20:20:12 +0100 Subject: [PATCH 0138/2268] Added definitions for Highlighter, Menu and MenuItem --- types/react-bootstrap-typeahead/index.d.ts | 56 +++++++++++++++---- .../react-bootstrap-typeahead-tests.tsx | 27 ++++++++- 2 files changed, 72 insertions(+), 11 deletions(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 9fa23ac5f5..2c0495ce03 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.3 +// Type definitions for react-bootstrap-typeahead 3.4 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov @@ -6,18 +6,23 @@ // Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -// TODO: , , , components +// TODO: components import * as React from 'react'; +import * as CSS from 'csstype'; export interface TypeaheadFilterbyProps { - filterBy: string[]; - labelKey: (string | (() => void)); - multiple: boolean; - selected: any[]; - caseSensitive: boolean; - ignoreDiacritics: boolean; - text: string; + filterBy: string[]; + labelKey: (string | (() => void)); + multiple: boolean; + selected: any[]; + caseSensitive: boolean; + ignoreDiacritics: boolean; + text: string; +} + +export interface TypeaheadMenuProps { + text: string; } export interface TypeaheadProps { @@ -149,7 +154,7 @@ export interface TypeaheadProps { renderMenu?: (results: Array, menuProps: any) => any; /* Provides a hook for customized rendering of menu item contents. */ - renderMenuItemChildren?: (option: T, props: TypeaheadProps, index: number) => any; + renderMenuItemChildren?: (option: T, props: TypeaheadMenuProps, index: number) => any; /* Provides a hook for customized rendering of tokens when multiple selections are enabled. */ renderToken?: (selectedItem: T | string, onRemove: () => void) => any; @@ -184,3 +189,34 @@ export interface AsyncTypeaheadProps extends TypeaheadProps { } export const AsyncTypeahead: React.ClassicComponentClass>; + +export interface HighligherProps { + key: string; + search: string; +} + +export const Highlighter: React.ClassicComponentClass>; + +export interface MenuProps { + id: string; + className?: string; + emptyLabel?: string; + innerRef?: string; + maxHeight?: string; + style?: CSS.Properties; +} + +export const Menu: React.ClassicComponentClass>; + +export interface MenuItemProps { + option: T; + position: number; + label?: string; + active?: boolean; + className?: string; + disabled?: boolean; + onClick?: (e: Event) => any; + onMouseDown?: (e: Event) => any; +} + +export const MenuItem: React.ClassicComponentClass>; diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 6c9143dfea..5fcbe15328 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Typeahead } from 'react-bootstrap-typeahead'; +import { Typeahead, Highlighter, Menu, MenuItem } from 'react-bootstrap-typeahead'; const options = [ { name: 'Alabama', population: 4780127, capital: 'Montgomery', region: 'South' }, @@ -36,6 +36,31 @@ class BasicExample extends React.Component { filterBy={(option, props) => (props.text.indexOf(option) !== -1) } placeholder="Choose a state..." /> + + + {option.name} + + } + /> + + + {options.map((o, idx) => ( + + {o.name} + + ))} + +
); } From 3ba1ae85e26eea8062509b406ad1baf9e5092355 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Mon, 3 Dec 2018 20:38:16 +0100 Subject: [PATCH 0139/2268] Added dependencies file --- types/react-bootstrap-typeahead/package.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 types/react-bootstrap-typeahead/package.json diff --git a/types/react-bootstrap-typeahead/package.json b/types/react-bootstrap-typeahead/package.json new file mode 100644 index 0000000000..4d9ec4a338 --- /dev/null +++ b/types/react-bootstrap-typeahead/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "csstype": "^2.2.0" + } +} From 7643f499bc4bde86cf91b8a99565ba392da42d3b Mon Sep 17 00:00:00 2001 From: Teun Duynstee Date: Mon, 3 Dec 2018 21:05:37 +0100 Subject: [PATCH 0140/2268] Added bigCombination to js-combinatorics --- types/js-combinatorics/index.d.ts | 8 ++++++++ types/js-combinatorics/js-combinatorics-tests.ts | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/types/js-combinatorics/index.d.ts b/types/js-combinatorics/index.d.ts index 6a5fa8e249..c1a3e85880 100644 --- a/types/js-combinatorics/index.d.ts +++ b/types/js-combinatorics/index.d.ts @@ -92,6 +92,14 @@ declare namespace __Combinatorics { */ function combination(a:T[], n?:number):IGenerator; + /** + * Generates the combination of array with n elements, which + * also supports larger sets of elements. + * When n is ommited, the length of the array is used. + * Somewhat slower than combination() + */ + function bigCombination(a:T[], n?:number):IGenerator; + /** * Generates the permutation of array with n elements. * When n is ommited, the length of the array is used. diff --git a/types/js-combinatorics/js-combinatorics-tests.ts b/types/js-combinatorics/js-combinatorics-tests.ts index 68714ca17a..4162515bc2 100644 --- a/types/js-combinatorics/js-combinatorics-tests.ts +++ b/types/js-combinatorics/js-combinatorics-tests.ts @@ -25,6 +25,15 @@ const filteredCombinations:string[][] = combination.filter((i:string[]) => i.len const allCombinations:string[][] = combination.toArray(); const combinationsCount = combination.length; +const limitedBigCombination = Combinatorics.bigCombination(["a", "b", "c"], 2); +const bigCombination = Combinatorics.bigCombination(["a", "b", "c"]); +const nextBigCombination:string[] = bigCombination.next(); +bigCombination.forEach((i:string[]) => console.log(i)); +const bigCombinationsLengths:number[] = bigCombination.map((i:string[]) => i.length); +const filteredBigCombinations:string[][] = bigCombination.filter((i:string[]) => i.length > 0); +const allBigCombinations:string[][] = bigCombination.toArray(); +const bigCombinationsCount = bigCombination.length; + const limitedPermutation = Combinatorics.permutation(["a", "b", "c"], 2); const permutation = Combinatorics.permutation(["a", "b", "c"]); const nextPermutation:string[] = permutation.next(); From 12cf8681cd911a6d93e36235d2ab27e717a841dc Mon Sep 17 00:00:00 2001 From: Teun Duynstee Date: Mon, 3 Dec 2018 21:16:35 +0100 Subject: [PATCH 0141/2268] incremented version in comment --- types/js-combinatorics/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/js-combinatorics/index.d.ts b/types/js-combinatorics/index.d.ts index c1a3e85880..702ef1f9a2 100644 --- a/types/js-combinatorics/index.d.ts +++ b/types/js-combinatorics/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for js-combinatorics v0.5.0 +// Type definitions for js-combinatorics v0.5.4 // Project: https://github.com/dankogai/js-combinatorics // Definitions by: Vasya Aksyonov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 2ac92c2d4c4947cb303d5e9aaa3160a0d6fd7352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Sat, 17 Nov 2018 13:56:59 +0100 Subject: [PATCH 0142/2268] Fix return type of methods and arguments of create method --- types/mem-fs/index.d.ts | 6 +++--- types/mem-fs/mem-fs-tests.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/mem-fs/index.d.ts b/types/mem-fs/index.d.ts index 4b1d8c4d14..6ab2c43c88 100644 --- a/types/mem-fs/index.d.ts +++ b/types/mem-fs/index.d.ts @@ -10,13 +10,13 @@ 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; + add: (file: File) => this; + each: (callback: (file: File, index: number) => void) => this; stream: () => Transform; } -export function create(...args: any[]): Store; +export function create(): Store; export namespace memFs { } diff --git a/types/mem-fs/mem-fs-tests.ts b/types/mem-fs/mem-fs-tests.ts index 9605c65ef7..3b20f30891 100644 --- a/types/mem-fs/mem-fs-tests.ts +++ b/types/mem-fs/mem-fs-tests.ts @@ -3,6 +3,6 @@ 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))); +const file2 = store.add(file) + .each(file => console.dir(store.get(file.path))) + .get('test'); From 6ca0152bcd4ea671c1e8d52c799a1cd1c1bb4b82 Mon Sep 17 00:00:00 2001 From: Ziyu Wang Date: Tue, 4 Dec 2018 19:42:08 +1100 Subject: [PATCH 0143/2268] fix selenium-webdriver logginng type --- types/selenium-webdriver/index.d.ts | 33 ++++++++++++++++++++++++-- types/selenium-webdriver/test/index.ts | 6 +++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index aa8a696576..4fa0ccf7ac 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -4,7 +4,8 @@ // Yuki Kokubun , // Craig Nishina , // Simon Gellis , -// Ben Dixon +// Ben Dixon , +// Ziyu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -540,7 +541,7 @@ export namespace logging { * @param {string} name the logger's name. * @return {!Logger} the requested logger. */ - getLogger(name: string): Logger; + getLogger(name?: string): Logger; /** * Creates a new logger. @@ -552,6 +553,34 @@ export namespace logging { */ createLogger_(name: string, parent: Logger): Logger; } + + /** + * Retrieves a named logger, creating it in the process. This function will + * implicitly create the requested logger, and any of its parents, if they + * do not yet exist. + * + * @param {string} name the logger's name. + * @return {!Logger} the requested logger. + */ + function getLogger(name?: string): Logger; + + /** + * Adds the console handler to the given logger. The console handler will log + * all messages using the JavaScript Console API. + * + * @param {Logger=} opt_logger The logger to add the handler to; defaults + * to the root logger. + */ + function addConsoleHandler(opt_logger?: Logger): void; + + /** + * Removes the console log handler from the given logger. + * + * @param {Logger=} opt_logger The logger to remove the handler from; defaults + * to the root logger. + * @see exports.addConsoleHandler + */ + function removeConsoleHandler(opt_logger?: Logger): void; } export namespace promise { diff --git a/types/selenium-webdriver/test/index.ts b/types/selenium-webdriver/test/index.ts index f8decdace1..84ffc6a8c2 100644 --- a/types/selenium-webdriver/test/index.ts +++ b/types/selenium-webdriver/test/index.ts @@ -758,6 +758,12 @@ function TestLogging() { type = webdriver.logging.Type.DRIVER; type = webdriver.logging.Type.PERFORMANCE; type = webdriver.logging.Type.SERVER; + + let logger: webdriver.logging.Logger = webdriver.logging.getLogger(); + webdriver.logging.addConsoleHandler(); + webdriver.logging.addConsoleHandler(logger); + webdriver.logging.removeConsoleHandler(); + webdriver.logging.removeConsoleHandler(logger); } function TestLoggingEntry() { From e16aad6c1749469a4d67573e7385ade64615c9e7 Mon Sep 17 00:00:00 2001 From: Akash Vishwakarma Date: Tue, 4 Dec 2018 18:01:01 +0530 Subject: [PATCH 0144/2268] local should be optional as per the Alt doc. As per the http://alt.js.org/docs/async/ document, the local function in the SourceModel Interface should be optional. --- types/alt/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts index 9094642e70..c95e1653b0 100644 --- a/types/alt/index.d.ts +++ b/types/alt/index.d.ts @@ -54,7 +54,7 @@ declare namespace AltJS { export type Source = {[name:string]: () => SourceModel}; export interface SourceModel { - local(state:any, ...args: any[]):any; + local?(state:any, ...args: any[]):any; remote(state:any, ...args: any[]):Promise; shouldFetch?(fetchFn:(...args:Array) => boolean):void; loading?:(args:any) => void; From 1a87973fd7debd80f99331b895d2089de1470606 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 13:49:24 +0100 Subject: [PATCH 0145/2268] Basic test with old declaration --- types/simpl-schema/index.d.ts | 158 +++++++++++++++++++++++ types/simpl-schema/simpl-schema-tests.ts | 90 +++++++++++++ types/simpl-schema/tsconfig.json | 23 ++++ types/simpl-schema/tslint.json | 1 + 4 files changed, 272 insertions(+) create mode 100644 types/simpl-schema/index.d.ts create mode 100644 types/simpl-schema/simpl-schema-tests.ts create mode 100644 types/simpl-schema/tsconfig.json create mode 100644 types/simpl-schema/tslint.json diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts new file mode 100644 index 0000000000..c90d2ba93b --- /dev/null +++ b/types/simpl-schema/index.d.ts @@ -0,0 +1,158 @@ +// from https://github.com/aldeed/simple-schema-js/issues/90 + +declare module "simpl-schema" { + + export class ValidationContext { + constructor(ss: any); + addValidationErrors(errors: any): void; + clean(...args: any[]): any; + getErrorForKey(key: any, ...args: any[]): any; + isValid(): any; + keyErrorMessage(key: any, ...args: any[]): any; + keyIsInvalid(key: any, ...args: any[]): any; + reset(): void; + setValidationErrors(errors: any): void; + validate(obj: any, ...args: any[]): any; + validationErrors(): any; + } + + interface SchemaDefinition { + type: any; + label?: string | Function; + optional?: boolean | Function; + min?: number | boolean | Date | Function; + max?: number | boolean | Date | Function; + minCount?: number | Function; + maxCount?: number | Function; + allowedValues?: any[] | Function; + decimal?: boolean; + exclusiveMax?: boolean; + exclusiveMin?: boolean; + regEx?: RegExp | RegExp[]; + custom?: Function; + blackbox?: boolean; + autoValue?: Function; + defaultValue?: any; + trim?: boolean; + } + + interface CleanOption { + filter?: boolean; + autoConvert?: boolean; + removeEmptyStrings?: boolean; + trimStrings?: boolean; + getAutoValues?: boolean; + isModifier?: boolean; + extendAutoValueContext?: boolean; + } + + interface SimpleSchemaStatic { + new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchemaStatic; + namedContext(name?: string): SimpleSchemaValidationContextStatic; + addValidator(validator: Function): any; + pick(...fields: string[]): SimpleSchemaStatic; + omit(...fields: string[]): SimpleSchemaStatic; + clean(doc: any, options?: CleanOption): any; + schema(key?: string): SchemaDefinition | SchemaDefinition[]; + getDefinition(key: string, propList?: any, functionContext?: any): any; + keyIsInBlackBox(key: string): boolean; + labels(labels: {[key: string]: string}): void; + label(key: any): any; + Integer: RegExp; + messages(messages: any): any; + messageForError(type: any, key: any, def: any, value: any): string; + allowsKey(key: any): string; + newContext(): SimpleSchemaValidationContextStatic; + objectKeys(keyPrefix: any): any[]; + validate(obj: any, options?: ValidationOption): void; + validator(options: ValidationOption): Function; + RegEx: { + Email: RegExp; + EmailWithTLD: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; + } + + interface ValidationOption { + modifier?: boolean; + upsert?: boolean; + clean?: boolean; + filter?: boolean; + upsertextendedCustomContext?: boolean; + } + + interface SimpleSchemaValidationContextStatic { + validate(obj: any, options?: ValidationOption): boolean; + validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; + resetValidation(): void; + isValid(): boolean; + invalidKeys(): { name: string; type: string; value?: any; }[]; + addInvalidKeys(errors: { name: string, type: string; }[]): void; + keyIsInvalid(name: any): boolean; + keyErrorMessage(name: any): string; + getErrorObject(): any; + } + + interface MongoObjectStatic { + forEachNode(func: Function, options?: {endPointsOnly: boolean;}): void; + getValueForPosition(position: string): any; + setValueForPosition(position: string, value: any): void; + removeValueForPosition(position: string): void; + getKeyForPosition(position: string): any; + getGenericKeyForPosition(position: string): any; + getInfoForKey(key: string): any; + getPositionForKey(key: string): string; + getPositionsForGenericKey(key: string): string[]; + getValueForKey(key: string): any; + addKey(key: string, val: any, op: string): any; + removeGenericKeys(keys: string[]): void; + removeGenericKey(key: string): void; + removeKey(key: string): void; + removeKeys(keys: string[]): void; + filterGenericKeys(test: Function): void; + setValueForKey(key: string, val: any): void; + setValueForGenericKey(key: string, val: any): void; + getObject(): any; + getFlatObject(options?: {keepArrays?: boolean}): any; + affectsKey(key: string): any; + affectsGenericKey(key: string): any; + affectsGenericKeyImplicit(key: string): any; + } + + export const SimpleSchema: SimpleSchemaStatic; + export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; + export const MongoObject: MongoObjectStatic; + + export interface SimpleSchema { + debug: boolean; + addValidator(validator: Function): any; + extendOptions(options: {[key: string]: any}): void; + messages(messages: any): void; + RegEx: { + Email: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; + } + + export interface MongoObject { + expandKey(val: any, key: string, obj: any): void; + } + + export default SimpleSchema; +} diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts new file mode 100644 index 0000000000..6081a5a11b --- /dev/null +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -0,0 +1,90 @@ +import SimpleSchema from 'simpl-schema'; + +const StringSchema = new SimpleSchema({ + basicString: { + type: String + }, + limitedString: { + type: String, + allowedValues: ['pro', 'con'] + }, + regExpString: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + title: { + type: String, + label: "Argument", + custom: function () { + var text = this.value; + if(text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; + } + }, +}); + +StringSchema.validate({ + basicString: "Test", + limitedString: "pro", + regExpString: "id" +}); + + /* + , + title: { + type: String, + label: "Argument", + custom: function () { + var text = this.value; + text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); + + if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } + else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } + } + }, + questionId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + side: { + type: String, + allowedValues: ['pro', 'con'] + }, + userId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + clapCount: { + type: SimpleSchema.Integer, + defaultValue: 0 + }, + highlight: { + type: Array, + optional: true + }, + 'highlight.$': { + type: Object + }, + 'highlight.$.start': SimpleSchema.Integer, + 'highlight.$.end': SimpleSchema.Integer, + 'highlight.$.text': { + type: String, + trim: false + } + */ + /* + , + { + clean: { + filter: true, + autoConvert: true, + removeEmptyStrings: true, + trimStrings: true, + getAutoValues: true, + removeNullsFromArrays: true, + } + } + */ diff --git a/types/simpl-schema/tsconfig.json b/types/simpl-schema/tsconfig.json new file mode 100644 index 0000000000..d079496f4e --- /dev/null +++ b/types/simpl-schema/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", + "simpl-schema-tests.ts" + ] +} diff --git a/types/simpl-schema/tslint.json b/types/simpl-schema/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/simpl-schema/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From dec806bdf66ddee26ce8e6ded3590c814946c577 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 13:50:26 +0100 Subject: [PATCH 0146/2268] Move out of module --- types/simpl-schema/index.d.ts | 307 +++++++++++++++++----------------- 1 file changed, 152 insertions(+), 155 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index c90d2ba93b..97411f4463 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -1,158 +1,155 @@ // from https://github.com/aldeed/simple-schema-js/issues/90 -declare module "simpl-schema" { - - export class ValidationContext { - constructor(ss: any); - addValidationErrors(errors: any): void; - clean(...args: any[]): any; - getErrorForKey(key: any, ...args: any[]): any; - isValid(): any; - keyErrorMessage(key: any, ...args: any[]): any; - keyIsInvalid(key: any, ...args: any[]): any; - reset(): void; - setValidationErrors(errors: any): void; - validate(obj: any, ...args: any[]): any; - validationErrors(): any; - } - - interface SchemaDefinition { - type: any; - label?: string | Function; - optional?: boolean | Function; - min?: number | boolean | Date | Function; - max?: number | boolean | Date | Function; - minCount?: number | Function; - maxCount?: number | Function; - allowedValues?: any[] | Function; - decimal?: boolean; - exclusiveMax?: boolean; - exclusiveMin?: boolean; - regEx?: RegExp | RegExp[]; - custom?: Function; - blackbox?: boolean; - autoValue?: Function; - defaultValue?: any; - trim?: boolean; - } - - interface CleanOption { - filter?: boolean; - autoConvert?: boolean; - removeEmptyStrings?: boolean; - trimStrings?: boolean; - getAutoValues?: boolean; - isModifier?: boolean; - extendAutoValueContext?: boolean; - } - - interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchemaStatic; - namedContext(name?: string): SimpleSchemaValidationContextStatic; - addValidator(validator: Function): any; - pick(...fields: string[]): SimpleSchemaStatic; - omit(...fields: string[]): SimpleSchemaStatic; - clean(doc: any, options?: CleanOption): any; - schema(key?: string): SchemaDefinition | SchemaDefinition[]; - getDefinition(key: string, propList?: any, functionContext?: any): any; - keyIsInBlackBox(key: string): boolean; - labels(labels: {[key: string]: string}): void; - label(key: any): any; - Integer: RegExp; - messages(messages: any): any; - messageForError(type: any, key: any, def: any, value: any): string; - allowsKey(key: any): string; - newContext(): SimpleSchemaValidationContextStatic; - objectKeys(keyPrefix: any): any[]; - validate(obj: any, options?: ValidationOption): void; - validator(options: ValidationOption): Function; - RegEx: { - Email: RegExp; - EmailWithTLD: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; - } - - interface ValidationOption { - modifier?: boolean; - upsert?: boolean; - clean?: boolean; - filter?: boolean; - upsertextendedCustomContext?: boolean; - } - - interface SimpleSchemaValidationContextStatic { - validate(obj: any, options?: ValidationOption): boolean; - validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; - resetValidation(): void; - isValid(): boolean; - invalidKeys(): { name: string; type: string; value?: any; }[]; - addInvalidKeys(errors: { name: string, type: string; }[]): void; - keyIsInvalid(name: any): boolean; - keyErrorMessage(name: any): string; - getErrorObject(): any; - } - - interface MongoObjectStatic { - forEachNode(func: Function, options?: {endPointsOnly: boolean;}): void; - getValueForPosition(position: string): any; - setValueForPosition(position: string, value: any): void; - removeValueForPosition(position: string): void; - getKeyForPosition(position: string): any; - getGenericKeyForPosition(position: string): any; - getInfoForKey(key: string): any; - getPositionForKey(key: string): string; - getPositionsForGenericKey(key: string): string[]; - getValueForKey(key: string): any; - addKey(key: string, val: any, op: string): any; - removeGenericKeys(keys: string[]): void; - removeGenericKey(key: string): void; - removeKey(key: string): void; - removeKeys(keys: string[]): void; - filterGenericKeys(test: Function): void; - setValueForKey(key: string, val: any): void; - setValueForGenericKey(key: string, val: any): void; - getObject(): any; - getFlatObject(options?: {keepArrays?: boolean}): any; - affectsKey(key: string): any; - affectsGenericKey(key: string): any; - affectsGenericKeyImplicit(key: string): any; - } - - export const SimpleSchema: SimpleSchemaStatic; - export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; - export const MongoObject: MongoObjectStatic; - - export interface SimpleSchema { - debug: boolean; - addValidator(validator: Function): any; - extendOptions(options: {[key: string]: any}): void; - messages(messages: any): void; - RegEx: { - Email: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; - } - - export interface MongoObject { - expandKey(val: any, key: string, obj: any): void; - } - - export default SimpleSchema; +export class ValidationContext { + constructor(ss: any); + addValidationErrors(errors: any): void; + clean(...args: any[]): any; + getErrorForKey(key: any, ...args: any[]): any; + isValid(): any; + keyErrorMessage(key: any, ...args: any[]): any; + keyIsInvalid(key: any, ...args: any[]): any; + reset(): void; + setValidationErrors(errors: any): void; + validate(obj: any, ...args: any[]): any; + validationErrors(): any; } + +interface SchemaDefinition { + type: any; + label?: string | Function; + optional?: boolean | Function; + min?: number | boolean | Date | Function; + max?: number | boolean | Date | Function; + minCount?: number | Function; + maxCount?: number | Function; + allowedValues?: any[] | Function; + decimal?: boolean; + exclusiveMax?: boolean; + exclusiveMin?: boolean; + regEx?: RegExp | RegExp[]; + custom?: Function; + blackbox?: boolean; + autoValue?: Function; + defaultValue?: any; + trim?: boolean; +} + +interface CleanOption { + filter?: boolean; + autoConvert?: boolean; + removeEmptyStrings?: boolean; + trimStrings?: boolean; + getAutoValues?: boolean; + isModifier?: boolean; + extendAutoValueContext?: boolean; +} + +interface SimpleSchemaStatic { + new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchemaStatic; + namedContext(name?: string): SimpleSchemaValidationContextStatic; + addValidator(validator: Function): any; + pick(...fields: string[]): SimpleSchemaStatic; + omit(...fields: string[]): SimpleSchemaStatic; + clean(doc: any, options?: CleanOption): any; + schema(key?: string): SchemaDefinition | SchemaDefinition[]; + getDefinition(key: string, propList?: any, functionContext?: any): any; + keyIsInBlackBox(key: string): boolean; + labels(labels: {[key: string]: string}): void; + label(key: any): any; + Integer: RegExp; + messages(messages: any): any; + messageForError(type: any, key: any, def: any, value: any): string; + allowsKey(key: any): string; + newContext(): SimpleSchemaValidationContextStatic; + objectKeys(keyPrefix: any): any[]; + validate(obj: any, options?: ValidationOption): void; + validator(options: ValidationOption): Function; + RegEx: { + Email: RegExp; + EmailWithTLD: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; +} + +interface ValidationOption { + modifier?: boolean; + upsert?: boolean; + clean?: boolean; + filter?: boolean; + upsertextendedCustomContext?: boolean; +} + +interface SimpleSchemaValidationContextStatic { + validate(obj: any, options?: ValidationOption): boolean; + validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; + resetValidation(): void; + isValid(): boolean; + invalidKeys(): { name: string; type: string; value?: any; }[]; + addInvalidKeys(errors: { name: string, type: string; }[]): void; + keyIsInvalid(name: any): boolean; + keyErrorMessage(name: any): string; + getErrorObject(): any; +} + +interface MongoObjectStatic { + forEachNode(func: Function, options?: {endPointsOnly: boolean;}): void; + getValueForPosition(position: string): any; + setValueForPosition(position: string, value: any): void; + removeValueForPosition(position: string): void; + getKeyForPosition(position: string): any; + getGenericKeyForPosition(position: string): any; + getInfoForKey(key: string): any; + getPositionForKey(key: string): string; + getPositionsForGenericKey(key: string): string[]; + getValueForKey(key: string): any; + addKey(key: string, val: any, op: string): any; + removeGenericKeys(keys: string[]): void; + removeGenericKey(key: string): void; + removeKey(key: string): void; + removeKeys(keys: string[]): void; + filterGenericKeys(test: Function): void; + setValueForKey(key: string, val: any): void; + setValueForGenericKey(key: string, val: any): void; + getObject(): any; + getFlatObject(options?: {keepArrays?: boolean}): any; + affectsKey(key: string): any; + affectsGenericKey(key: string): any; + affectsGenericKeyImplicit(key: string): any; +} + +export const SimpleSchema: SimpleSchemaStatic; +export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; +export const MongoObject: MongoObjectStatic; + +export interface SimpleSchema { + debug: boolean; + addValidator(validator: Function): any; + extendOptions(options: {[key: string]: any}): void; + messages(messages: any): void; + RegEx: { + Email: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; +} + +export interface MongoObject { + expandKey(val: any, key: string, obj: any): void; +} + +export default SimpleSchema; From 424a73f8091f58a51b1b1f9fb5e0d3f8cb778f7e Mon Sep 17 00:00:00 2001 From: Ryosuke Ishizue Date: Tue, 4 Dec 2018 22:30:54 +0900 Subject: [PATCH 0147/2268] fix return type of isFocused() --- types/ace/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 7faa5da4f8..cd20b57f05 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -1223,7 +1223,7 @@ declare namespace AceAjax { /** * Returns `true` if the current `textInput` is in focus. **/ - isFocused(): void; + isFocused(): boolean; /** * Blurs the current `textInput`. From b37be32b6890ab5e1269ba03d4cfbabb7a530848 Mon Sep 17 00:00:00 2001 From: MichaelTsafrir Date: Tue, 4 Dec 2018 16:45:20 +0200 Subject: [PATCH 0148/2268] Added missing blendStroke property to PieProps blendStroke property exists in the pie component, yet is not recognized by the ts definition --- types/recharts/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 34e3cbcb88..6426e0de5f 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -447,6 +447,7 @@ export interface PieProps extends EventAttributes, Partial | ContentRenderer | boolean; activeShape?: object | ContentRenderer | React.ReactElement; activeIndex?: number | number[]; + blendStroke?: boolean; } export class Pie extends React.Component { } From af00ad4606c8857202d840a1467834ca119ce192 Mon Sep 17 00:00:00 2001 From: Wassim Chegham Date: Tue, 4 Dec 2018 16:08:12 +0000 Subject: [PATCH 0149/2268] feat: add types for the SketchApp designer tool --- types/sketchapp/index.d.ts | 516 +++++++++++++++++++++++++++++ types/sketchapp/sketchapp-tests.ts | 5 + types/sketchapp/tsconfig.json | 24 ++ types/sketchapp/tslint.json | 3 + 4 files changed, 548 insertions(+) create mode 100644 types/sketchapp/index.d.ts create mode 100644 types/sketchapp/sketchapp-tests.ts create mode 100644 types/sketchapp/tsconfig.json create mode 100644 types/sketchapp/tslint.json diff --git a/types/sketchapp/index.d.ts b/types/sketchapp/index.d.ts new file mode 100644 index 0000000000..6d9776aaa7 --- /dev/null +++ b/types/sketchapp/index.d.ts @@ -0,0 +1,516 @@ +// Type definitions for the SketchApp 1.0 +// Project: https://github.com/xlayers/xlayers +// Definitions by: Wassim Chegham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type SketchMSBorderPositionEnum = 0 | 1 | 2 | 3; +type SketchMSBorderLineCapStyle = 0 | 1 | 2; +type SketchMSBorderLineJoinStyle = 0 | 1 | 2; +type SketchMSFillTypeEnum = 0 | 1 | 4 | 5; +type SketchMSPatternFillTypeEnum = 0 | 1 | 2 | 3; +type SketchMSBlendModeEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; +type SketchMSLineDecorationTypeEnum = 0 | 1 | 2 | 3; +type SketchMSBooleanOperation = -1 | 0 | 1 | 2 | 3; +type SketchMSCurveMode = 0 | 1 | 2 | 3 | 4; +type SketchMSResizingType = 0 | 1 | 2 | 3; +type SketchMSLayerListExpandedType = 0 | 1 | 2; +type SketchMSEncodedBase64BinaryPlist = string; +type SketchMSNSColorArchive = SketchMSKeyValueArchive; +type SketchMSLayer = SketchMSPage | SketchMSSymbolMaster; +interface SketchMSNestedSymbolOverride { + symbolID: string; +} +interface SketchMSStringAttribute { + _class: 'stringAttribute'; + attributes: { + MSAttributedStringFontAttribute: { + _class: 'fontDescriptor'; + attributes: { + name: string; + size: number; + } + }; + paragraphStyle: { + _class: 'paragraphStyle', + allowsDefaultTighteningForTruncation: number + }, + foregroundColor: SketchMSKeyValueArchive + }; +} +interface SketchMSAttributedString { + _class: 'attributedString'; + string: string; + attributes: SketchMSStringAttribute[]; + archivedAttributedString?: SketchMSKeyValueArchive; +} +interface SketchMSKeyValueArchive { + _archive: SketchMSEncodedBase64BinaryPlist; +} +interface SketchMSFontAttribute { + _class: 'fontDescriptor'; + _archive?: string; + attributes: { + name: string; + size: number; + }; +} +interface SketchMSBorder { + _class: 'border'; + isEnabled: boolean; + color: SketchMSColor; + fillType: SketchMSFillTypeEnum; + position: SketchMSBorderPositionEnum; + thickness: number; +} +interface SketchMSBorderOptions { + _class: 'borderOptions'; + isEnabled: boolean; + dashPattern: number[]; + lineCapStyle: SketchMSBorderLineCapStyle; + lineJoinStyle: SketchMSBorderLineJoinStyle; +} + +interface SketchMSImageDataReference { + _class: 'jSONOriginalDataReference'; + _ref: string; + _ref_class: 'imageData'; + data: { + _data: string; + }; + sha1: { + _data: string; + }; +} +type SketchMSPointString = string; +interface SketchMSPath { + _class: 'path'; + isClosed: boolean; + points: SketchMSCurvePoint[]; +} +interface SketchMSCurvePoint { + _class: 'curvePoint'; + cornerRadius: number; + curveFrom: SketchMSPointString; + curveMode: SketchMSCurveMode; + curveTo: SketchMSPointString; + hasCurveFrom: boolean; + hasCurveTo: boolean; + point: SketchMSPointString; +} + +interface SketchMSFill { + _class: 'fill'; + isEnabled: boolean; + color?: SketchMSColor; + fillType: SketchMSFillTypeEnum; + image?: SketchMSImageDataReference; + noiseIndex: number; + noiseIntensity: number; + patternFillType: SketchMSPatternFillTypeEnum; + patternTileScale: number; +} +interface SketchMSShadow { + _class: 'shadow' | 'MSInnerShadow'; + isEnabled: boolean; + blurRadius: number; + color: SketchMSColor; + contextSettings: SketchMSGraphicsContextSettings; + offsetX: number; + offsetY: number; + spread: number; +} +interface SketchMSImageCollection { + do_objectID?: string; + _class: 'imageCollection'; + images: any[]; +} +interface SketchMSAssetCollection { + do_objectID?: string; + _class: 'assetCollection'; + gradients: any[]; + colors: any[]; + imageCollection: SketchMSImageCollection; + images: any[]; +} +interface SketchMSStyleBorder { + position: number; + color: SketchMSColor; + do_objectID?: string; + _class: 'styleBorder'; + gradient: SketchMSGradient; + fillType: number; + thickness: number; + contextSettings: SketchMSGraphicsContextSettings; + isEnabled: number; +} +interface SketchMSGradientStop { + do_objectID?: string; + _class: 'gradientStop'; + color: SketchMSColor; + position: number; +} +interface SketchMSGradient { + from: { + x: number; + y: number; + }; + shouldSmoothenOpacity: boolean; + gradientType: number; + do_objectID?: string; + _class: 'gradient'; + stops: SketchMSGradientStop[]; + to: { + x: number; + y: number; + }; + elipseLength: number; +} +interface SketchMSStyleFill { + contextSettings: SketchMSGraphicsContextSettings; + color: SketchMSColor; + do_objectID?: string; + _class: 'styleFill'; + gradient: SketchMSGradient; + fillType: number; + noiseIntensity: number; + patternFillType: number; + patternTileScale: number; + noiseIndex: number; + isEnabled: number; +} +interface SketchMSStyleShadow { + spread: number; + color: SketchMSColor; + offsetY: number; + offsetX: number; + do_objectID?: string; + _class: 'styleShadow'; + blurRadius: number; + contextSettings: SketchMSGraphicsContextSettings; + isEnabled: number; +} +interface SketchMSSharedStyle { + do_objectID?: string; + _class: 'sharedStyle'; + value: SketchMSStyle; + objectID: string; + name: string; +} +interface SketchMSTextStyle { + _class: 'textStyle'; + encodedAttributes: { + MSAttributedStringColorAttribute?: SketchMSColor; + NSColor: SketchMSKeyValueArchive; + MSAttributedStringFontAttribute?: SketchMSFontAttribute; + NSParagraphStyle?: SketchMSKeyValueArchive; + NSKern: number; + }; +} +interface SketchMSSharedStyleContainer { + do_objectID?: string; + _class: 'sharedStyleContainer'; + objects: SketchMSSharedStyle[]; +} +interface SketchMSStyleBorderOptions { + lineJoinStyle: number; + do_objectID?: string; + _class: 'styleBorderOptions'; + isEnabled: number; + lineCapStyle: number; + dashPattern: any[]; +} +interface SketchMSGraphicsContextSettings { + do_objectID?: string; + _class: 'graphicsContextSettings'; + opacity: number; + blendMode: number; +} +interface SketchMSStyleBlur { + radius: number; + do_objectID?: string; + _class: 'styleBlur'; + motionAngle: number; + isEnabled: number; + type: number; + center: { + x: number; + y: number; + }; +} +interface SketchMSStyleReflection { + do_objectID?: string; + _class: 'styleReflection'; + strength: number; + isEnabled: number; + distance: number; +} +interface SketchMSStyleColorControls { + hue: number; + do_objectID?: string; + _class: 'styleColorControls'; + brightness: number; + contrast: number; + isEnabled: number; + saturation: number; +} +interface SketchMSStyle { + startDecorationType: number; + borderOptions: SketchMSStyleBorderOptions; + endDecorationType: number; + contextSettings: SketchMSGraphicsContextSettings; + blur: SketchMSStyleBlur; + textStyle: SketchMSTextStyle; + reflection: SketchMSStyleReflection; + do_objectID?: string; + _class: 'style'; + miterLimit: number; + colorControls: SketchMSStyleColorControls; + fills: SketchMSStyleFill[]; + borders: SketchMSStyleBorder[]; + innerShadows: SketchMSStyleShadow[]; + shadows: SketchMSStyleShadow[]; +} +interface SketchMSRulerData { + do_objectID?: string; + _class: 'rulerData'; + base: number; + guides: any[]; +} +interface SketchMSRect { + y: number; + do_objectID?: string; + _class: 'rect'; + constrainProportions: boolean; + height: number; + width: number; + x: number; +} +interface SketchMSExportOptions { + shouldTrim: boolean; + do_objectID?: string; + _class: 'exportOptions'; + includedLayerIds: any[]; + layerOptions: number; + exportFormats: any[]; +} +interface SketchMSColor { + do_objectID?: string; + _class: 'color'; + + /** + * ex: "#FFFFFF" + * ex: rgb(1,0,1) + */ + value: string; + red: number; + green: number; + blue: number; + alpha: number; +} +interface SketchMSSimpleGrid { + do_objectID?: string; + _class: 'simpleGrid'; + thickGridTimes: number; + objectID: string; + isEnabled: number; + gridSize: number; +} +interface SketchMSLayoutGrid { + columnWidth: number; + totalWidth: number; + drawHorizontalLines: number; + objectID: string; + gutterWidth: number; + horizontalOffset: number; + isEnabled: number; + do_objectID?: string; + _class: 'layoutGrid'; + gutterHeight: number; + drawHorizontal: number; + guttersOutside: number; + numberOfColumns: number; + drawVertical: number; + rowHeightMultiplication: number; +} +interface SketchMSSymbolMaster { + isFlippedHorizontal: number; + includeBackgroundColorInInstance: number; + objectID: string; + horizontalRulerData: SketchMSRulerData; + frame: SketchMSRect; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + hasBackgroundColor: number; + layerListExpandedType: number; + resizesContent: number; + backgroundColor: SketchMSColor; + rotation: number; + style: SketchMSStyle; + verticalRulerData: SketchMSRulerData; + constrainProportions: boolean; + isFlippedVertical: number; + do_objectID?: string; + _class: 'symbolMaster'; + attributedString: SketchMSAttributedString; + name: string; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: boolean; + grid: SketchMSSimpleGrid; + resizingType: number; + userInfo: any; + isLocked: boolean; + layout: SketchMSLayoutGrid; + shouldBreakMaskChain: number; + resizingConstraint: 63 | number; + includeBackgroundColorInExport: number; + flow?: SketchMSImmutableFlowConnection; + + // add this property to hold all CSS properties + // of the current layer + css?: { [key: string]: string }; +} +interface SketchMSSymbolInstanceLayer { + _class: 'symbolInstance'; + frame: SketchMSRect; + horizontalSpacing: number; + verticalSpacing: number; + masterInfluenceEdgeMinXPadding?: number; + masterInfluenceEdgeMaxXPadding?: number; + masterInfluenceEdgeMinYPadding?: number; + masterInfluenceEdgeMaxYPadding?: number; + symbolID: string; + overrides?: { + [objectId: string]: string | SketchMSNestedSymbolOverride | SketchMSImageDataReference; + }; + isFlippedHorizontal: number; + includeBackgroundColorInInstance: number; + objectID: string; + horizontalRulerData: SketchMSRulerData; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + hasBackgroundColor: number; + layerListExpandedType: number; + resizesContent: number; + backgroundColor: SketchMSColor; + rotation: number; + style: SketchMSStyle; + verticalRulerData: SketchMSRulerData; + isFlippedVertical: number; + do_objectID?: string; + name: string; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: boolean; + grid: SketchMSSimpleGrid; + resizingType: number; + userInfo: any; + isLocked: boolean; + layout: SketchMSLayoutGrid; + shouldBreakMaskChain: number; + resizingConstraint: 63 | number; + includeBackgroundColorInExport: number; + flow?: SketchMSImmutableFlowConnection; +} +interface SketchMSPage { + isFlippedHorizontal: number; + style: SketchMSStyle; + horizontalRulerData: SketchMSRulerData; + frame: SketchMSRect; + hasClickThrough: number; + includeInCloudUpload: number; + exportOptions: SketchMSExportOptions; + objectID: string; + id: string; + rotation: number; + layerListExpandedType: number; + verticalRulerData: SketchMSRulerData; + isFlippedVertical: number; + resizingType: number; + do_objectID?: string; + _class: 'page' | 'layer'; + layers: SketchMSLayer[]; + isVisible: boolean; + nameIsFixed: number; + name: string; + constrainProportions: boolean; + attributedString: SketchMSAttributedString; + isLocked: boolean; + shouldBreakMaskChain: number; + resizingConstraint: number; + fixedRadius: number; + + // add this property to hold all CSS properties + // of the current layer + css?: { [key: string]: string }; +} +interface SketchMSSharedTextStyleContainer { + do_objectID?: string; + _class: 'sharedTextStyleContainer'; + objects: any[]; +} +interface SketchMSSymbolContainers { + do_objectID?: string; + _class: 'symbolContainer'; + objects: any[]; +} +interface SketchMSDocumentData { + assets: SketchMSAssetCollection; + currentPageIndex: number; + foreignSymbols: any[]; + layerStyles: SketchMSSharedStyleContainer; + pages: SketchMSPage[]; + enableSliceInteraction: number; + do_objectID?: string; + _class: 'documentData'; + layerTextStyles: SketchMSSharedTextStyleContainer; + enableLayerInteraction: number; + layerSymbols: SketchMSSymbolContainers; + objectID: string; +} +interface SketchMSArtboards { + name: string; + artboards: SketchMSArtboard; +} +interface SketchMSArtboard { + frame: SketchMSRect; + backgroundColor: SketchMSColor; + hasBackgroundColor: boolean; + horizontalRulerData?: SketchMSRulerData; + verticalRulerData?: SketchMSRulerData; + includeBackgroundColorInExport?: boolean; + includeInCloudUpload?: boolean; + isFlowHome?: boolean; +} +interface SketchMSPagesAndArtboards { + [key: string]: SketchMSArtboards; +} +interface SketchMSMetadata { + commit: string; + pagesAndArtboards: SketchMSPagesAndArtboards; + version: number; + fonts: string[]; + compatibilityVersion: number; + app: string; + autosaved: number; + variant: string; + created: { + commit: string; + appVersion: string; + build: number; + app: string; + compatibilityVersion: number; + version: number; + variant: string; + }; + saveHistory: string[]; + appVersion: string; + build: number; +} +interface SketchMSImmutableFlowConnection { + _class: 'immutableFlowConnection'; + animationType: number; + destinationArtboardID?: string | 'back'; +} diff --git a/types/sketchapp/sketchapp-tests.ts b/types/sketchapp/sketchapp-tests.ts new file mode 100644 index 0000000000..14a2be96a9 --- /dev/null +++ b/types/sketchapp/sketchapp-tests.ts @@ -0,0 +1,5 @@ +console.log(` +In order to test thie SketchApp types, we need to parse a SketchApp file. +See the following repo for a real worl test case: +https://github.com/xlayers/xlayers/blob/develop/src/app/editor/viewer/lib/parsers/sketch-style-parser.service.spec.ts +`); diff --git a/types/sketchapp/tsconfig.json b/types/sketchapp/tsconfig.json new file mode 100644 index 0000000000..6f22fec54b --- /dev/null +++ b/types/sketchapp/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sketchapp-tests.ts" + ] +} diff --git a/types/sketchapp/tslint.json b/types/sketchapp/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/sketchapp/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From e7f4d0148e3d4e7e3e60a68f83ab5c02b3f114b4 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 16:16:29 -0200 Subject: [PATCH 0150/2268] add missing scopeSeparator option and tests --- types/passport-oauth2/index.d.ts | 1 + .../passport-oauth2/passport-oauth2-tests.ts | 33 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index c3723b50b7..a6d519bf6a 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -67,6 +67,7 @@ declare namespace OAuth2Strategy { callbackURL?: string; customHeaders?: OutgoingHttpHeaders; scope?: string | string[]; + scopeSeparator?: string; sessionKey?: string; store?: StateStore; state?: any; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 864b2cb9d6..57dcfa56d9 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,5 @@ import OAuth2Strategy = require('passport-oauth2'); -import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError } from 'passport-oauth2'; +import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; @@ -56,3 +56,34 @@ class MyStrategy extends OAuth2Strategy { this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); } } + +const metadata: Metadata = { + authorizationURL: 'http://www.example.com/auth', + clientID: 'dummy', + tokenURL: 'http://www.example.com/token' +} + +class MyStore implements StateStore { + store(req: Request, meta: StateStoreStoreCallback | Metadata, callback?: StateStoreStoreCallback): void {} + verify(req: Request, state: string, meta: StateStoreVerifyCallback | Metadata, callback?: StateStoreVerifyCallback): void {} +} + +const myStore = new MyStore; + +const strategyOptions3: StrategyOptions = { + authorizationURL: 'http://www.example.com/auth', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + callbackURL: 'http://www.example.com/callback', + customHeaders: { + 'content-type': 'text/html' + }, + scope: ['scope1', 'scope2'], + scopeSeparator: ' ', + sessionKey: 'oauth', + state: {id: 1}, + store: myStore +}; + +const strategy5: Strategy = new Strategy(strategyOptions3, verifyFunction2); From ee619a0597282ea6de017ff65ec13523dc5c9d38 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 16:19:40 -0200 Subject: [PATCH 0151/2268] correcting code style --- types/passport-oauth2/index.d.ts | 2 +- types/passport-oauth2/passport-oauth2-tests.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index a6d519bf6a..cd78f377c2 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -40,7 +40,7 @@ declare namespace OAuth2Strategy { } type StateStoreStoreCallback = (err: Error | null, state: any) => void; - type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void + type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void; interface StateStore { store(req: Request, callback: StateStoreStoreCallback): void; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 57dcfa56d9..30faeebda0 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,6 @@ import OAuth2Strategy = require('passport-oauth2'); -import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; +import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, + InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; @@ -61,14 +62,14 @@ const metadata: Metadata = { authorizationURL: 'http://www.example.com/auth', clientID: 'dummy', tokenURL: 'http://www.example.com/token' -} +}; class MyStore implements StateStore { store(req: Request, meta: StateStoreStoreCallback | Metadata, callback?: StateStoreStoreCallback): void {} verify(req: Request, state: string, meta: StateStoreVerifyCallback | Metadata, callback?: StateStoreVerifyCallback): void {} } -const myStore = new MyStore; +const myStore = new MyStore(); const strategyOptions3: StrategyOptions = { authorizationURL: 'http://www.example.com/auth', From f304573e356f9f89125ba2ef8397216e7fe1a953 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 17:06:54 -0200 Subject: [PATCH 0152/2268] removing type utilities in favor of a simpler solution --- types/passport-bnet/index.d.ts | 12 ++++-------- types/passport-bnet/passport-bnet-tests.ts | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index c8e6dd923c..e7ffaaedce 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -12,15 +12,11 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - - //Utility types for excluding properties from interfaces - type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; - type Omit = Pick>; - // passport--bnet accepts any options that passport-oauth2 accepts, but add the option region and makes authorizationURL and tokenURL optional - interface _BaseBnetOptions - extends Partial>, Omit<_StrategyOptionsBase, 'authorizationURL' | 'tokenURL'> { - + interface _BaseBnetOptions extends Partial<_StrategyOptionsBase> { + clientID: string; + clientSecret: string; + region?: string; } diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts index 06c0ffccec..b02cf40519 100644 --- a/types/passport-bnet/passport-bnet-tests.ts +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -6,11 +6,9 @@ import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2"; import { Request } from "express"; const strategyOptions1: StrategyOptions = { - authorizationURL: 'http://www.example.com/auth', callbackURL: 'http://www.example.com/callback', clientID: 'dummy', clientSecret: 'secret', - tokenURL: 'http://www.example.com/token', region: 'us', scope: "email", scopeSeparator: ' ', From 074b604db4be04a98acf359069adaff1b49d8c23 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 20:12:29 +0100 Subject: [PATCH 0153/2268] Basic version of Simpl-Schema definition --- types/simpl-schema/index.d.ts | 100 ++++++++++++++++------- types/simpl-schema/simpl-schema-tests.ts | 34 ++++---- 2 files changed, 90 insertions(+), 44 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 97411f4463..32dd8d7b66 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -1,4 +1,8 @@ -// from https://github.com/aldeed/simple-schema-js/issues/90 +// Type definitions for simpl-schema 0.1 +// Project: https://github.com/aldeed/simple-schema-js +// Definitions by: Andreas Richter +// Qkramer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export class ValidationContext { constructor(ss: any); @@ -14,40 +18,45 @@ export class ValidationContext { validationErrors(): any; } +interface CustomValidationContext { + value: any; +} + interface SchemaDefinition { type: any; - label?: string | Function; - optional?: boolean | Function; - min?: number | boolean | Date | Function; - max?: number | boolean | Date | Function; - minCount?: number | Function; - maxCount?: number | Function; - allowedValues?: any[] | Function; + label?: string | (() => string); + optional?: boolean | (() => boolean); + min?: number | boolean | Date | (() => number | boolean | Date); + max?: number | boolean | Date | (() => number | boolean | Date); + minCount?: number | (() => number); + maxCount?: number | (() => number); + allowedValues?: any[] | (() => any[]); decimal?: boolean; exclusiveMax?: boolean; exclusiveMin?: boolean; regEx?: RegExp | RegExp[]; - custom?: Function; + custom?: () => any; blackbox?: boolean; - autoValue?: Function; + autoValue?: () => any; defaultValue?: any; trim?: boolean; } interface CleanOption { - filter?: boolean; - autoConvert?: boolean; - removeEmptyStrings?: boolean; - trimStrings?: boolean; - getAutoValues?: boolean; - isModifier?: boolean; - extendAutoValueContext?: boolean; + filter?: boolean; + autoConvert?: boolean; + removeEmptyStrings?: boolean; + trimStrings?: boolean; + getAutoValues?: boolean; + isModifier?: boolean; + extendAutoValueContext?: boolean; } +// ??? interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchemaStatic; + new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; namedContext(name?: string): SimpleSchemaValidationContextStatic; - addValidator(validator: Function): any; + addValidator(validator: () => boolean): any; pick(...fields: string[]): SimpleSchemaStatic; omit(...fields: string[]): SimpleSchemaStatic; clean(doc: any, options?: CleanOption): any; @@ -63,7 +72,7 @@ interface SimpleSchemaStatic { newContext(): SimpleSchemaValidationContextStatic; objectKeys(keyPrefix: any): any[]; validate(obj: any, options?: ValidationOption): void; - validator(options: ValidationOption): Function; + validator(options: ValidationOption): () => boolean; RegEx: { Email: RegExp; EmailWithTLD: RegExp; @@ -77,6 +86,25 @@ interface SimpleSchemaStatic { ZipCode: RegExp; Phone: RegExp; }; + ErrorTypes: { + REQUIRED: string, + MIN_STRING: string, + MAX_STRING: string, + MIN_NUMBER: string, + MAX_NUMBER: string, + MIN_NUMBER_EXCLUSIVE: string, + MAX_NUMBER_EXCLUSIVE: string, + MIN_DATE: string, + MAX_DATE: string, + BAD_DATE: string, + MIN_COUNT: string, + MAX_COUNT: string, + MUST_BE_INTEGER: string, + VALUE_NOT_ALLOWED: string, + EXPECTED_TYPE: string, + FAILED_REGULAR_EXPRESSION: string, + KEY_NOT_IN_SCHEMA: string + }; } interface ValidationOption { @@ -87,20 +115,31 @@ interface ValidationOption { upsertextendedCustomContext?: boolean; } +interface SimpleSchemaValidationContextStaticKeys { + name: string; + type: string; + value?: any; +} + +interface SimpleSchemaError { + name: string; + type: string; +} + interface SimpleSchemaValidationContextStatic { validate(obj: any, options?: ValidationOption): boolean; validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; resetValidation(): void; isValid(): boolean; - invalidKeys(): { name: string; type: string; value?: any; }[]; - addInvalidKeys(errors: { name: string, type: string; }[]): void; + invalidKeys(): SimpleSchemaValidationContextStaticKeys[]; + addInvalidKeys(errors: SimpleSchemaError[]): void; keyIsInvalid(name: any): boolean; keyErrorMessage(name: any): string; getErrorObject(): any; } interface MongoObjectStatic { - forEachNode(func: Function, options?: {endPointsOnly: boolean;}): void; + forEachNode(func: (() => void), options?: {endPointsOnly: boolean}): void; getValueForPosition(position: string): any; setValueForPosition(position: string, value: any): void; removeValueForPosition(position: string): void; @@ -115,7 +154,7 @@ interface MongoObjectStatic { removeGenericKey(key: string): void; removeKey(key: string): void; removeKeys(keys: string[]): void; - filterGenericKeys(test: Function): void; + filterGenericKeys(test: (() => boolean)): void; setValueForKey(key: string, val: any): void; setValueForGenericKey(key: string, val: any): void; getObject(): any; @@ -130,11 +169,12 @@ export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; export const MongoObject: MongoObjectStatic; export interface SimpleSchema { - debug: boolean; - addValidator(validator: Function): any; - extendOptions(options: {[key: string]: any}): void; - messages(messages: any): void; - RegEx: { + debug: boolean; + validate(obj: any, options?: ValidationOption): void; + addValidator(validator: () => boolean): any; + extendOptions(options: {[key: string]: any}): void; + messages(messages: any): void; + RegEx: { Email: RegExp; Domain: RegExp; WeakDomain: RegExp; @@ -145,7 +185,7 @@ export interface SimpleSchema { Id: RegExp; ZipCode: RegExp; Phone: RegExp; - }; + }; } export interface MongoObject { diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 6081a5a11b..3c40f0c4bb 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -2,24 +2,30 @@ import SimpleSchema from 'simpl-schema'; const StringSchema = new SimpleSchema({ basicString: { - type: String + type: String }, limitedString: { - type: String, - allowedValues: ['pro', 'con'] + type: String, + allowedValues: ['pro', 'con'] }, regExpString: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - title: { - type: String, - label: "Argument", - custom: function () { - var text = this.value; - if(text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; - } - }, + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + title: { + type: String, + label: "Argument", + /* TODO, this does not work: "The containing arrow function captures the global value of 'this' which implicitly has type 'any'." + custom: () => { + const text = this.value; + if (text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; + } + */ + }, }); StringSchema.validate({ From 3863ea9f8d4b67f002c6faeb64ab54be8d27361a Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 20:45:23 +0100 Subject: [PATCH 0154/2268] Remove simpl-schema from master PR, and move to new one --- types/simpl-schema/index.d.ts | 195 ----------------------- types/simpl-schema/simpl-schema-tests.ts | 96 ----------- types/simpl-schema/tsconfig.json | 23 --- types/simpl-schema/tslint.json | 1 - 4 files changed, 315 deletions(-) delete mode 100644 types/simpl-schema/index.d.ts delete mode 100644 types/simpl-schema/simpl-schema-tests.ts delete mode 100644 types/simpl-schema/tsconfig.json delete mode 100644 types/simpl-schema/tslint.json diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts deleted file mode 100644 index 32dd8d7b66..0000000000 --- a/types/simpl-schema/index.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -// Type definitions for simpl-schema 0.1 -// Project: https://github.com/aldeed/simple-schema-js -// Definitions by: Andreas Richter -// Qkramer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export class ValidationContext { - constructor(ss: any); - addValidationErrors(errors: any): void; - clean(...args: any[]): any; - getErrorForKey(key: any, ...args: any[]): any; - isValid(): any; - keyErrorMessage(key: any, ...args: any[]): any; - keyIsInvalid(key: any, ...args: any[]): any; - reset(): void; - setValidationErrors(errors: any): void; - validate(obj: any, ...args: any[]): any; - validationErrors(): any; -} - -interface CustomValidationContext { - value: any; -} - -interface SchemaDefinition { - type: any; - label?: string | (() => string); - optional?: boolean | (() => boolean); - min?: number | boolean | Date | (() => number | boolean | Date); - max?: number | boolean | Date | (() => number | boolean | Date); - minCount?: number | (() => number); - maxCount?: number | (() => number); - allowedValues?: any[] | (() => any[]); - decimal?: boolean; - exclusiveMax?: boolean; - exclusiveMin?: boolean; - regEx?: RegExp | RegExp[]; - custom?: () => any; - blackbox?: boolean; - autoValue?: () => any; - defaultValue?: any; - trim?: boolean; -} - -interface CleanOption { - filter?: boolean; - autoConvert?: boolean; - removeEmptyStrings?: boolean; - trimStrings?: boolean; - getAutoValues?: boolean; - isModifier?: boolean; - extendAutoValueContext?: boolean; -} - -// ??? -interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; - namedContext(name?: string): SimpleSchemaValidationContextStatic; - addValidator(validator: () => boolean): any; - pick(...fields: string[]): SimpleSchemaStatic; - omit(...fields: string[]): SimpleSchemaStatic; - clean(doc: any, options?: CleanOption): any; - schema(key?: string): SchemaDefinition | SchemaDefinition[]; - getDefinition(key: string, propList?: any, functionContext?: any): any; - keyIsInBlackBox(key: string): boolean; - labels(labels: {[key: string]: string}): void; - label(key: any): any; - Integer: RegExp; - messages(messages: any): any; - messageForError(type: any, key: any, def: any, value: any): string; - allowsKey(key: any): string; - newContext(): SimpleSchemaValidationContextStatic; - objectKeys(keyPrefix: any): any[]; - validate(obj: any, options?: ValidationOption): void; - validator(options: ValidationOption): () => boolean; - RegEx: { - Email: RegExp; - EmailWithTLD: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; - ErrorTypes: { - REQUIRED: string, - MIN_STRING: string, - MAX_STRING: string, - MIN_NUMBER: string, - MAX_NUMBER: string, - MIN_NUMBER_EXCLUSIVE: string, - MAX_NUMBER_EXCLUSIVE: string, - MIN_DATE: string, - MAX_DATE: string, - BAD_DATE: string, - MIN_COUNT: string, - MAX_COUNT: string, - MUST_BE_INTEGER: string, - VALUE_NOT_ALLOWED: string, - EXPECTED_TYPE: string, - FAILED_REGULAR_EXPRESSION: string, - KEY_NOT_IN_SCHEMA: string - }; -} - -interface ValidationOption { - modifier?: boolean; - upsert?: boolean; - clean?: boolean; - filter?: boolean; - upsertextendedCustomContext?: boolean; -} - -interface SimpleSchemaValidationContextStaticKeys { - name: string; - type: string; - value?: any; -} - -interface SimpleSchemaError { - name: string; - type: string; -} - -interface SimpleSchemaValidationContextStatic { - validate(obj: any, options?: ValidationOption): boolean; - validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; - resetValidation(): void; - isValid(): boolean; - invalidKeys(): SimpleSchemaValidationContextStaticKeys[]; - addInvalidKeys(errors: SimpleSchemaError[]): void; - keyIsInvalid(name: any): boolean; - keyErrorMessage(name: any): string; - getErrorObject(): any; -} - -interface MongoObjectStatic { - forEachNode(func: (() => void), options?: {endPointsOnly: boolean}): void; - getValueForPosition(position: string): any; - setValueForPosition(position: string, value: any): void; - removeValueForPosition(position: string): void; - getKeyForPosition(position: string): any; - getGenericKeyForPosition(position: string): any; - getInfoForKey(key: string): any; - getPositionForKey(key: string): string; - getPositionsForGenericKey(key: string): string[]; - getValueForKey(key: string): any; - addKey(key: string, val: any, op: string): any; - removeGenericKeys(keys: string[]): void; - removeGenericKey(key: string): void; - removeKey(key: string): void; - removeKeys(keys: string[]): void; - filterGenericKeys(test: (() => boolean)): void; - setValueForKey(key: string, val: any): void; - setValueForGenericKey(key: string, val: any): void; - getObject(): any; - getFlatObject(options?: {keepArrays?: boolean}): any; - affectsKey(key: string): any; - affectsGenericKey(key: string): any; - affectsGenericKeyImplicit(key: string): any; -} - -export const SimpleSchema: SimpleSchemaStatic; -export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; -export const MongoObject: MongoObjectStatic; - -export interface SimpleSchema { - debug: boolean; - validate(obj: any, options?: ValidationOption): void; - addValidator(validator: () => boolean): any; - extendOptions(options: {[key: string]: any}): void; - messages(messages: any): void; - RegEx: { - Email: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; -} - -export interface MongoObject { - expandKey(val: any, key: string, obj: any): void; -} - -export default SimpleSchema; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts deleted file mode 100644 index 3c40f0c4bb..0000000000 --- a/types/simpl-schema/simpl-schema-tests.ts +++ /dev/null @@ -1,96 +0,0 @@ -import SimpleSchema from 'simpl-schema'; - -const StringSchema = new SimpleSchema({ - basicString: { - type: String - }, - limitedString: { - type: String, - allowedValues: ['pro', 'con'] - }, - regExpString: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - createdAt: { - type: Date, - autoValue: () => new Date(), - }, - title: { - type: String, - label: "Argument", - /* TODO, this does not work: "The containing arrow function captures the global value of 'this' which implicitly has type 'any'." - custom: () => { - const text = this.value; - if (text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; - } - */ - }, -}); - -StringSchema.validate({ - basicString: "Test", - limitedString: "pro", - regExpString: "id" -}); - - /* - , - title: { - type: String, - label: "Argument", - custom: function () { - var text = this.value; - text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); - - if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } - else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } - } - }, - questionId: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - side: { - type: String, - allowedValues: ['pro', 'con'] - }, - userId: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - createdAt: { - type: Date, - autoValue: () => new Date(), - }, - clapCount: { - type: SimpleSchema.Integer, - defaultValue: 0 - }, - highlight: { - type: Array, - optional: true - }, - 'highlight.$': { - type: Object - }, - 'highlight.$.start': SimpleSchema.Integer, - 'highlight.$.end': SimpleSchema.Integer, - 'highlight.$.text': { - type: String, - trim: false - } - */ - /* - , - { - clean: { - filter: true, - autoConvert: true, - removeEmptyStrings: true, - trimStrings: true, - getAutoValues: true, - removeNullsFromArrays: true, - } - } - */ diff --git a/types/simpl-schema/tsconfig.json b/types/simpl-schema/tsconfig.json deleted file mode 100644 index d079496f4e..0000000000 --- a/types/simpl-schema/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "simpl-schema-tests.ts" - ] -} diff --git a/types/simpl-schema/tslint.json b/types/simpl-schema/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/simpl-schema/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } From e2a4a22af587be3c8b0e885a6bd6aa39ef580970 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 20:58:56 +0100 Subject: [PATCH 0155/2268] Revert "Added dependencies file" This reverts commit 3ba1ae85e26eea8062509b406ad1baf9e5092355. --- types/react-bootstrap-typeahead/package.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 types/react-bootstrap-typeahead/package.json diff --git a/types/react-bootstrap-typeahead/package.json b/types/react-bootstrap-typeahead/package.json deleted file mode 100644 index 4d9ec4a338..0000000000 --- a/types/react-bootstrap-typeahead/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "dependencies": { - "csstype": "^2.2.0" - } -} From 1d261238349a1013a4495654a1dd187bbfa64a1d Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:00:21 +0100 Subject: [PATCH 0156/2268] Revert "Added definitions for Highlighter, Menu and MenuItem" This reverts commit d944d9c929913c6c3bce93eea1ecc485dfa2bc5d. --- types/react-bootstrap-typeahead/index.d.ts | 56 ++++--------------- .../react-bootstrap-typeahead-tests.tsx | 27 +-------- 2 files changed, 11 insertions(+), 72 deletions(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 2c0495ce03..9fa23ac5f5 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.4 +// Type definitions for react-bootstrap-typeahead 3.3 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov @@ -6,23 +6,18 @@ // Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -// TODO: components +// TODO: , , , components import * as React from 'react'; -import * as CSS from 'csstype'; export interface TypeaheadFilterbyProps { - filterBy: string[]; - labelKey: (string | (() => void)); - multiple: boolean; - selected: any[]; - caseSensitive: boolean; - ignoreDiacritics: boolean; - text: string; -} - -export interface TypeaheadMenuProps { - text: string; + filterBy: string[]; + labelKey: (string | (() => void)); + multiple: boolean; + selected: any[]; + caseSensitive: boolean; + ignoreDiacritics: boolean; + text: string; } export interface TypeaheadProps { @@ -154,7 +149,7 @@ export interface TypeaheadProps { renderMenu?: (results: Array, menuProps: any) => any; /* Provides a hook for customized rendering of menu item contents. */ - renderMenuItemChildren?: (option: T, props: TypeaheadMenuProps, index: number) => any; + renderMenuItemChildren?: (option: T, props: TypeaheadProps, index: number) => any; /* Provides a hook for customized rendering of tokens when multiple selections are enabled. */ renderToken?: (selectedItem: T | string, onRemove: () => void) => any; @@ -189,34 +184,3 @@ export interface AsyncTypeaheadProps extends TypeaheadProps { } export const AsyncTypeahead: React.ClassicComponentClass>; - -export interface HighligherProps { - key: string; - search: string; -} - -export const Highlighter: React.ClassicComponentClass>; - -export interface MenuProps { - id: string; - className?: string; - emptyLabel?: string; - innerRef?: string; - maxHeight?: string; - style?: CSS.Properties; -} - -export const Menu: React.ClassicComponentClass>; - -export interface MenuItemProps { - option: T; - position: number; - label?: string; - active?: boolean; - className?: string; - disabled?: boolean; - onClick?: (e: Event) => any; - onMouseDown?: (e: Event) => any; -} - -export const MenuItem: React.ClassicComponentClass>; diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 5fcbe15328..6c9143dfea 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Typeahead, Highlighter, Menu, MenuItem } from 'react-bootstrap-typeahead'; +import { Typeahead } from 'react-bootstrap-typeahead'; const options = [ { name: 'Alabama', population: 4780127, capital: 'Montgomery', region: 'South' }, @@ -36,31 +36,6 @@ class BasicExample extends React.Component { filterBy={(option, props) => (props.text.indexOf(option) !== -1) } placeholder="Choose a state..." /> - - - {option.name} - - } - /> - - - {options.map((o, idx) => ( - - {o.name} - - ))} - - ); } From 66aa94c11c723e0409ac274b4f62a0d4f3d20dab Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:00:59 +0100 Subject: [PATCH 0157/2268] Revert "Fixed version..." This reverts commit 4b872aca1265d8ba44347fbdc33c204d9c123f33. --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 9fa23ac5f5..89188c8b86 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.3 +// Type definitions for react-bootstrap-typeahead 3.2.2 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From bc6d1691571d6e8fe6808fe075d3249e3b5fd185 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:01:03 +0100 Subject: [PATCH 0158/2268] Revert "Increase version" This reverts commit 672ec749ab95fa2893469c2a2ebd6badb4336d58. --- types/react-bootstrap-typeahead/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 89188c8b86..d0bfcea9a7 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-bootstrap-typeahead 3.2.2 +// Type definitions for react-bootstrap-typeahead 3.2 // Project: https://github.com/ericgio/react-bootstrap-typeahead // Definitions by: Guymestef // Rajab Shakirov From 40dac65f4ed3e1cd7151714a2a9c88d44b7bbc00 Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:01:06 +0100 Subject: [PATCH 0159/2268] Revert "Changed filterBy" This reverts commit f425f279923d7409a31bbdfdf2816db13ad454f4. --- types/react-bootstrap-typeahead/index.d.ts | 13 +------------ .../react-bootstrap-typeahead-tests.tsx | 8 -------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index d0bfcea9a7..fa970bc5b3 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -3,23 +3,12 @@ // Definitions by: Guymestef // Rajab Shakirov // Paito Anderson -// Andreas Richter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // TODO: , , , components import * as React from 'react'; -export interface TypeaheadFilterbyProps { - filterBy: string[]; - labelKey: (string | (() => void)); - multiple: boolean; - selected: any[]; - caseSensitive: boolean; - ignoreDiacritics: boolean; - text: string; -} - export interface TypeaheadProps { /* For localized accessibility: Should return a string indicating the number of results for screen readers. Receives the current results. */ a11yNumResults?: () => void; @@ -69,7 +58,7 @@ export interface TypeaheadProps { emptyLabel?: string; /* Either an array of fields in option to search, or a custom filtering callback. */ - filterBy?: (string[] | ((option: T | string, props: TypeaheadFilterbyProps) => boolean)); + filterBy?: (string[] | ((option: T | string, text: string) => boolean)); /* Highlights the menu item if there is only one result and allows selecting that item by hitting enter. Does not work with allowNew. */ diff --git a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx index 6c9143dfea..10237b1fa0 100644 --- a/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx +++ b/types/react-bootstrap-typeahead/react-bootstrap-typeahead-tests.tsx @@ -28,14 +28,6 @@ class BasicExample extends React.Component { onInputChange={(value, e) => {}} placeholder="Choose a state..." /> - (props.text.indexOf(option) !== -1) } - placeholder="Choose a state..." - /> ); } From d01679afa6d11acd93f6adaa914d2ab74cf52afd Mon Sep 17 00:00:00 2001 From: arichter83 <36486293+arichter83@users.noreply.github.com> Date: Tue, 4 Dec 2018 21:02:19 +0100 Subject: [PATCH 0160/2268] Basic version of Simpl-Schema definition --- types/simpl-schema/index.d.ts | 195 +++++++++++++++++++++++ types/simpl-schema/simpl-schema-tests.ts | 96 +++++++++++ types/simpl-schema/tsconfig.json | 23 +++ types/simpl-schema/tslint.json | 1 + 4 files changed, 315 insertions(+) create mode 100644 types/simpl-schema/index.d.ts create mode 100644 types/simpl-schema/simpl-schema-tests.ts create mode 100644 types/simpl-schema/tsconfig.json create mode 100644 types/simpl-schema/tslint.json diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts new file mode 100644 index 0000000000..32dd8d7b66 --- /dev/null +++ b/types/simpl-schema/index.d.ts @@ -0,0 +1,195 @@ +// Type definitions for simpl-schema 0.1 +// Project: https://github.com/aldeed/simple-schema-js +// Definitions by: Andreas Richter +// Qkramer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export class ValidationContext { + constructor(ss: any); + addValidationErrors(errors: any): void; + clean(...args: any[]): any; + getErrorForKey(key: any, ...args: any[]): any; + isValid(): any; + keyErrorMessage(key: any, ...args: any[]): any; + keyIsInvalid(key: any, ...args: any[]): any; + reset(): void; + setValidationErrors(errors: any): void; + validate(obj: any, ...args: any[]): any; + validationErrors(): any; +} + +interface CustomValidationContext { + value: any; +} + +interface SchemaDefinition { + type: any; + label?: string | (() => string); + optional?: boolean | (() => boolean); + min?: number | boolean | Date | (() => number | boolean | Date); + max?: number | boolean | Date | (() => number | boolean | Date); + minCount?: number | (() => number); + maxCount?: number | (() => number); + allowedValues?: any[] | (() => any[]); + decimal?: boolean; + exclusiveMax?: boolean; + exclusiveMin?: boolean; + regEx?: RegExp | RegExp[]; + custom?: () => any; + blackbox?: boolean; + autoValue?: () => any; + defaultValue?: any; + trim?: boolean; +} + +interface CleanOption { + filter?: boolean; + autoConvert?: boolean; + removeEmptyStrings?: boolean; + trimStrings?: boolean; + getAutoValues?: boolean; + isModifier?: boolean; + extendAutoValueContext?: boolean; +} + +// ??? +interface SimpleSchemaStatic { + new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; + namedContext(name?: string): SimpleSchemaValidationContextStatic; + addValidator(validator: () => boolean): any; + pick(...fields: string[]): SimpleSchemaStatic; + omit(...fields: string[]): SimpleSchemaStatic; + clean(doc: any, options?: CleanOption): any; + schema(key?: string): SchemaDefinition | SchemaDefinition[]; + getDefinition(key: string, propList?: any, functionContext?: any): any; + keyIsInBlackBox(key: string): boolean; + labels(labels: {[key: string]: string}): void; + label(key: any): any; + Integer: RegExp; + messages(messages: any): any; + messageForError(type: any, key: any, def: any, value: any): string; + allowsKey(key: any): string; + newContext(): SimpleSchemaValidationContextStatic; + objectKeys(keyPrefix: any): any[]; + validate(obj: any, options?: ValidationOption): void; + validator(options: ValidationOption): () => boolean; + RegEx: { + Email: RegExp; + EmailWithTLD: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; + ErrorTypes: { + REQUIRED: string, + MIN_STRING: string, + MAX_STRING: string, + MIN_NUMBER: string, + MAX_NUMBER: string, + MIN_NUMBER_EXCLUSIVE: string, + MAX_NUMBER_EXCLUSIVE: string, + MIN_DATE: string, + MAX_DATE: string, + BAD_DATE: string, + MIN_COUNT: string, + MAX_COUNT: string, + MUST_BE_INTEGER: string, + VALUE_NOT_ALLOWED: string, + EXPECTED_TYPE: string, + FAILED_REGULAR_EXPRESSION: string, + KEY_NOT_IN_SCHEMA: string + }; +} + +interface ValidationOption { + modifier?: boolean; + upsert?: boolean; + clean?: boolean; + filter?: boolean; + upsertextendedCustomContext?: boolean; +} + +interface SimpleSchemaValidationContextStaticKeys { + name: string; + type: string; + value?: any; +} + +interface SimpleSchemaError { + name: string; + type: string; +} + +interface SimpleSchemaValidationContextStatic { + validate(obj: any, options?: ValidationOption): boolean; + validateOne(doc: any, keyName: string, options?: ValidationOption): boolean; + resetValidation(): void; + isValid(): boolean; + invalidKeys(): SimpleSchemaValidationContextStaticKeys[]; + addInvalidKeys(errors: SimpleSchemaError[]): void; + keyIsInvalid(name: any): boolean; + keyErrorMessage(name: any): string; + getErrorObject(): any; +} + +interface MongoObjectStatic { + forEachNode(func: (() => void), options?: {endPointsOnly: boolean}): void; + getValueForPosition(position: string): any; + setValueForPosition(position: string, value: any): void; + removeValueForPosition(position: string): void; + getKeyForPosition(position: string): any; + getGenericKeyForPosition(position: string): any; + getInfoForKey(key: string): any; + getPositionForKey(key: string): string; + getPositionsForGenericKey(key: string): string[]; + getValueForKey(key: string): any; + addKey(key: string, val: any, op: string): any; + removeGenericKeys(keys: string[]): void; + removeGenericKey(key: string): void; + removeKey(key: string): void; + removeKeys(keys: string[]): void; + filterGenericKeys(test: (() => boolean)): void; + setValueForKey(key: string, val: any): void; + setValueForGenericKey(key: string, val: any): void; + getObject(): any; + getFlatObject(options?: {keepArrays?: boolean}): any; + affectsKey(key: string): any; + affectsGenericKey(key: string): any; + affectsGenericKeyImplicit(key: string): any; +} + +export const SimpleSchema: SimpleSchemaStatic; +export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; +export const MongoObject: MongoObjectStatic; + +export interface SimpleSchema { + debug: boolean; + validate(obj: any, options?: ValidationOption): void; + addValidator(validator: () => boolean): any; + extendOptions(options: {[key: string]: any}): void; + messages(messages: any): void; + RegEx: { + Email: RegExp; + Domain: RegExp; + WeakDomain: RegExp; + IP: RegExp; + IPv4: RegExp; + IPv6: RegExp; + Url: RegExp; + Id: RegExp; + ZipCode: RegExp; + Phone: RegExp; + }; +} + +export interface MongoObject { + expandKey(val: any, key: string, obj: any): void; +} + +export default SimpleSchema; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts new file mode 100644 index 0000000000..3c40f0c4bb --- /dev/null +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -0,0 +1,96 @@ +import SimpleSchema from 'simpl-schema'; + +const StringSchema = new SimpleSchema({ + basicString: { + type: String + }, + limitedString: { + type: String, + allowedValues: ['pro', 'con'] + }, + regExpString: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + title: { + type: String, + label: "Argument", + /* TODO, this does not work: "The containing arrow function captures the global value of 'this' which implicitly has type 'any'." + custom: () => { + const text = this.value; + if (text.length > 10) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: 10 }; + } + */ + }, +}); + +StringSchema.validate({ + basicString: "Test", + limitedString: "pro", + regExpString: "id" +}); + + /* + , + title: { + type: String, + label: "Argument", + custom: function () { + var text = this.value; + text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); + + if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } + else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } + } + }, + questionId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + side: { + type: String, + allowedValues: ['pro', 'con'] + }, + userId: { + type: String, + regEx: SimpleSchema.RegEx.Id + }, + createdAt: { + type: Date, + autoValue: () => new Date(), + }, + clapCount: { + type: SimpleSchema.Integer, + defaultValue: 0 + }, + highlight: { + type: Array, + optional: true + }, + 'highlight.$': { + type: Object + }, + 'highlight.$.start': SimpleSchema.Integer, + 'highlight.$.end': SimpleSchema.Integer, + 'highlight.$.text': { + type: String, + trim: false + } + */ + /* + , + { + clean: { + filter: true, + autoConvert: true, + removeEmptyStrings: true, + trimStrings: true, + getAutoValues: true, + removeNullsFromArrays: true, + } + } + */ diff --git a/types/simpl-schema/tsconfig.json b/types/simpl-schema/tsconfig.json new file mode 100644 index 0000000000..d079496f4e --- /dev/null +++ b/types/simpl-schema/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", + "simpl-schema-tests.ts" + ] +} diff --git a/types/simpl-schema/tslint.json b/types/simpl-schema/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/simpl-schema/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 4ca42304a5ea6ce7429dce947b65be1459083811 Mon Sep 17 00:00:00 2001 From: Justin Francos Date: Tue, 4 Dec 2018 16:54:53 -0500 Subject: [PATCH 0161/2268] update MongoStore to include close() as per: https://github.com/jdesboeufs/connect-mongo/blob/9cbc56d5c35ce0a169ba4290549793979955433e/src/index.js#L315 --- types/connect-mongo/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts index ea39a13f42..7173cb50dc 100644 --- a/types/connect-mongo/index.d.ts +++ b/types/connect-mongo/index.d.ts @@ -110,6 +110,7 @@ declare namespace connectMongo { length: (callback: (err: any, length: number) => void) => void; clear: (callback?: (err?: any) => void) => void; touch: (sid: string, session: Express.SessionData, callback?: (err: any) => void) => void; + close: () => void; } } From 734b931c87758515eac1db3dab4f53a826db5aff Mon Sep 17 00:00:00 2001 From: TeamworkGuy2 Date: Tue, 4 Dec 2018 22:06:53 +0000 Subject: [PATCH 0162/2268] [shasum] Add shasum@1.0 definition --- types/shasum/index.d.ts | 14 ++++++++++++++ types/shasum/shasum-tests.ts | 7 +++++++ types/shasum/tsconfig.json | 23 +++++++++++++++++++++++ types/shasum/tslint.json | 1 + 4 files changed, 45 insertions(+) create mode 100644 types/shasum/index.d.ts create mode 100644 types/shasum/shasum-tests.ts create mode 100644 types/shasum/tsconfig.json create mode 100644 types/shasum/tslint.json diff --git a/types/shasum/index.d.ts b/types/shasum/index.d.ts new file mode 100644 index 0000000000..500c811d07 --- /dev/null +++ b/types/shasum/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for shasum 1.0 +// Project: https://github.com/dominictarr/shasum +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Single function that return the sha1sum. Installing this is just a little bit quicker than reading the crypto documentation. + * var shasum = require('shasum') + * shasum(string || buffer || object) + * It also works in the browser with browserify. + */ +declare function shasum(str: any, alg?: string | null, format?: "hex" | "latin1" | "base64"): string; + +export = shasum; diff --git a/types/shasum/shasum-tests.ts b/types/shasum/shasum-tests.ts new file mode 100644 index 0000000000..01c0ba32fc --- /dev/null +++ b/types/shasum/shasum-tests.ts @@ -0,0 +1,7 @@ +import shasum = require("shasum"); + +function test(): string { + const res1 = shasum("source"); + const res2 = shasum({ prop: "source" }, null, "hex"); + return res1 || res2; +} diff --git a/types/shasum/tsconfig.json b/types/shasum/tsconfig.json new file mode 100644 index 0000000000..a0be2a9c4b --- /dev/null +++ b/types/shasum/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", + "shasum-tests.ts" + ] +} \ No newline at end of file diff --git a/types/shasum/tslint.json b/types/shasum/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/shasum/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f24094176065b5757b817f420b86f86729ae9fd9 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 20:10:08 -0200 Subject: [PATCH 0163/2268] changing github2 customHeaders option to correct type --- types/passport-github2/index.d.ts | 6 ++++-- types/passport-oauth2/index.d.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/passport-github2/index.d.ts b/types/passport-github2/index.d.ts index 0b2c1f6a5d..4ca8e93124 100644 --- a/types/passport-github2/index.d.ts +++ b/types/passport-github2/index.d.ts @@ -3,12 +3,14 @@ // Definitions by: Yasunori Ohoka // Maarten Mulders // Christoph Werner +// Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import passport = require('passport'); import oauth2 = require('passport-oauth2'); import express = require('express'); +import { OutgoingHttpHeaders } from 'http'; export interface Profile extends passport.Profile { profileUrl: string; @@ -25,7 +27,7 @@ export interface StrategyOption extends passport.AuthenticateOptions { authorizationURL?: string; tokenURL?: string; scopeSeparator?: string; - customHeaders?: string; + customHeaders?: OutgoingHttpHeaders; userProfileURL?: string; } @@ -46,7 +48,7 @@ export interface _StrategyOptionsBase extends OAuth2StrategyOptionsWithoutRequir authorizationURL?: string; tokenURL?: string; scopeSeparator?: string; - customHeaders?: string; + customHeaders?: OutgoingHttpHeaders; userProfileURL?: string; } diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index cd78f377c2..28a1a06348 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Pasi Eronen // Wang Zishi // Eduardo AC +// Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 1b11a2dd3567606a25656c3a32137515127290b7 Mon Sep 17 00:00:00 2001 From: Ben Talbot Date: Tue, 4 Dec 2018 22:10:35 -0800 Subject: [PATCH 0164/2268] Add types for @google-cloud/kms --- .../google-cloud__kms-tests.ts | 117 ++++++++ types/google-cloud__kms/index.d.ts | 275 ++++++++++++++++++ types/google-cloud__kms/tsconfig.json | 28 ++ types/google-cloud__kms/tslint.json | 7 + 4 files changed, 427 insertions(+) create mode 100644 types/google-cloud__kms/google-cloud__kms-tests.ts create mode 100644 types/google-cloud__kms/index.d.ts create mode 100644 types/google-cloud__kms/tsconfig.json create mode 100644 types/google-cloud__kms/tslint.json diff --git a/types/google-cloud__kms/google-cloud__kms-tests.ts b/types/google-cloud__kms/google-cloud__kms-tests.ts new file mode 100644 index 0000000000..e3f6648310 --- /dev/null +++ b/types/google-cloud__kms/google-cloud__kms-tests.ts @@ -0,0 +1,117 @@ +import kms = require('@google-cloud/kms'); + +let kmsClientV1: kms.v1.KeyManagementServiceClient; +kmsClientV1 = new kms.v1.KeyManagementServiceClient(); + +const credentials = { + type: 'service_account', + project_id: '****', + private_key_id: '****', + private_key: '****', + client_email: '****', + client_id: '****', + auth_uri: 'https://accounts.google.com/o/oauth2/auth', + token_uri: 'https://oauth2.googleapis.com/token', + auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + client_x509_cert_url: '****' +}; + +let kmsClient: kms.KeyManagementServiceClient; +kmsClient = new kms.KeyManagementServiceClient({ credentials }); + +async function exampleListKeyRings() { + const locationPath = kmsClient.locationPath('[PROJECT_ID]', '[LOCATION]'); + const [ asyncKeyRings ] = await kmsClient.listKeyRings({parent: locationPath}); + if (asyncKeyRings.length > 0) { + const keyRing = asyncKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + + kmsClient.listKeyRings({parent: locationPath}, (err, [ callbackKeyRings ]) => { + if (callbackKeyRings.length > 0) { + const keyRing = callbackKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); + + kmsClient.listKeyRings({parent: locationPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeyRings ]) => { + if (callbackWithOptionsKeyRings.length > 0) { + const keyRing = callbackWithOptionsKeyRings[ 0 ]; + console.log(`KeyRing: ${keyRing.name}`); + } + }); +} + +async function exampleListCryptoKeys() { + const keyRingPath = kmsClient.keyRingPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]'); + const [ asyncKeys ] = await kmsClient.listCryptoKeys({parent: keyRingPath}); + if (asyncKeys.length > 0) { + const key = asyncKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + + kmsClient.listCryptoKeys({parent: keyRingPath}, (err, [ callbackKeys ]) => { + if (callbackKeys.length > 0) { + const key = callbackKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); + + kmsClient.listCryptoKeys({parent: keyRingPath}, { timeout: 1000 }, (err, [ callbackWithOptionsKeys ]) => { + if (callbackWithOptionsKeys.length > 0) { + const key = callbackWithOptionsKeys[ 0 ]; + console.log(`CryptoKey: ${key.name} Version: ${key.primary.name}`); + } + }); +} + +async function exampleEncrypt() { + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const unencryptedText = new Buffer('Hello World'); + + const [ asyncEncryptResult ] = await kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }); + if (asyncEncryptResult != null) { + console.log(`Encrypted: ${asyncEncryptResult.ciphertext.toString('base64')}`); + } + + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, (err, [ callbackEncryptResult ]) => { + if (callbackEncryptResult != null) { + console.log(`Encrypted: ${callbackEncryptResult.ciphertext.toString('base64')}`); + } + }); + + kmsClient.encrypt({ name: formattedName, plaintext: unencryptedText.toString('base64') }, { timeout: 1000 }, (err, [ callbackWithOptionsEncryptResult ]) => { + if (callbackWithOptionsEncryptResult != null) { + console.log(`Encrypted: ${callbackWithOptionsEncryptResult.ciphertext.toString('base64')}`); + } + }); +} + +async function exampleDecrypt() { + // Example pulling a file from Cloud Storage + // const secretsStorage = new Storage({ credentials }); + // const bucket = secretsStorage.bucket('[KMS_STORAGE_BUCKET]'); + // const filePath = '[PATH_TO_KMS_ENCRYPTED_FILE'; + // const file = bucket.file(filePath); + // const buffers = await file.download(); + // const buffer = buffers[ 0 ]; + + const buffer = new Buffer('[ENCRYPTED_SOURCE_BUFFER]'); + const formattedName = kmsClient.cryptoKeyPath('[PROJECT_ID]', '[LOCATION]', '[KEYRING_ID]', '[KEY_ID]'); + const [ asyncDecryptResult ] = await kmsClient.decrypt({name: formattedName, ciphertext: buffer.toString('base64') }); + if (asyncDecryptResult != null) { + console.log(`Decrypted: ${asyncDecryptResult.plaintext}`); + } + + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackDecryptResult ]) => { + if (callbackDecryptResult != null) { + console.log(`Decrypted: ${callbackDecryptResult.plaintext}`); + } + }); + + kmsClient.decrypt({ name: formattedName, ciphertext: buffer.toString('base64') }, (err, [ callbackWithOptionsDecryptResult ]) => { + if (callbackWithOptionsDecryptResult != null) { + console.log(`Decrypted: ${callbackWithOptionsDecryptResult.plaintext}`); + } + }); +} diff --git a/types/google-cloud__kms/index.d.ts b/types/google-cloud__kms/index.d.ts new file mode 100644 index 0000000000..7f14a731bd --- /dev/null +++ b/types/google-cloud__kms/index.d.ts @@ -0,0 +1,275 @@ +// Type definitions for @google-cloud/kms 0.2 +// Project: https://github.com/googleapis/nodejs-kms +// Definitions by: Ben Talbot +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +declare module '@google-cloud/kms' { + namespace v1 { + enum CryptoKeyVersionAlgorithm { + // Not specified. + CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0, + + // Creates symmetric encryption keys. + GOOGLE_SYMMETRIC_ENCRYPTION = 1, + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 2, + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 3, + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 4, + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5, + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6, + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7, + + // RSAES-OAEP 2048 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_2048_SHA256 = 8, + + // RSAES-OAEP 3072 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_3072_SHA256 = 9, + + // RSAES-OAEP 4096 bit key with a SHA256 digest. + RSA_DECRYPT_OAEP_4096_SHA256 = 10, + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 12, + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 13, + } + + enum CryptoKeyVersionState { + // Not specified. + CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0, + + // This version is still being generated. It may not be used, enabled, + // disabled, or destroyed yet. Cloud KMS will automatically mark this + // version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready. + PENDING_GENERATION = 5, + + // This version may be used for cryptographic operations. + ENABLED = 1, + + // This version may not be used, but the key material is still available, + // and the version can be placed back into the [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] state. + DISABLED = 2, + + // This version is destroyed, and the key material is no longer stored. + // A version may not leave this state once entered. + DESTROYED = 3, + + // This version is scheduled for destruction, and will be destroyed soon. + // Call + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state. + DESTROY_SCHEDULED = 4, + } + + enum CryptoKeyVersionView { + // Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include + // the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0, + + // Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + FULL = 1, + } + + enum ProtectionLevel { + // Not specified. + PROTECTION_LEVEL_UNSPECIFIED = 0, + + // Crypto operations are performed in software. + SOFTWARE = 1, + + // Crypto operations are performed in a Hardware Security Module. + HSM = 2, + } + + enum AttestationFormat { + ATTESTATION_FORMAT_UNSPECIFIED = 0, + + // Cavium HSM attestation compressed with gzip. Note that this format is + // defined by Cavium and subject to change at any time. + CAVIUM_V1_COMPRESSED = 3, + } + + interface KeyOperationAttestation { + format: AttestationFormat; + } + + interface CryptoKeyVersion { + name: string; + state: CryptoKeyVersionState; + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + attestation?: KeyOperationAttestation; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + generateTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + destroyEventTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + } + + interface CryptoKeyVersionTemplate { + protectionLevel: ProtectionLevel; + algorithm: CryptoKeyVersionAlgorithm; + } + + enum CryptoKeyPurpose { + // Not specified. + CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + ENCRYPT_DECRYPT = 1, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_SIGN = 5, + + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with + // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + ASYMMETRIC_DECRYPT = 6, + } + + interface CryptoKey { + name: string; + primary: CryptoKeyVersion; + purpose: CryptoKeyPurpose; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + nextRotationTime?: google_protobuf_timestamp_pb.Timestamp.AsObject; + versionTemplate: CryptoKeyVersionTemplate; + labels: { [s: string]: string; }; + } + + interface KeyRing { + name: string; + createTime: google_protobuf_timestamp_pb.Timestamp.AsObject; + } + + namespace KeyManagementServiceClient { + interface ConfigurationObject { + credentials?: { + client_email?: string; + private_key?: string + }; + email?: string; + keyFilename?: string; + port?: number; + projectId?: string; + promise?: any; + servicePath?: string; + } + + interface EncryptRequest { + name: string; + plaintext: string; + additionalAuthenticatedData?: string; + } + interface EncryptResponse { + name: string; + ciphertext: Buffer; + } + type EncryptCallback = (err: Error | null, apiResponse: [EncryptResponse, any, any]) => void; + + interface DecryptRequest { + name: string; + ciphertext: string; + additionalAuthenticatedData?: string; + } + interface DecryptResponse { + plaintext: Buffer; + } + type DecryptCallback = (err: Error | null, apiResponse: [DecryptResponse, any, any]) => void; + + interface ListKeyRingsRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListKeyRingsCallback = (err: Error | null, apiResponse: [KeyRing[], any, any]) => void; + + interface ListCryptoKeysRequest { + parent: string; + page_size?: number; + page_token?: string; + } + type ListCryptoKeysCallback = (err: Error | null, apiResponse: [CryptoKey[], any, any]) => void; + } + + class KeyManagementServiceClient { + constructor(options?: KeyManagementServiceClient.ConfigurationObject); + + keyRingPath(project: string, location: string, keyRing: string): string; + cryptoKeyPathPath(project: string, location: string, keyRing: string, cryptoKeyPath: string): string; + locationPath(project: string, location: string): string; + cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string; + cryptoKeyVersionPath(project: string, location: string, keyRing: string, cryptoKey: string, cryptoKeyVersion: string): string; + + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.EncryptResponse, any, any]>; + encrypt(request: KeyManagementServiceClient.EncryptRequest, callback: KeyManagementServiceClient.EncryptCallback): void; + encrypt(request: KeyManagementServiceClient.EncryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.EncryptCallback): void; + + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyManagementServiceClient.DecryptResponse, any, any]>; + decrypt(request: KeyManagementServiceClient.DecryptRequest, callback: KeyManagementServiceClient.DecryptCallback): void; + decrypt(request: KeyManagementServiceClient.DecryptRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.DecryptCallback): void; + + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts?: GAX.CallOptions): Promise<[KeyRing[], any, any]>; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + listKeyRings(request: KeyManagementServiceClient.ListKeyRingsRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListKeyRingsCallback): void; + + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts?: GAX.CallOptions): Promise<[CryptoKey[], any, any]>; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + listCryptoKeys(request: KeyManagementServiceClient.ListCryptoKeysRequest, gaxOpts: GAX.CallOptions, callback: KeyManagementServiceClient.ListCryptoKeysCallback): void; + } + } + + class KeyManagementServiceClient extends v1.KeyManagementServiceClient { + constructor(options?: v1.KeyManagementServiceClient.ConfigurationObject); + } + + namespace GAX { + /** https://googleapis.github.io/gax-nodejs/global.html#CallOptions */ + interface CallOptions { + timeout?: number; + retry?: RetryOptions; + autoPaginate?: boolean; + pageToken?: object; + isBundling?: boolean; + longrunning?: BackoffSettings; + promise?: PromiseConstructor; // FIXME Unsure if this is the correct type; remove this comment if it is + } + + /** https://googleapis.github.io/gax-nodejs/global.html#RetryOptions */ + interface RetryOptions { + retryCodes: string[]; + backoffSettings: BackoffSettings; + } + + /** https://googleapis.github.io/gax-nodejs/global.html#BackoffSettings */ + interface BackoffSettings { + initialRetryDelayMillis: number; + retryDelayMultiplier: number; + maxRetryDelayMillis: number; + initialRpcTimeoutMillis: number; + maxRpcTimeoutMillis: number; + totalTimeoutMillis: number; + } + } +} diff --git a/types/google-cloud__kms/tsconfig.json b/types/google-cloud__kms/tsconfig.json new file mode 100644 index 0000000000..bb1ba097cc --- /dev/null +++ b/types/google-cloud__kms/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "paths": { + "@google-cloud/kms": [ + "google-cloud__kms" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google-cloud__kms-tests.ts" + ] +} \ No newline at end of file diff --git a/types/google-cloud__kms/tslint.json b/types/google-cloud__kms/tslint.json new file mode 100644 index 0000000000..1f75469243 --- /dev/null +++ b/types/google-cloud__kms/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "indent": [true, "tabs"], + "no-single-declare-module": false + } +} From 6f7086044fba04f62991fcbf961911f746d15b62 Mon Sep 17 00:00:00 2001 From: Ben Talbot Date: Tue, 4 Dec 2018 22:21:22 -0800 Subject: [PATCH 0165/2268] Remove "no-single-declare-module": false from tslint.json --- types/google-cloud__kms/tslint.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/google-cloud__kms/tslint.json b/types/google-cloud__kms/tslint.json index 1f75469243..ffaae9bd46 100644 --- a/types/google-cloud__kms/tslint.json +++ b/types/google-cloud__kms/tslint.json @@ -1,7 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "indent": [true, "tabs"], - "no-single-declare-module": false + "indent": [true, "tabs"] } } From 0eebf91a2d2ac25a45eeeb8e60dbff0c8c8059cd Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:57:42 +0100 Subject: [PATCH 0166/2268] Add types for sasl-digest-md5 --- types/sasl-digest-md5/index.d.ts | 41 +++++++++++++++++++ .../sasl-digest-md5/sasl-digest-md5-tests.ts | 30 ++++++++++++++ types/sasl-digest-md5/tsconfig.json | 23 +++++++++++ types/sasl-digest-md5/tslint.json | 1 + 4 files changed, 95 insertions(+) create mode 100644 types/sasl-digest-md5/index.d.ts create mode 100644 types/sasl-digest-md5/sasl-digest-md5-tests.ts create mode 100644 types/sasl-digest-md5/tsconfig.json create mode 100644 types/sasl-digest-md5/tslint.json diff --git a/types/sasl-digest-md5/index.d.ts b/types/sasl-digest-md5/index.d.ts new file mode 100644 index 0000000000..001875f330 --- /dev/null +++ b/types/sasl-digest-md5/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for sasl-digest-md5 0.1 +// Project: https://github.com/jaredhanson/js-sasl-digest-md5 +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = DigestMd5Mechanism; + +declare class DigestMd5Mechanism implements Mechanism { + static Mechanism: typeof DigestMd5Mechanism; + static prototype: { + name: 'DIGEST-MD5'; + clientFirst: false; + }; + + name: 'DIGEST-MD5'; + clientFirst: false; + + constructor(options?: DigestMd5Mechanism.Options); + + response(cred: DigestMd5Mechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace DigestMd5Mechanism { + interface Options { + genNonce?: () => number; + } + + interface Credentials { + serviceType: string; + host: string; + username: string; + password: string; + serviceName?: string; + realm?: string; + authzid?: string; + } +} diff --git a/types/sasl-digest-md5/sasl-digest-md5-tests.ts b/types/sasl-digest-md5/sasl-digest-md5-tests.ts new file mode 100644 index 0000000000..f63c4b7359 --- /dev/null +++ b/types/sasl-digest-md5/sasl-digest-md5-tests.ts @@ -0,0 +1,30 @@ +import DigestMd5Mechanism = require('sasl-digest-md5'); +import { Mechanism } from 'sasl-digest-md5'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(DigestMd5Mechanism); +new Factory().use(Mechanism); + +// $ExpectType "DIGEST-MD5" +DigestMd5Mechanism.prototype.name; +// $ExpectType false +DigestMd5Mechanism.prototype.clientFirst; + +const m = new DigestMd5Mechanism(); +new DigestMd5Mechanism({ + genNonce() { + return 1; + }, +}); + +// $ExpectType "DIGEST-MD5" +m.name; +// $ExpectType false +m.clientFirst; +// $ExpectType string +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', serviceName: 'sn' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', realm: 'r' }); +m.response({ serviceType: 's', host: 'h', username: 'u', password: 'p', authzid: 'a' }); +// $ExpectType DigestMd5Mechanism +m.challenge('challenge'); diff --git a/types/sasl-digest-md5/tsconfig.json b/types/sasl-digest-md5/tsconfig.json new file mode 100644 index 0000000000..84059391b2 --- /dev/null +++ b/types/sasl-digest-md5/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", + "sasl-digest-md5-tests.ts" + ] +} diff --git a/types/sasl-digest-md5/tslint.json b/types/sasl-digest-md5/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-digest-md5/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2133ee8e4c24f7c242f77d1680e77073a6e0b771 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:58:42 +0100 Subject: [PATCH 0167/2268] Add types for sasl-external --- types/sasl-external/index.d.ts | 29 ++++++++++++++++++++++ types/sasl-external/sasl-external-tests.ts | 22 ++++++++++++++++ types/sasl-external/tsconfig.json | 23 +++++++++++++++++ types/sasl-external/tslint.json | 1 + 4 files changed, 75 insertions(+) create mode 100644 types/sasl-external/index.d.ts create mode 100644 types/sasl-external/sasl-external-tests.ts create mode 100644 types/sasl-external/tsconfig.json create mode 100644 types/sasl-external/tslint.json diff --git a/types/sasl-external/index.d.ts b/types/sasl-external/index.d.ts new file mode 100644 index 0000000000..06a90ce3a4 --- /dev/null +++ b/types/sasl-external/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for sasl-external 0.1 +// Project: https://github.com/jaredhanson/js-sasl-external +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = ExternalMechanism; + +declare class ExternalMechanism implements Mechanism { + static Mechanism: typeof ExternalMechanism; + static prototype: { + name: 'EXTERNAL'; + clientFirst: true; + }; + + name: 'EXTERNAL'; + clientFirst: true; + + response(cred: ExternalMechanism.Credentials): string; + + challenge(chal: string): void; +} + +declare namespace ExternalMechanism { + interface Credentials { + authzid?: string; + } +} diff --git a/types/sasl-external/sasl-external-tests.ts b/types/sasl-external/sasl-external-tests.ts new file mode 100644 index 0000000000..919721aec5 --- /dev/null +++ b/types/sasl-external/sasl-external-tests.ts @@ -0,0 +1,22 @@ +import ExternalMechanism = require('sasl-external'); +import { Mechanism } from 'sasl-external'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(ExternalMechanism); +new Factory().use(Mechanism); + +// $ExpectType "EXTERNAL" +ExternalMechanism.prototype.name; +// $ExpectType true +ExternalMechanism.prototype.clientFirst; + +const m = new ExternalMechanism(); + +// $ExpectType "EXTERNAL" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ authzid: 'a' }); +// $ExpectType void +m.challenge('challenge'); diff --git a/types/sasl-external/tsconfig.json b/types/sasl-external/tsconfig.json new file mode 100644 index 0000000000..b319008559 --- /dev/null +++ b/types/sasl-external/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", + "sasl-external-tests.ts" + ] +} diff --git a/types/sasl-external/tslint.json b/types/sasl-external/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-external/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0b80d92a10d2e643ec871e8ba80a0ab18ebd2a8e Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 25 Nov 2018 23:59:27 +0100 Subject: [PATCH 0168/2268] Add types for sasl-plain --- types/sasl-plain/index.d.ts | 31 ++++++++++++++++++++++++++++ types/sasl-plain/sasl-plain-tests.ts | 23 +++++++++++++++++++++ types/sasl-plain/tsconfig.json | 23 +++++++++++++++++++++ types/sasl-plain/tslint.json | 1 + 4 files changed, 78 insertions(+) create mode 100644 types/sasl-plain/index.d.ts create mode 100644 types/sasl-plain/sasl-plain-tests.ts create mode 100644 types/sasl-plain/tsconfig.json create mode 100644 types/sasl-plain/tslint.json diff --git a/types/sasl-plain/index.d.ts b/types/sasl-plain/index.d.ts new file mode 100644 index 0000000000..a1c5f61467 --- /dev/null +++ b/types/sasl-plain/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for sasl-plain 0.1 +// Project: https://github.com/jaredhanson/js-sasl-plain +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = PlainMechanism; + +declare class PlainMechanism implements Mechanism { + static Mechanism: typeof PlainMechanism; + static prototype: { + name: 'PLAIN'; + clientFirst: true; + }; + + name: 'PLAIN'; + clientFirst: true; + + response(cred: PlainMechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace PlainMechanism { + interface Credentials { + authzid?: string; + username: string; + password: string; + } +} diff --git a/types/sasl-plain/sasl-plain-tests.ts b/types/sasl-plain/sasl-plain-tests.ts new file mode 100644 index 0000000000..144d21451f --- /dev/null +++ b/types/sasl-plain/sasl-plain-tests.ts @@ -0,0 +1,23 @@ +import PlainMechanism = require('sasl-plain'); +import { Mechanism } from 'sasl-plain'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(PlainMechanism); +new Factory().use(Mechanism); + +// $ExpectType "PLAIN" +PlainMechanism.prototype.name; +// $ExpectType true +PlainMechanism.prototype.clientFirst; + +const m = new PlainMechanism(); + +// $ExpectType "PLAIN" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ username: 'u', password: 'pw' }); +m.response({ username: 'u', password: 'pw', authzid: 'a' }); +// $ExpectType PlainMechanism +m.challenge('challenge'); diff --git a/types/sasl-plain/tsconfig.json b/types/sasl-plain/tsconfig.json new file mode 100644 index 0000000000..3e33152c74 --- /dev/null +++ b/types/sasl-plain/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", + "sasl-plain-tests.ts" + ] +} diff --git a/types/sasl-plain/tslint.json b/types/sasl-plain/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-plain/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2e722d3138e0103158de95c755376085e01a030f Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 26 Nov 2018 00:01:17 +0100 Subject: [PATCH 0169/2268] Add types for sasl-scram-sha-1 --- types/sasl-scram-sha-1/index.d.ts | 41 +++++++++++++++++++ .../sasl-scram-sha-1-tests.ts | 33 +++++++++++++++ types/sasl-scram-sha-1/tsconfig.json | 23 +++++++++++ types/sasl-scram-sha-1/tslint.json | 1 + 4 files changed, 98 insertions(+) create mode 100644 types/sasl-scram-sha-1/index.d.ts create mode 100644 types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts create mode 100644 types/sasl-scram-sha-1/tsconfig.json create mode 100644 types/sasl-scram-sha-1/tslint.json diff --git a/types/sasl-scram-sha-1/index.d.ts b/types/sasl-scram-sha-1/index.d.ts new file mode 100644 index 0000000000..d332b6126a --- /dev/null +++ b/types/sasl-scram-sha-1/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for sasl-scram-sha-1 1.2 +// Project: https://github.com/legastero/js-sasl-scram-sha-1 +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Mechanism } from 'saslmechanisms'; + +export = ScramSha1Mechanism; + +declare class ScramSha1Mechanism implements Mechanism { + static Mechanism: typeof ScramSha1Mechanism; + static prototype: { + name: 'SCRAM-SHA-1'; + clientFirst: true; + }; + + name: 'SCRAM-SHA-1'; + clientFirst: true; + + constructor(options?: ScramSha1Mechanism.Options); + + response(cred: ScramSha1Mechanism.Credentials): string; + + challenge(chal: string): this; +} + +declare namespace ScramSha1Mechanism { + interface Options { + genNonce?: () => number; + } + + interface Credentials { + authzid?: string; + username?: string; + password?: string; + salt?: string; + saltedPassword?: string; + clientKey?: string; + serverKey?: string; + } +} diff --git a/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts b/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts new file mode 100644 index 0000000000..85eb648193 --- /dev/null +++ b/types/sasl-scram-sha-1/sasl-scram-sha-1-tests.ts @@ -0,0 +1,33 @@ +import ScramSha1Mechanism = require('sasl-scram-sha-1'); +import { Mechanism } from 'sasl-scram-sha-1'; +import { Factory } from 'saslmechanisms'; + +new Factory().use(ScramSha1Mechanism); +new Factory().use(Mechanism); + +// $ExpectType "SCRAM-SHA-1" +ScramSha1Mechanism.prototype.name; +// $ExpectType true +ScramSha1Mechanism.prototype.clientFirst; + +const m = new ScramSha1Mechanism(); +new ScramSha1Mechanism({ + genNonce() { + return 1; + }, +}); + +// $ExpectType "SCRAM-SHA-1" +m.name; +// $ExpectType true +m.clientFirst; +// $ExpectType string +m.response({ authzid: 'a' }); +m.response({ username: 'u' }); +m.response({ password: 'pw' }); +m.response({ salt: 's' }); +m.response({ saltedPassword: 'sp' }); +m.response({ clientKey: 'ck' }); +m.response({ serverKey: 'sk' }); +// $ExpectType ScramSha1Mechanism +m.challenge('challenge'); diff --git a/types/sasl-scram-sha-1/tsconfig.json b/types/sasl-scram-sha-1/tsconfig.json new file mode 100644 index 0000000000..80181379ea --- /dev/null +++ b/types/sasl-scram-sha-1/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", + "sasl-scram-sha-1-tests.ts" + ] +} diff --git a/types/sasl-scram-sha-1/tslint.json b/types/sasl-scram-sha-1/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sasl-scram-sha-1/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b3ae835f65271d63ca326e287b419b6a2d08d234 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 10:44:07 +0100 Subject: [PATCH 0170/2268] Extended test case --- types/simpl-schema/index.d.ts | 13 ++++- types/simpl-schema/simpl-schema-tests.ts | 73 +++++++----------------- 2 files changed, 31 insertions(+), 55 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 32dd8d7b66..d5527b0697 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -50,11 +50,20 @@ interface CleanOption { getAutoValues?: boolean; isModifier?: boolean; extendAutoValueContext?: boolean; + removeNullsFromArrays?: boolean; +} + +interface SimpleSchemaOptions { + check?: boolean; + clean?: CleanOption; + defaultLabel?: string; + humanizeAutoLabels?: boolean; + requiredByDefault?: boolean; + tracker?: any; } -// ??? interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[]): SimpleSchema; + new(schema: {[key: string]: SchemaDefinition} | any[], options?: SimpleSchemaOptions): SimpleSchema; namedContext(name?: string): SimpleSchemaValidationContextStatic; addValidator(validator: () => boolean): any; pick(...fields: string[]): SimpleSchemaStatic; diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 3c40f0c4bb..49c166070d 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -34,63 +34,30 @@ StringSchema.validate({ regExpString: "id" }); - /* - , - title: { - type: String, - label: "Argument", - custom: function () { - var text = this.value; - text = text.replace(/https?:\/\/(www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6})\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi, '$2'); - - if(text.length > MAX_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MAX_STRING, max: MAX_ARGUMENT_LENGTH } - else if(text.length < MIN_ARGUMENT_LENGTH) return { type: SimpleSchema.ErrorTypes.MIN_STRING, min: MIN_ARGUMENT_LENGTH } - } +const StringSchemaWithOptions = new SimpleSchema({ + basicString: { + type: String }, - questionId: { - type: String, - regEx: SimpleSchema.RegEx.Id - }, - side: { - type: String, - allowedValues: ['pro', 'con'] + limitedString: { + type: String, + allowedValues: ['pro', 'con'] }, userId: { - type: String, - regEx: SimpleSchema.RegEx.Id + type: String, + regEx: SimpleSchema.RegEx.Id }, createdAt: { - type: Date, - autoValue: () => new Date(), + type: Date, + autoValue: () => new Date(), }, - clapCount: { - type: SimpleSchema.Integer, - defaultValue: 0 - }, - highlight: { - type: Array, - optional: true - }, - 'highlight.$': { - type: Object - }, - 'highlight.$.start': SimpleSchema.Integer, - 'highlight.$.end': SimpleSchema.Integer, - 'highlight.$.text': { - type: String, - trim: false +}, +{ + clean: { + filter: true, + autoConvert: true, + removeEmptyStrings: true, + trimStrings: true, + getAutoValues: true, + removeNullsFromArrays: true, } - */ - /* - , - { - clean: { - filter: true, - autoConvert: true, - removeEmptyStrings: true, - trimStrings: true, - getAutoValues: true, - removeNullsFromArrays: true, - } - } - */ +}); From 5380cf2a252452830789e2951fe2ee4ef791d5d1 Mon Sep 17 00:00:00 2001 From: Wouter R Date: Wed, 5 Dec 2018 11:15:50 +0100 Subject: [PATCH 0171/2268] Copy mongoose-paginate declaration to mongoose-paginate-v2. --- types/mongoose-paginate-v2/index.d.ts | 51 ++++++++++++ .../mongoose-paginate-tests.ts | 71 +++++++++++++++++ types/mongoose-paginate-v2/tsconfig.json | 23 ++++++ types/mongoose-paginate-v2/tslint.json | 79 +++++++++++++++++++ 4 files changed, 224 insertions(+) create mode 100644 types/mongoose-paginate-v2/index.d.ts create mode 100644 types/mongoose-paginate-v2/mongoose-paginate-tests.ts create mode 100644 types/mongoose-paginate-v2/tsconfig.json create mode 100644 types/mongoose-paginate-v2/tslint.json diff --git a/types/mongoose-paginate-v2/index.d.ts b/types/mongoose-paginate-v2/index.d.ts new file mode 100644 index 0000000000..ad54786f53 --- /dev/null +++ b/types/mongoose-paginate-v2/index.d.ts @@ -0,0 +1,51 @@ +// Type definitions for mongoose-paginate 5.0.0 +// Project: https://github.com/edwardhotchkiss/mongoose-paginate +// Definitions by: Linus Brolin , simonxca +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare module 'mongoose' { + export interface PaginateOptions { + select?: Object | string; + sort?: Object | string; + populate?: Array | Array | Object | string; + lean?: boolean; + leanWithId?: boolean; + offset?: number; + page?: number; + limit?: number; + } + + export interface PaginateResult { + docs: Array; + total: number; + limit: number; + page?: number; + pages?: number; + offset?: number; + } + + interface PaginateModel extends Model { + paginate(query?: Object, options?: PaginateOptions, callback?: (err: any, result: PaginateResult) => void): Promise>; + } + + export function model( + name: string, + schema?: Schema, + collection?: string, + skipInit?: boolean): PaginateModel; + + export function model>( + name: string, + schema?: Schema, + collection?: string, + skipInit?: boolean): U; +} + +declare module 'mongoose-paginate' { + import mongoose = require('mongoose'); + var _: (schema: mongoose.Schema) => void; + export = _; +} diff --git a/types/mongoose-paginate-v2/mongoose-paginate-tests.ts b/types/mongoose-paginate-v2/mongoose-paginate-tests.ts new file mode 100644 index 0000000000..d55f8a454e --- /dev/null +++ b/types/mongoose-paginate-v2/mongoose-paginate-tests.ts @@ -0,0 +1,71 @@ +/** + * Created by Linus Brolin . + */ + +import { + Schema, + model, + PaginateModel, + PaginateOptions, + PaginateResult, + Document +} from 'mongoose'; +import mongoosePaginate = require('mongoose-paginate'); +import { Router, Request, Response } from 'express'; + + +//#region Test Models +interface User extends Document { + email: string; + username: string; + password: string; +} + +const UserSchema: Schema = new Schema({ + email: String, + username: String, + password: String +}); + +UserSchema.plugin(mongoosePaginate); + +interface UserModel extends PaginateModel {}; + +let UserModel: UserModel = model('User', UserSchema) as UserModel; +//#endregion + + +//#region Test Paginate +let router: Router = Router(); + +router.get('/users.json', function(req: Request, res: Response) { + let descending: boolean = true; + let options: PaginateOptions = {} as PaginateOptions; + options.select = 'email username'; + options.sort = { 'username': (descending ? -1 : 1) }; + options.populate = ''; + options.lean = true; + options.leanWithId = false; + options.offset = 0; + options.page = 1; + options.limit = 10; + + UserModel + .paginate({}, options, (err: any, value: PaginateResult) => { + if (err) { + console.log(err); + return res.status(500).send(err); + } + + console.log('total: ' + value.total); + console.log('limit: ' + value.limit); + console.log('page: ' + value.page); + console.log('pages: ' + value.pages); + console.log('offset: ' + value.offset); + console.log('docs: '); + console.dir(value.docs); + return res.json(value); + }); + +}); +//#endregion diff --git a/types/mongoose-paginate-v2/tsconfig.json b/types/mongoose-paginate-v2/tsconfig.json new file mode 100644 index 0000000000..3194368f11 --- /dev/null +++ b/types/mongoose-paginate-v2/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mongoose-paginate-tests.ts" + ] +} \ No newline at end of file diff --git a/types/mongoose-paginate-v2/tslint.json b/types/mongoose-paginate-v2/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/mongoose-paginate-v2/tslint.json @@ -0,0 +1,79 @@ +{ + "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 + } +} From ad776bc550c59a14f387157c2ea1dc733790fe49 Mon Sep 17 00:00:00 2001 From: Wouter R Date: Wed, 5 Dec 2018 11:40:07 +0100 Subject: [PATCH 0172/2268] Update declarations to correspond with mongoose-paginate-v2 module. --- types/mongoose-paginate-v2/index.d.ts | 23 ++++++++++++++++--- ...tests.ts => mongoose-paginate-v2-tests.ts} | 22 ++++++++++++++---- types/mongoose-paginate-v2/tsconfig.json | 4 ++-- 3 files changed, 39 insertions(+), 10 deletions(-) rename types/mongoose-paginate-v2/{mongoose-paginate-tests.ts => mongoose-paginate-v2-tests.ts} (68%) diff --git a/types/mongoose-paginate-v2/index.d.ts b/types/mongoose-paginate-v2/index.d.ts index ad54786f53..6c9103f852 100644 --- a/types/mongoose-paginate-v2/index.d.ts +++ b/types/mongoose-paginate-v2/index.d.ts @@ -1,15 +1,31 @@ -// Type definitions for mongoose-paginate 5.0.0 +// Type definitions for mongoose-paginate-v2 1.0.13 // Project: https://github.com/edwardhotchkiss/mongoose-paginate -// Definitions by: Linus Brolin , simonxca +// Definitions by: Linus Brolin +// simonxca +// woutgg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +// +// Based on type declarations for mongoose-paginate 5.0.0. /// declare module 'mongoose' { + export interface CustomLabels { + totalDocs?: string, + limit?: string, + page?: string, + totalPages?: string, + docs?: string, + nextPage?: string, + prevPage?: string, + } + export interface PaginateOptions { select?: Object | string; sort?: Object | string; + customLabels?: CustomLabels, + collation?: CollationOptions, populate?: Array | Array | Object | string; lean?: boolean; leanWithId?: boolean; @@ -25,6 +41,7 @@ declare module 'mongoose' { page?: number; pages?: number; offset?: number; + [customLabel: string]: Array | number | undefined; } interface PaginateModel extends Model { @@ -44,7 +61,7 @@ declare module 'mongoose' { skipInit?: boolean): U; } -declare module 'mongoose-paginate' { +declare module 'mongoose-paginate-v2' { import mongoose = require('mongoose'); var _: (schema: mongoose.Schema) => void; export = _; diff --git a/types/mongoose-paginate-v2/mongoose-paginate-tests.ts b/types/mongoose-paginate-v2/mongoose-paginate-v2-tests.ts similarity index 68% rename from types/mongoose-paginate-v2/mongoose-paginate-tests.ts rename to types/mongoose-paginate-v2/mongoose-paginate-v2-tests.ts index d55f8a454e..8410c740e5 100644 --- a/types/mongoose-paginate-v2/mongoose-paginate-tests.ts +++ b/types/mongoose-paginate-v2/mongoose-paginate-v2-tests.ts @@ -43,12 +43,22 @@ router.get('/users.json', function(req: Request, res: Response) { let options: PaginateOptions = {} as PaginateOptions; options.select = 'email username'; options.sort = { 'username': (descending ? -1 : 1) }; + options.collation = { locale: 'en_US', strength: 1 }; options.populate = ''; options.lean = true; options.leanWithId = false; options.offset = 0; options.page = 1; options.limit = 10; + options.customLabels = { + totalDocs: 'totalDocsCustom', + limit: 'limitCustom', + page: 'pageCustom', + totalPages: 'totalPagesCustom', + docs: 'docsCustom', + nextPage: 'nextPageCustom', + prevPage: 'prevPageCustom' + }; UserModel .paginate({}, options, (err: any, value: PaginateResult) => { @@ -57,13 +67,15 @@ router.get('/users.json', function(req: Request, res: Response) { return res.status(500).send(err); } - console.log('total: ' + value.total); - console.log('limit: ' + value.limit); - console.log('page: ' + value.page); - console.log('pages: ' + value.pages); + console.log('totalDocs: ' + value.totalDocsCustom); + console.log('limit: ' + value.limitCustom); + console.log('page: ' + value.pageCustom); + console.log('nextPage: ' + value.nextPageCustom); + console.log('prevPage: ' + value.prevPageCustom); + console.log('totalPages: ' + value.totalPagesCustom); console.log('offset: ' + value.offset); console.log('docs: '); - console.dir(value.docs); + console.dir(value.docsCustom); return res.json(value); }); diff --git a/types/mongoose-paginate-v2/tsconfig.json b/types/mongoose-paginate-v2/tsconfig.json index 3194368f11..1e367240a9 100644 --- a/types/mongoose-paginate-v2/tsconfig.json +++ b/types/mongoose-paginate-v2/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "mongoose-paginate-tests.ts" + "mongoose-paginate-v2-tests.ts" ] -} \ No newline at end of file +} From 250e3e9de236d4c4d74a8c3ce5f08aff00b13f60 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 12:31:05 +0100 Subject: [PATCH 0173/2268] Further test cases, short hand support --- types/simpl-schema/index.d.ts | 15 ++++++++++++++- types/simpl-schema/simpl-schema-tests.ts | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index d5527b0697..1317b50d45 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -4,6 +4,8 @@ // Qkramer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare module 'simpl-schema' { + export class ValidationContext { constructor(ss: any); addValidationErrors(errors: any): void; @@ -63,7 +65,16 @@ interface SimpleSchemaOptions { } interface SimpleSchemaStatic { - new(schema: {[key: string]: SchemaDefinition} | any[], options?: SimpleSchemaOptions): SimpleSchema; + new( + schema: { + [key: string]: SchemaDefinition + | BooleanConstructor | StringConstructor | NumberConstructor | DateConstructor + | ArrayConstructor + | string | RegExp + | SimpleSchema + } | any[], + options?: SimpleSchemaOptions + ): SimpleSchema; namedContext(name?: string): SimpleSchemaValidationContextStatic; addValidator(validator: () => boolean): any; pick(...fields: string[]): SimpleSchemaStatic; @@ -202,3 +213,5 @@ export interface MongoObject { } export default SimpleSchema; + +} diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 49c166070d..50181c373f 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -42,6 +42,9 @@ const StringSchemaWithOptions = new SimpleSchema({ type: String, allowedValues: ['pro', 'con'] }, + subschema: { + type: StringSchema + }, userId: { type: String, regEx: SimpleSchema.RegEx.Id @@ -61,3 +64,13 @@ const StringSchemaWithOptions = new SimpleSchema({ removeNullsFromArrays: true, } }); + +new SimpleSchema({ + shortBoolean: Boolean, + shortString: String, + shortNumber: Number, + shortInteger: SimpleSchema.Integer, + shortDate: Date, + shortArray: Array, + subSchema: StringSchemaWithOptions +}); From 237b96f0783ee45dc9d82d3b121e1f01e59c7aab Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 13:11:30 +0100 Subject: [PATCH 0174/2268] Fixes validate(..., {keys: []}) with keys selection --- types/simpl-schema/index.d.ts | 17 ++--------------- types/simpl-schema/simpl-schema-tests.ts | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index 1317b50d45..b3445ed2d3 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -5,7 +5,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'simpl-schema' { - export class ValidationContext { constructor(ss: any); addValidationErrors(errors: any): void; @@ -133,6 +132,7 @@ interface ValidationOption { clean?: boolean; filter?: boolean; upsertextendedCustomContext?: boolean; + keys?: string[]; } interface SimpleSchemaValidationContextStaticKeys { @@ -188,24 +188,12 @@ export const SimpleSchema: SimpleSchemaStatic; export const SimpleSchemaValidationContext: SimpleSchemaValidationContextStatic; export const MongoObject: MongoObjectStatic; -export interface SimpleSchema { +export interface SimpleSchema extends SimpleSchemaStatic { debug: boolean; validate(obj: any, options?: ValidationOption): void; addValidator(validator: () => boolean): any; extendOptions(options: {[key: string]: any}): void; messages(messages: any): void; - RegEx: { - Email: RegExp; - Domain: RegExp; - WeakDomain: RegExp; - IP: RegExp; - IPv4: RegExp; - IPv6: RegExp; - Url: RegExp; - Id: RegExp; - ZipCode: RegExp; - Phone: RegExp; - }; } export interface MongoObject { @@ -213,5 +201,4 @@ export interface MongoObject { } export default SimpleSchema; - } diff --git a/types/simpl-schema/simpl-schema-tests.ts b/types/simpl-schema/simpl-schema-tests.ts index 50181c373f..6373107aa3 100644 --- a/types/simpl-schema/simpl-schema-tests.ts +++ b/types/simpl-schema/simpl-schema-tests.ts @@ -32,7 +32,7 @@ StringSchema.validate({ basicString: "Test", limitedString: "pro", regExpString: "id" -}); +}, {keys: ['basicString']}); const StringSchemaWithOptions = new SimpleSchema({ basicString: { From 9786a8c8e490a0c9439e080c4d1ccdf328a9c7e9 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 13:51:45 +0100 Subject: [PATCH 0175/2268] Minor additions to Highlighter --- types/react-bootstrap-typeahead/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-bootstrap-typeahead/index.d.ts b/types/react-bootstrap-typeahead/index.d.ts index 2c0495ce03..52f99825d5 100644 --- a/types/react-bootstrap-typeahead/index.d.ts +++ b/types/react-bootstrap-typeahead/index.d.ts @@ -191,8 +191,9 @@ export interface AsyncTypeaheadProps extends TypeaheadProps { export const AsyncTypeahead: React.ClassicComponentClass>; export interface HighligherProps { - key: string; + key?: string; search: string; + optionId?: any; } export const Highlighter: React.ClassicComponentClass>; From 2837928c08099a1a520fd27bb26ab0bb6bdee711 Mon Sep 17 00:00:00 2001 From: arichter83 Date: Wed, 5 Dec 2018 13:59:13 +0100 Subject: [PATCH 0176/2268] Worked on ValidationContext --- types/simpl-schema/index.d.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/types/simpl-schema/index.d.ts b/types/simpl-schema/index.d.ts index b3445ed2d3..54d0a5665d 100644 --- a/types/simpl-schema/index.d.ts +++ b/types/simpl-schema/index.d.ts @@ -4,18 +4,13 @@ // Qkramer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module 'simpl-schema' { -export class ValidationContext { - constructor(ss: any); +export interface ValidationContext extends SimpleSchemaValidationContextStatic { + // constructor(ss: any); addValidationErrors(errors: any): void; clean(...args: any[]): any; getErrorForKey(key: any, ...args: any[]): any; - isValid(): any; - keyErrorMessage(key: any, ...args: any[]): any; - keyIsInvalid(key: any, ...args: any[]): any; reset(): void; setValidationErrors(errors: any): void; - validate(obj: any, ...args: any[]): any; validationErrors(): any; } @@ -88,7 +83,7 @@ interface SimpleSchemaStatic { messages(messages: any): any; messageForError(type: any, key: any, def: any, value: any): string; allowsKey(key: any): string; - newContext(): SimpleSchemaValidationContextStatic; + newContext(): ValidationContext; objectKeys(keyPrefix: any): any[]; validate(obj: any, options?: ValidationOption): void; validator(options: ValidationOption): () => boolean; @@ -201,4 +196,3 @@ export interface MongoObject { } export default SimpleSchema; -} From 0553880908274ba00becfe2d98490330261741a5 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Tue, 6 Nov 2018 16:01:50 +0100 Subject: [PATCH 0177/2268] initial commit for tern addon typings. still WIP. workstream: --- types/codemirror/codemirror-tern.d.ts | 112 ++++++++++++++++++++++++++ types/codemirror/tsconfig.json | 1 + 2 files changed, 113 insertions(+) create mode 100644 types/codemirror/codemirror-tern.d.ts diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts new file mode 100644 index 0000000000..087307e200 --- /dev/null +++ b/types/codemirror/codemirror-tern.d.ts @@ -0,0 +1,112 @@ +//MUCH TODO + + +import * as CodeMirror from "codemirror"; +import * as Tern from "tern"; + +declare module "codemiror" { + + interface Editor { + server: TernServer; + } + + interface TernServer { + + addDoc: ( + name: string, + doc: CodeMirror.Doc + ) => { + doc: CodeMirror.Doc, + name: string, + changed: { from: number, to: number } | null + }; + + delDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + hideDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; + + complete: (cm: CodeMirror.Editor) => void; + + showType: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + showDocs: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; + + updateArgHints: (cm: CodeMirror.Editor) => void; + + jumpToDef: (cm: CodeMirror.Editor) => void; + + jumpBack: (cm: CodeMirror.Editor) => void; + + rename: (cm: CodeMirror.Editor) => void; + + selectName: (cm: CodeMirror.Editor) => void; + + request: (cm: CodeMirror.Editor, query: string | Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], callback: (error: any, data?: any) => void, pos?: CodeMirror.Position) => void; + + destroy: () => void; + } + + interface TernConstructor { + new(options?: TernOptions): TernServer; + } + export const TernServer: TernConstructor; + + interface TernOptions { + /** An object mapping plugin names to configuration options. */ + plugins?: Tern.ConstructorOptions["plugins"]; + /** An array of JSON definition data structures. */ + defs?: Tern.ConstructorOptions["defs"]; + /** + * Can be used to access files in + * the project that haven't been loaded yet. Simply do callback(null) to + * indicate that a file is not available. + */ + getFile?: (name: string, callback: (doc: CodeMirror.Doc | null) => void) => void; + /** + * This function will be applied + * to documents before passing them on to Tern. + */ + fileFilter?: (value: any, docName: string, doc: CodeMirror.Doc) => any; + /** This function should, when providing a multi-file view, switch the view or focus to the named file. */ + switchToDoc?: (name: string, doc: CodeMirror.Doc) => any; + /** Can be used to override the way errors are displayed. */ + showError?: (editor: CodeMirror.Editor, message: any) => void; + /** + * Customize the content in tooltips for completions. + * Is passed a single argument—the completion's data as returned by + * Tern—and may return a string, DOM node, or null to indicate that + * no tip should be shown. By default the docstring is shown. + */ + completionTip?: (data: Tern.QueryRegistry["completions"]["result"]) => string | HTMLElement | null; + /** Like completionTip, but for the tooltips shown for type queries. */ + typeTip?: (data: Tern.QueryRegistry["type"]["result"]) => string | HTMLElement | null; + /** This function will be applied to the Tern responses before treating them */ + responseFilter?: ( + doc: CodeMirror.Doc, + query: Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], + request: any, + error: Error, + data: any + ) => any; + /** + * Set to true to enable web worker mode. You'll probably + * want to feature detect the actual value you use here, for example + * !!window.Worker. + */ + useWorker?: boolean; + /** The main script of the worker. Point this to wherever you are hosting worker.js from this directory. */ + workerScript?: any; + /** + * An array of paths pointing (relative to workerScript) + * to the Acorn and Tern libraries and any Tern plugins you want to + * load. Or, if you minified those into a single script and included + * them in the workerScript, simply leave this undefined. + */ + workerDeps?: string[]; + } + +} + +declare module "codemirror/addon/tern/tern" { + export = CodeMirror; +} diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index d081586f6e..788a6c5a3f 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -24,6 +24,7 @@ "codemirror-runmode.d.ts", "codemirror-showhint.d.ts", "codemirror-comment.d.ts", + "codemirror-tern.d.ts", "searchcursor.d.ts", "test/index.ts", "test/matchbrackets.ts", From 9c72aa7b8916bcd2fa3dfd78e3d27ff80aa09054 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Tue, 6 Nov 2018 16:01:50 +0100 Subject: [PATCH 0178/2268] initial commit for tern addon typings. still WIP. workstream: --- types/codemirror/codemirror-tern.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts index 087307e200..405c13388b 100644 --- a/types/codemirror/codemirror-tern.d.ts +++ b/types/codemirror/codemirror-tern.d.ts @@ -4,6 +4,7 @@ import * as CodeMirror from "codemirror"; import * as Tern from "tern"; + declare module "codemiror" { interface Editor { @@ -41,8 +42,10 @@ declare module "codemiror" { selectName: (cm: CodeMirror.Editor) => void; + request: (cm: CodeMirror.Editor, query: string | Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], callback: (error: any, data?: any) => void, pos?: CodeMirror.Position) => void; + destroy: () => void; } From dbf3b71982e1bfd874af65090b4f58d0f57d9a05 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Wed, 5 Dec 2018 16:16:40 +0100 Subject: [PATCH 0179/2268] finalizing type definitions. workstream: --- types/codemirror/codemirror-tern.d.ts | 92 ++++++++++----------------- types/codemirror/test/tern.ts | 24 +++++++ types/codemirror/tsconfig.json | 5 +- 3 files changed, 60 insertions(+), 61 deletions(-) create mode 100644 types/codemirror/test/tern.ts diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts index 405c13388b..2f08090d06 100644 --- a/types/codemirror/codemirror-tern.d.ts +++ b/types/codemirror/codemirror-tern.d.ts @@ -1,52 +1,32 @@ -//MUCH TODO +// Type definitions for CodeMirror +// Project: https://github.com/marijnh/CodeMirror +// Definitions by: Nikolaj Kappler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// See docs https://codemirror.net/doc/manual.html#addon_tern + +// TypeScript Version: 2.2 import * as CodeMirror from "codemirror"; import * as Tern from "tern"; - -declare module "codemiror" { - - interface Editor { - server: TernServer; - } +declare module "codemirror" { interface TernServer { - - addDoc: ( - name: string, - doc: CodeMirror.Doc - ) => { - doc: CodeMirror.Doc, - name: string, - changed: { from: number, to: number } | null - }; - - delDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; - - hideDoc: (id: string | CodeMirror.Editor | CodeMirror.Doc) => void; - - complete: (cm: CodeMirror.Editor) => void; - - showType: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; - - showDocs: (cm: CodeMirror.Editor, pos?: CodeMirror.Position, callback?: Function) => void; - - updateArgHints: (cm: CodeMirror.Editor) => void; - - jumpToDef: (cm: CodeMirror.Editor) => void; - - jumpBack: (cm: CodeMirror.Editor) => void; - - rename: (cm: CodeMirror.Editor) => void; - - selectName: (cm: CodeMirror.Editor) => void; - - - request: (cm: CodeMirror.Editor, query: string | Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], callback: (error: any, data?: any) => void, pos?: CodeMirror.Position) => void; - - - destroy: () => void; + addDoc(name: string, doc: CodeMirror.Doc): { doc: CodeMirror.Doc, name: string, changed: { from: number, to: number } | null }; + delDoc(id: string | CodeMirror.Editor | CodeMirror.Doc): void; + hideDoc(id: string | CodeMirror.Editor | CodeMirror.Doc): void; + complete(cm: CodeMirror.Doc): void; + showType(cm: CodeMirror.Doc, pos?: CodeMirror.Position | number, callback?: Function): void; + showDocs(cm: CodeMirror.Doc, pos?: CodeMirror.Position | number, callback?: Function): void; + updateArgHints(cm: CodeMirror.Doc): void; + jumpToDef(cm: CodeMirror.Doc): void; + jumpBack(cm: CodeMirror.Doc): void; + rename(cm: CodeMirror.Doc): void; + selectName(cm: CodeMirror.Doc): void; + request(cm: CodeMirror.Doc, query: Q, callback: (error?: Error, data?: Tern.QueryRegistry[Q["type"]]["result"]) => void, pos?: CodeMirror.Position): void; + request(cm: CodeMirror.Doc, query: Q, callback: (error?: Error, data?: Tern.QueryRegistry[Q]["result"]) => void, pos?: CodeMirror.Position): void; + destroy(): void; } interface TernConstructor { @@ -58,39 +38,33 @@ declare module "codemiror" { /** An object mapping plugin names to configuration options. */ plugins?: Tern.ConstructorOptions["plugins"]; /** An array of JSON definition data structures. */ - defs?: Tern.ConstructorOptions["defs"]; + defs?: Tern.Def[]; /** * Can be used to access files in * the project that haven't been loaded yet. Simply do callback(null) to * indicate that a file is not available. */ - getFile?: (name: string, callback: (doc: CodeMirror.Doc | null) => void) => void; + getFile?(name: string, callback: (doc: CodeMirror.Doc | null) => any): any; /** * This function will be applied * to documents before passing them on to Tern. */ - fileFilter?: (value: any, docName: string, doc: CodeMirror.Doc) => any; + fileFilter?(value: string, docName: string, doc: CodeMirror.Doc): string; /** This function should, when providing a multi-file view, switch the view or focus to the named file. */ - switchToDoc?: (name: string, doc: CodeMirror.Doc) => any; + switchToDoc?(name: string, doc: CodeMirror.Doc): any; /** Can be used to override the way errors are displayed. */ - showError?: (editor: CodeMirror.Editor, message: any) => void; + showError?(editor: CodeMirror.Editor, message: Error): any; /** * Customize the content in tooltips for completions. - * Is passed a single argument—the completion's data as returned by - * Tern—and may return a string, DOM node, or null to indicate that + * Is passed a single argument — the completion's data as returned by + * Tern — and may return a string, DOM node, or null to indicate that * no tip should be shown. By default the docstring is shown. */ - completionTip?: (data: Tern.QueryRegistry["completions"]["result"]) => string | HTMLElement | null; + completionTip?(data: Tern.CompletionsQueryResult): string | HTMLElement | null; /** Like completionTip, but for the tooltips shown for type queries. */ - typeTip?: (data: Tern.QueryRegistry["type"]["result"]) => string | HTMLElement | null; + typeTip?(data: Tern.TypeQueryResult): string | HTMLElement | null; /** This function will be applied to the Tern responses before treating them */ - responseFilter?: ( - doc: CodeMirror.Doc, - query: Tern.QueryRegistry[keyof Tern.QueryRegistry]["query"], - request: any, - error: Error, - data: any - ) => any; + responseFilter?(doc: CodeMirror.Doc, query: Tern.Query, request: Tern.Document, error: Error | undefined, data: Tern.QueryRegistry[Tern.Query["type"]]["result"] | undefined): any; /** * Set to true to enable web worker mode. You'll probably * want to feature detect the actual value you use here, for example @@ -98,7 +72,7 @@ declare module "codemiror" { */ useWorker?: boolean; /** The main script of the worker. Point this to wherever you are hosting worker.js from this directory. */ - workerScript?: any; + workerScript?: string; /** * An array of paths pointing (relative to workerScript) * to the Acorn and Tern libraries and any Tern plugins you want to diff --git a/types/codemirror/test/tern.ts b/types/codemirror/test/tern.ts new file mode 100644 index 0000000000..2f80a9aabd --- /dev/null +++ b/types/codemirror/test/tern.ts @@ -0,0 +1,24 @@ +const options: CodeMirror.TernOptions = { + + completionTip: (data) => { + const d = data.completions; + return ""; + }, + + showError: (editor, message) => { + alert(message); + } + +}; + +const ts = new CodeMirror.TernServer(options); + +ts.request(cm.getDoc(), "completions", (_e, d) => { + if (d) { + const c = d.completions; + } +}, { ch: 0, line: 0 }); + +ts.complete(cm.getDoc()); + +ts.showType(cm.getDoc()); \ No newline at end of file diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index 788a6c5a3f..ffa5de2be5 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -19,19 +19,20 @@ }, "files": [ "index.d.ts", + "codemirror-comment.d.ts", "codemirror-matchbrackets.d.ts", "codemirror-panel.d.ts", "codemirror-runmode.d.ts", "codemirror-showhint.d.ts", - "codemirror-comment.d.ts", "codemirror-tern.d.ts", "searchcursor.d.ts", + "test/comment.ts", "test/index.ts", "test/matchbrackets.ts", "test/panel.ts", "test/runmode.ts", "test/searchcursor.ts", "test/showhint.ts", - "test/comment.ts" + "test/tern.ts" ] } \ No newline at end of file From 2ef5b8cb2dea6a9baa53d62f10ce10a4d84dc3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20J=2E=20Over=C3=A5?= Date: Wed, 5 Dec 2018 16:36:34 +0100 Subject: [PATCH 0180/2268] Update eureka-js-client to 4.4 typing --- .../eureka-js-client-tests.ts | 24 +++++++++++++++++++ types/eureka-js-client/index.d.ts | 11 ++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/types/eureka-js-client/eureka-js-client-tests.ts b/types/eureka-js-client/eureka-js-client-tests.ts index 109dab0278..b4b5c5f54e 100644 --- a/types/eureka-js-client/eureka-js-client-tests.ts +++ b/types/eureka-js-client/eureka-js-client-tests.ts @@ -19,3 +19,27 @@ const client = new Eureka({ port: 32768, } }); + +// example configuration against newer Eureka (https://www.npmjs.com/package/eureka-js-client#400-bad-request-errors-from-eureka-server) +const newerClient = new Eureka({ + // application instance information + instance: { + app: 'jqservice', + hostName: 'localhost', + ipAddr: '127.0.0.1', + port: { + $: 443, + '@enabled': true + }, + vipAddress: 'jq.test.something.com', + dataCenterInfo: { + '@class': 'com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo', + name: 'MyOwn', + }, + }, + eureka: { + // eureka server host / port + host: '192.168.99.100', + port: 32768, + } +}); diff --git a/types/eureka-js-client/index.d.ts b/types/eureka-js-client/index.d.ts index bfd9f10666..693e1b8ec8 100644 --- a/types/eureka-js-client/index.d.ts +++ b/types/eureka-js-client/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for eureka-js-client 4.3 +// Type definitions for eureka-js-client 4.4 // Project: https://github.com/jquatier/eureka-js-client -// Definitions by: Ilko Hoffmann +// Definitions by: Ilko Hoffmann , Karl O. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export class Eureka { @@ -26,7 +26,7 @@ export namespace EurekaClient { ipAddr: string; vipAddress: string; dataCenterInfo: DataCenterInfo; - port?: number; + port?: number | LegacyPortWrapper; instanceId?: string; appGroupName?: string; sid?: string; @@ -61,6 +61,10 @@ export namespace EurekaClient { useLocalMetadata?: boolean; preferIpAddress?: boolean; } + interface LegacyPortWrapper { + '$': number; + '@enabled': boolean; + } interface PortWrapper { enabled: boolean; port: number; @@ -71,5 +75,6 @@ export namespace EurekaClient { } interface DataCenterInfo { name: DataCenterName; + '@class'?: string; } } From 71587e15f393b60db1f4fc9105ebecd320c7eed5 Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Wed, 5 Dec 2018 16:45:12 +0100 Subject: [PATCH 0181/2268] added properties. workstream: --- types/codemirror/codemirror-tern.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts index 2f08090d06..13061d5739 100644 --- a/types/codemirror/codemirror-tern.d.ts +++ b/types/codemirror/codemirror-tern.d.ts @@ -13,6 +13,9 @@ import * as Tern from "tern"; declare module "codemirror" { interface TernServer { + readonly options: TernOptions; + readonly docs: { readonly [key: string]: CodeMirror.Doc }; + readonly server: Tern.Server; addDoc(name: string, doc: CodeMirror.Doc): { doc: CodeMirror.Doc, name: string, changed: { from: number, to: number } | null }; delDoc(id: string | CodeMirror.Editor | CodeMirror.Doc): void; hideDoc(id: string | CodeMirror.Editor | CodeMirror.Doc): void; From ad47fc8672b89cb1b102e943bdc6635dd58e575b Mon Sep 17 00:00:00 2001 From: Nikolaj Kappler Date: Wed, 5 Dec 2018 17:00:41 +0100 Subject: [PATCH 0182/2268] fix test build. workstream: --- types/codemirror/codemirror-tern.d.ts | 1 - types/codemirror/index.d.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/types/codemirror/codemirror-tern.d.ts b/types/codemirror/codemirror-tern.d.ts index 13061d5739..10da988825 100644 --- a/types/codemirror/codemirror-tern.d.ts +++ b/types/codemirror/codemirror-tern.d.ts @@ -5,7 +5,6 @@ // See docs https://codemirror.net/doc/manual.html#addon_tern -// TypeScript Version: 2.2 import * as CodeMirror from "codemirror"; import * as Tern from "tern"; diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index cdc3c4cd7c..bfef4c5e88 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -6,6 +6,7 @@ // rileymiller // toddself // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 export = CodeMirror; export as namespace CodeMirror; From 9a0a1f656052163a6d0d72e4b366f63db7ef206e Mon Sep 17 00:00:00 2001 From: Dmitry Guketlev Date: Wed, 5 Dec 2018 20:38:37 +0300 Subject: [PATCH 0183/2268] Typings for CSS Typed OM Level 1 --- .../index.d.ts | 289 ++++++++++++++++++ .../tsconfig.json | 24 ++ .../tslint.json | 1 + ...3c-css-typed-object-model-level-1-tests.ts | 278 +++++++++++++++++ 4 files changed, 592 insertions(+) create mode 100644 types/w3c-css-typed-object-model-level-1/index.d.ts create mode 100644 types/w3c-css-typed-object-model-level-1/tsconfig.json create mode 100644 types/w3c-css-typed-object-model-level-1/tslint.json create mode 100644 types/w3c-css-typed-object-model-level-1/w3c-css-typed-object-model-level-1-tests.ts diff --git a/types/w3c-css-typed-object-model-level-1/index.d.ts b/types/w3c-css-typed-object-model-level-1/index.d.ts new file mode 100644 index 0000000000..f1d68b2e94 --- /dev/null +++ b/types/w3c-css-typed-object-model-level-1/index.d.ts @@ -0,0 +1,289 @@ +// Type definitions for css-typed-object-model-level-1 20180410.0 +// Project: https://www.w3.org/TR/css-typed-om-1/ +// Definitions by: Dmitry Guketlev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +declare class CSSStyleValue { + static parse(property: string, cssText: string): CSSStyleValue; + static parseAll(property: string, cssText: string): CSSStyleValue[]; + toString(): string; +} + +declare class CSSVariableReferenceValue { + constructor(variable: string, fallback?: CSSUnparsedValue) + variable: string; + readonly fallback?: CSSUnparsedValue; +} + +type CSSUnparsedSegment = string | CSSVariableReferenceValue; + +declare class CSSUnparsedValue extends CSSStyleValue { + constructor(members: CSSUnparsedSegment[]); + [Symbol.iterator](): IterableIterator; + readonly length: number; + [idx: number]: CSSUnparsedSegment; +} + +declare class CSSKeywordValue extends CSSStyleValue { + constructor(value: string); + value: string; +} + +type CSSNumberish = number | CSSNumericValue; + +declare enum CSSNumericBaseType { + 'length', + 'angle', + 'time', + 'frequency', + 'resolution', + 'flex', + 'percent', +} + +interface CSSNumericType { + length: number; + angle: number; + time: number; + frequency: number; + resolution: number; + flex: number; + percent: number; + percentHint: CSSNumericBaseType; +} + +declare class CSSNumericValue extends CSSStyleValue { + add(...values: CSSNumberish[]): CSSNumericValue; + sub(...values: CSSNumberish[]): CSSNumericValue; + mul(...values: CSSNumberish[]): CSSNumericValue; + div(...values: CSSNumberish[]): CSSNumericValue; + min(...values: CSSNumberish[]): CSSNumericValue; + max(...values: CSSNumberish[]): CSSNumericValue; + + equals(...values: CSSNumberish[]): boolean; + + to(unit: string): CSSUnitValue; + toSum(...units: string[]): CSSMathSum; + type(): CSSNumericType; + + static parse(cssText: string): CSSNumericValue; +} + +declare class CSSUnitValue extends CSSNumericValue { + constructor(value: number, unit: string); + value: number; + readonly unit: string; +} + +declare class CSSMathValue extends CSSNumericValue { + readonly operator: CSSMathOperator; +} + +declare class CSSMathSum extends CSSMathValue { + constructor(...args: CSSNumberish[]); + readonly values: CSSNumericArray; +} + +declare class CSSMathProduct extends CSSMathValue { + constructor(...args: CSSNumberish[]) + readonly values: CSSNumericArray; +} + +declare class CSSMathNegate extends CSSMathValue { + constructor(arg: CSSNumberish) + readonly value: CSSNumericValue; +} + +declare class CSSMathInvert extends CSSMathValue { + constructor(arg: CSSNumberish) + readonly value: CSSNumericValue; +} + +declare class CSSMathMin extends CSSMathValue { + constructor(...args: CSSNumberish[]) + readonly values: CSSNumericArray; +} + +declare class CSSMathMax extends CSSMathValue { + constructor(...args: CSSNumberish[]) + readonly values: CSSNumericArray; +} + +// TODO(yavanosta): conflict with base class properties +// Since there is no support for this class in any browser, it's better +// wait for the implementation. +// declare class CSSMathClamp extends CSSMathValue { +// constructor(min: CSSNumberish, val: CSSNumberish, max: CSSNumberish); +// readonly min: CSSNumericValue; +// readonly val: CSSNumericValue; +// readonly max: CSSNumericValue; +// }; + +declare class CSSNumericArray { + [Symbol.iterator](): IterableIterator; + readonly length: number; + readonly [index: number]: CSSNumericValue; +} + +declare enum CSSMathOperator { + 'sum', + 'product', + 'negate', + 'invert', + 'min', + 'max', + 'clamp', +} + +declare class CSSTransformValue extends CSSStyleValue { + constructor(transforms: CSSTransformComponent[]); + [Symbol.iterator](): IterableIterator; + readonly length: number; + [index: number]: CSSTransformComponent; + readonly is2D: boolean; + toMatrix(): DOMMatrix; +} + +declare class CSSTransformComponent { + is2D: boolean; + toMatrix(): DOMMatrix; + toString(): string; +} + +declare class CSSTranslate extends CSSTransformComponent { + constructor(x: CSSNumericValue, y: CSSNumericValue, z?: CSSNumericValue); + x: CSSNumericValue; + y: CSSNumericValue; + z: CSSNumericValue; +} + +declare class CSSRotate extends CSSTransformComponent { + constructor(angle: CSSNumericValue); + constructor(x: CSSNumberish, y: CSSNumberish, z: CSSNumberish, angle: CSSNumericValue) + x: CSSNumberish; + y: CSSNumberish; + z: CSSNumberish; + angle: CSSNumericValue; +} + +declare class CSSScale extends CSSTransformComponent { + constructor(x: CSSNumberish, y: CSSNumberish, z?: CSSNumberish) + x: CSSNumberish; + y: CSSNumberish; + z: CSSNumberish; +} + +declare class CSSSkew extends CSSTransformComponent { + constructor(ax: CSSNumericValue, ay: CSSNumericValue) + ax: CSSNumericValue; + ay: CSSNumericValue; +} + +declare class CSSSkewX extends CSSTransformComponent { + constructor(ax: CSSNumericValue) + ax: CSSNumericValue; +} + +declare class CSSSkewY extends CSSTransformComponent { + constructor(ay: CSSNumericValue) + ay: CSSNumericValue; +} + +/* Note that skew(x,y) is *not* the same as skewX(x) skewY(y), + thus the separate interfaces for all three. */ + +declare class CSSPerspective extends CSSTransformComponent { + constructor(length: CSSNumericValue) + length: CSSNumericValue; +} + +declare class CSSMatrixComponent extends CSSTransformComponent { + constructor(matrix: DOMMatrixReadOnly, options?: CSSMatrixComponentOptions) + matrix: DOMMatrix; +} + +interface CSSMatrixComponentOptions { + is2D: boolean; +} + +declare class CSSImageValue extends CSSStyleValue { +} + +declare class StylePropertyMapReadOnly { + [Symbol.iterator](): IterableIterator<[string, CSSStyleValue[]]>; + + get(property: string): CSSStyleValue | undefined; + getAll(property: string): CSSStyleValue[]; + has(property: string): boolean; + readonly size: number; +} + +declare class StylePropertyMap extends StylePropertyMapReadOnly { + set(property: string, ...values: Array): void; + append(property: string, ...values: Array): void; + delete(property: string): void; + clear(): void; +} + +interface Element { + computedStyleMap(): StylePropertyMapReadOnly; +} + +interface CSSStyleRule { + readonly styleMap: StylePropertyMap; +} + +interface ElementCSSInlineStyle { + readonly attributeStyleMap: StylePropertyMap; +} + +interface CSS { + number(value: number): CSSUnitValue; + percent(value: number): CSSUnitValue; + + // + em(value: number): CSSUnitValue; + ex(value: number): CSSUnitValue; + ch(value: number): CSSUnitValue; + ic(value: number): CSSUnitValue; + rem(value: number): CSSUnitValue; + lh(value: number): CSSUnitValue; + rlh(value: number): CSSUnitValue; + vw(value: number): CSSUnitValue; + vh(value: number): CSSUnitValue; + vi(value: number): CSSUnitValue; + vb(value: number): CSSUnitValue; + vmin(value: number): CSSUnitValue; + vmax(value: number): CSSUnitValue; + cm(value: number): CSSUnitValue; + mm(value: number): CSSUnitValue; + Q(value: number): CSSUnitValue; + in(value: number): CSSUnitValue; + pt(value: number): CSSUnitValue; + pc(value: number): CSSUnitValue; + px(value: number): CSSUnitValue; + + // + deg(value: number): CSSUnitValue; + grad(value: number): CSSUnitValue; + rad(value: number): CSSUnitValue; + turn(value: number): CSSUnitValue; + + //

; + readonly props: P & IntrinsicProps; + } + + interface DomElements extends HTMLElementTagNameMap, SVGElementTagNameMap { + "main": HTMLMainElement; + } +} + +declare global { + namespace JSX { + // tslint:disable-next-line:no-empty-interface + interface Element extends PetitDom.VNode { } + + // tslint:disable-next-line:no-empty-interface + interface ElementClass extends PetitDom.Component { } + + // tslint:disable-next-line:no-empty-interface + interface IntrinsicClassAttributes extends PetitDom.Props { } + + // tslint:disable-next-line:no-empty-interface + interface IntrinsicAttributes extends PetitDom.IntrinsicProps { } + + interface ElementAttributesProperty { props: PetitDom.Props; } + + interface ElementChildrenAttribute { content: PetitDom.VNode[]; } + + type IntrinsicElements = { + [P in keyof PetitDom.DomElements]: + PetitDom.Props & + { + content?: PetitDom.Content | ReadonlyArray; + }; + }; + } +} diff --git a/types/petit-dom/petit-dom-tests.tsx b/types/petit-dom/petit-dom-tests.tsx new file mode 100644 index 0000000000..bde10bad3a --- /dev/null +++ b/types/petit-dom/petit-dom-tests.tsx @@ -0,0 +1,368 @@ +/* @jsx h */ +// tslint:disable:no-empty +// tslint:disable:no-null-keyword + +import { h, mount, patch, PetitDom, unmount } from "petit-dom"; + +function assertEqual(a: T, b: T) { } + +function eventHandler(event: Event): void { } + +interface CustomProps { + name: string; + count: number; + onSomeEvent(event: Event): void; +} + +/** + * Create an element with text content, using HyperScript syntax and JSX syntax + */ +export function testHtmlElementWithTextContent() { + // HyperScript syntax returns an ElementNode object, with typed properties + const aNode = h("a", { href: "link", onclick: eventHandler }, "click here"); + + assertEqual(aNode.isSVG, false); + assertEqual(aNode.type, "a"); + assertEqual(aNode.key, null); + assertEqual(aNode.props.href, "link"); + assertEqual(aNode.props.onclick, eventHandler); + assertEqual(aNode.content.length, 1); + + // JSX syntax returns a VNode object, so the "type" and "props" properties are "any" + const jsxNode = click here; + const jsxNodeType = jsxNode.type as string; + const jsxNodeProps = jsxNode.props as PetitDom.Props; + + assertEqual(jsxNode.isSVG, false); + assertEqual(jsxNodeType, "a"); + assertEqual(jsxNode.key, null); + assertEqual(jsxNodeProps.href, "link"); + assertEqual(jsxNodeProps.onclick, eventHandler); + assertEqual(jsxNode.content.length, 1); +} + +/** + * Create a